Unassociated ubd in sysfs?
I'm trying to play with a system that doesn't have any hardwired major/minors in it, just an initscript doing "find /sys -name dev", a bit of sed work, and mknod. (Eventually I'll get the full udev up, but for now a dumb little shell script works pretty well.)
Unfortunately, it doesn't list any unassociated ubd devices when I do this. I get loop devices, ttys, even /dev/zero and friends, but no ubd. If I associate one with a file from the command line, it shows up in sys, but I was under the impression I could associate them from "mount" as well..? I don't have any ubd nodes to associate anything with unless they show up in sysfs first...
By the way, on the 2.6.13 command line it wants ubd0=blah.img, which shows up as ubda inside UML. (Was this fixed in 2.6.14 already?)
Rob
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 11 lines · Rob Landley
I'm trying to play with a system that doesn't have any hardwired major/minors in it, just an initscript doing "find /sys -name dev", a bit of sed work, and mknod. (Eventually I'll get the full udev up, but for now a dumb little shell script works pretty well.)
Unfortunately, it doesn't list any unassociated ubd devices when I do this.
I get loop devices, ttys, even/dev/zeroand friends, but no ubd. If I
associate one with a file from the command line, it shows up in sys, but I was under the impression I could associate them from "mount" as well..? I don't have any ubd nodes to associate anything with unless they show up in sysfs first...
Well, I _do_ remember seeing ubd devices in /sys/block.
Quoted 2 lines
By the way, on the 2.6.13 command line it wants ubd0=blah.img, which shows up as ubda inside UML. (Was this fixed in 2.6.14 already?)
The "ubda" syntax is correct - I remember that sometimes the cmd line was fixed to accept ubda too, possibly for 2.6.14.
Signature · 20 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 10 lines · Rob Landley
I'm trying to play with a system that doesn't have any hardwired major/minors in it, just an initscript doing "find /sys -name dev", a bit of sed work, and mknod. (Eventually I'll get the full udev up, but for now a dumb little shell script works pretty well.)
Unfortunately, it doesn't list any unassociated ubd devices when I do this.
I get loop devices, ttys, even/dev/zeroand friends, but no ubd.If I
associate one with a file from the command line, it shows up in sys,
Ah, ok, sorry for my previous email. Yes, this matches with what I remember. And this also makes sense - it's as for hd* - only present devices are shown.
Quoted 2 lines
but I
was under the impression I could associate them from "mount" as well..?
Sorry, but __how__? And to _which purpose_?
The only way you have is:
*) ssh/(telnet) to the host
*) uml_mconsole
*) config ubd0=path (path relative to the UML cwdir at startup). Yes, this is hotplug. And it also works for network devices. It's as wonderful as it gets.
Quoted 5 lines
I
don't have any ubd nodes to associate anything with unless they show up in sysfs first...Rob
Signature · 20 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Blaisorblade
Quoted 8 lines · Rob Landley
I'm trying to play with a system that doesn't have any hardwired major/minors in it, just an initscript doing "find /sys -name dev", a bit of sed work, and mknod. (Eventually I'll get the full udev up, but for now a dumb little shell script works pretty well.)
Unfortunately, it doesn't list any unassociated ubd devices when I do this. I get loop devices, ttys, even
/dev/zeroand friends, but no ubd.
Quoted 6 lines
Quoted 2 lines
If I
associate one with a file from the command line, it shows up in sys,Ah, ok, sorry for my previous email. Yes, this matches with what I remember. And this also makes sense - it's as for hd* - only present devices are shown.
I was expecting it to behave like loop devices. You can't losetup a /dev/loop* that isn't there, so if they only show up after losetup binds them to something there's a chicken and egg problem with anything like udev.
Quoted 4 lines
Quoted 2 lines
but I
was under the impression I could associate them from "mount" as well..?Sorry, but
__how__?
Apparently it's not implemented.
Quoted 1 line
And to
_whichpurpose_?
To try to find an existing block device from the script running inside the UML instance?
I suppose I'm trying to do something strange. After all, with normal bootable kernels trying to mount NFS partitions, it would be silly to try to specify the server to attach to from the mount command rather than specifying the association at boot time on the kernel command line...
I can modify the kernel's default command line to work around this. Or possibly come up with my own patch...
Quoted 6 lines
The only way you have is:
*) ssh/(telnet) to the host
*)uml_mconsole
*) config ubd0=path (path relative to the UML cwdir at startup). Yes, this is hotplug. And it also works for network devices. It's as wonderful as it gets.
I keep thinking that when I do things like "mount -t hostfs path1 path2" that path1 actually means something. My bad.
I only recently started playing with ubd because I needed swap partitions. (You can't compile gcc 4.0.2 in 128 megs of ram. You must either specify 256 megs of ram or provide swap.)
Rob
P.S. My Firmware Linux thing had another release.
http://www.landley.net/code/firmware
If you don't feel like building from source, I have a precompiled 2.5 megabyte UML containing busybox and uClibc in a squashfs partition that's appended to the executable and automatically loopback mounted on boot via an initramfs that mounts hostfs, finds /proc/self/exe, and does the losetup and not-quite-pivot_root...
http://www.landley.net/code/firmware/downloads/base-uml
Fun little proof-of-concept, that...
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel