[Pkg-uml-devel] Re: [uml-user] rootstrap problems

Blaisorblade blaisorblade at yahoo.it
Thu Jan 12 00:04:14 UTC 2006


On Wednesday 11 January 2006 22:58, Andreas Schuldei wrote:
> hi!
>
> i am hacking on rootstrap here. for those unfamiliar with
> rootstrap: it is a bunch of python and shell scripts to create a
> new root filessytem image. it does that by running a uml and
> mounting the host's / filesystem as / using hostfs.

> i try to do two things: fix the problem with

> request_module: runaway loop 
It's recursively trying to load
> modprobe net-pf-1  

recompile UML with make defconfig - you have a screwed config. Guess Unix 
Domain sockets are disabled or modular, which is often not nice.

> modprobe: FATAL: Could not load /lib/modules/2.6.12/modules.dep: No such
> file or directory

> (since on debian the hostfs has the uml modules in
> /usr/lib/uml/modules and the uml kernel expects them at
> /lib/modules).

If the guest packages are such, they're silly. However, the best thing is to 
first have a non-modular setup for the kernel, and afterwards get modules 
working.

> and i try to make rootstrap not depend on devfs. (currently
> rootstrap still uses the devfs=mount option.)

> I try to solve the first problem by adding a line
> os.system("mount --bind /usr/lib/uml/modules /lib/modules") at
> the beginning of the initialisation code in
> /usr/lib/rootstrap/builder (which runs as an init replacement in
> the uml).
>
> I still get the above error when starting up, but that is because
> I mount this AFTER the modprobe process got dispatched.  Later on
> modprobe finds the module and it works and the error goes away.
> It would be best to add the bind-mount command on the uml command
> line, somehow. Does anyone know how that could work?

ln -s /usr/lib/uml/modules /lib/modules ?

> Alternatively one could try to set the enrivonment variable
> MODPROBE_OPTIONS, redirecting modprobe to /usr/lib/uml/modules.
> It is not clear to me what the variable should contain, though
> and it would have the same startup problem. Or can i specify
> environment vars on the uml commandline?

Yep, like for normal kernel. VAR=value on the cmd line.

They're passed to init, but some process (login ?) clears the env for its 
child. Probably they are retained for init scripts, not sure however.

> The second problem with devfs seems trickier. devfs used to
> clobber /dev and a /dev/ubd/disc1 was garanteed to be present
> (and used with mkfs and mount later on). If rootstrap uses the
> host's /dev it can not rely on /dev/ubdX to be present, since
> those devices are non-standard.
Host means "physical machine" - it's not expected to have /dev/ubd* or such. 
You maybe talk about the guest (UML machine)?

> Even when I create those in my 
> host's /dev/, I get oopses (which I did not have when using
> devfs).
The

> such a oops looks like this:

This is not an oops.

> idr_remove called for id=3 which is not allocated.
> a08ffa1c:  [<a00aa8a0>] sub_remove+0xc6/0xcf
> a08ffa58:  [<a00aa8c7>] idr_remove+0x1e/0x84
> a08ffa70:  [<a00b439f>] release_dev+0x567/0x580
> a08ffadc:  [<a00b3b98>] init_dev+0x3d5/0x4f8
> a08ffb20:  [<a00b4576>] tty_open+0x1be/0x30b
> a08ffb2c:  [<a00aad62>] kobject_get+0x12/0x17
> a08ffb38:  [<a0065320>] cdev_get+0x20/0x46
> a08ffb48:  [<a00654cd>] exact_lock+0x9/0x10
> a08ffb4c:  [<a00bcbad>] kobj_lookup+0xe9/0x135
> a08ffb74:  [<a006544d>] chrdev_open+0xd7/0xf0
> a08ffb94:  [<a005d5df>] dentry_open+0xbe/0x187
> a08ffbb0:  [<a005d519>] filp_open+0x41/0x49
> a08ffbcc:  [<a0018981>] strncpy_chunk_from_user+0x0/0x4f
> a08ffbf0:  [<a005d6fb>] get_unused_fd+0x53/0x99
> a08ffc04:  [<a005d7d9>] sys_open+0x32/0x68
> a08ffc20:  [<a001830a>] execute_syscall_skas+0xde/0xe8
> a08ffc98:  [<a0018327>] handle_syscall+0x13/0x24
> a08ffcac:  [<a0017b05>] userspace+0x21e/0x25b
> a08ffce0:  [<a00184e6>] force_flush_all_skas+0x1f/0x25
> a08ffcfc:  [<a0018060>] fork_handler+0xb6/0xba
> a08ffd5c:  [<a0125a11>] __kill+0x11/0x20

> what exactly does this mean? how can i fix it?
To my knowledge (seeing one other user getting it, the CC'ed Rob Landley) 
ignore it since _this_ doesn't give any problem

> since udev is a fat userspace program with lots of config etc i
> dont expect using it will fix the problem. or would it? if so,
> how?

Just use it (on the guest) - it gets all its data from the kernel, and it 
would auto-create /dev/ubda and such (for defined drives) in the guest.

-- 
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! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it




More information about the Pkg-uml-devel mailing list