On venerdì 11 maggio 2007, Valentin Quequet wrote:
> Hi group,
>
> I have a UML (user-mode Linux) related question :

> My problem is that I can't grasp the hostfs-related information I gather
> from around the net, especially from official sources where this topic
> seems under documented AFAIK.
>
> I would like the UML kernel to consider a host directory structure (and not
> a loop-mounted file) as its root device.

From:

http://www.landley.net/code/UML.html

This should suffice:
$ ./linux rootfstype=hostfs rw rootflags=/ 
However, the boot scripts may complain, so adding init=/bin/bash may help the 
boot to succeed, even if it will boot an "emergency system":
$ ./linux rootfstype=hostfs rw rootflags=/ init=/bin/bash
That's a first step which will help you.

> How can I do that ? For the sake of simplicity in regards of rights
> mangling by hostfs, let's assume that I run UML under the root account of
> the host.

Fine.

> I mean there is no ./boot directory since the kernel and initrd (if any)
> are loaded from outside the tree structure under /root/UMLs/Station0 .

Right.

> I don't say here whether there are the proper kernel modules installed
> under the /root/UMLs/Station0 tree matching the UML kernel I want to boot.
> Should this location be the ./usr/lib/modules/<kernel_version> tree
> subdirectory or what else?

It should be /lib/modules/<kernel version>, but you can even build a 
non-modular UML.

> QUESTION: Could you please brief me on which modules are important for
> procfs and devfs (devfs->tmpfs indeed?), and if there are some hostfs
> and/or ~host_rootfs~ modules I must put in my external initrd , and whether
> I have to put them is the /root/UMLs/Station0 tree structure or not ?

Link such modules statically. Compile statically support for procfs and tmpfs; 
devfs is gone ages ago, it was replaced by the udev program, which creates 
device nodes on a tmpfs mount. tmpfs is just a RAM-backed virtual file 
system.

Make sure that these config items are set to 'y':

CONFIG_TMPFS
CONFIG_PROC_FS

-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to