[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

run-init: nuking initramfs contents: Directory not empty


I have observed the following symptoms when booting a vanilla kernel with an initramfs (created with `mkinitramfs -o /boot/initrd.img-') on an etch (on a PC).

mount: Mounting /dev on /root/dev failed: Invalid argument
run-init: nuking initramfs contents: Directory not empty

The last error causes the end of the boot process with a kernel panic.

I found several messages on the internet (especially on Ubuntu forums) describing the same symptoms.

I ended up adding traces to run-init from the klibc 1.4.34 package. This showed there was a problem when trying to remove /dev/.static/dev/.

It appears that scripts/init-bottom/udev executes
  mount -n -o bind /root/dev /dev/.static/dev
This is most likely the immediate cause for the run-init failure to remove this directory, which in turn causes the kernel panic.

I do not know if this is actually related to the version of the kernel. I do not know the fundamental issue. As a consequence,  the following solution is probably more of a hack than a real fix. However, some people might find it useful.

You can try to prevent scripts/init-bottom/udev from executing the problematic mount command by changing a configuration option the following way:

# Unpack the initramfs
mkdir initrd-
cd initrd-
gunzip -c /boot/initrd.img- | cpio -idv

# Add the option
echo 'no_static_dev=1' >> etc/udev/udev.conf

# Create the new initramfs archive and install it
find | cpio --quiet --dereference -o -H newc | gzip -9 \
  > ../initrd.img-
cp -p /boot/initrd.img- /boot/initrd.img-
install -oroot -groot -m644 ../initrd.img- /boot/

This allowed the OS to boot and work flawlessly. However, I obviously cannot guarantee this will work in all set-ups.


Note: I did not subscribe to the debian-user list.

Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Reply to: