Comment 0 for bug 309762

Revision history for this message
Marques Johansson (marques) wrote :

Binary package hint: initramfs-tools

The init scripts in initramfs do not mount an ext4 root partition, this leaves the user stuck at an (initram) prompt at a point that is too late for the user to correct matters. There are a few TODO notes in the local script that mention that there is not error handling when the FSTYPE detection or root mount fails. This should be addressed.

When dropped to the (initram) I was able to "modprobe ext4; mount /dev/sda1 /root", but attempting to run "exec init", resulted in a Kernel Panic.

The init local script had continued running past the root mount failure, so commands like these:
mount -n --bind /root/dev /dev/.static/dev
mount -n --move /dev /mnt/dev
mount -n --move /proc /mnt/proc
mount -n --move /sys /mnt/sys
had already been attempted before I could intervene and manually mount root. Running them myself, and trying to finish off the local script (which ends with something like "exec run-init .... </root/dev/console > /root/dev/console ... " resulted in a kernel panic that /root/dev/console could not be found.

I do not know why the ext4 mount was successfully mounted, but I was able to work around this by adding a /etc/initramfs-tools/scripts/local-bottom/custom_mount_ext4 scripts:
#! /bin/sh
modprobe ext4
mount /dev/sda1 /root
mount /dev/disk/by-uuid/..... /root

I also added the script to local-top. I am mounting it twice and in both locations because I'm not sure which one worked. The first attempt I made at this workaround was to do "modprobe ext4; mount /dev/sda1 /root" from local-top. That gave the error that /dev/sda1 was not a device file - I suppose that is created later script. It existed by the time I got the (initramfs) prompt.