On Monday 24 October 2005 18:24, Blaisorblade wrote:
> On Saturday 22 October 2005 20:18, Rob Landley wrote:
> > 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,
>
> 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.

> > but I
> > was under the impression I could associate them from "mount" as well..?
>
> Sorry, but __how__?

Apparently it's not implemented.

> And to _which purpose_? 

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...

> 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

Reply via email to