Package: initramfs-tools
Version: 0.140
Severity: wishlist

When the config files specify MODULES=dep, update-initramfs
tries to autodetect which modules to load. To do this, all of
/proc/, /sys/, and /dev/ must be mounted. If either /proc/ or
/sys/ isn't mounted, update-initramfs fails with an error
message which explicitly mentions a filename in /proc/ or
/sys/, cluing the user in to what they forgot. However if
/dev/ is not mounted, the error is a generic one:
"mkinitramfs: failed to determine device for /".

Obviously this is user error, but I think it would be helpful
if update-initramfs explicitly complained about missing
/dev/, or at least that it failed to find a specific file in /dev/.

I think because update-initramfs is a tool you might
need to run in a weird situation where you're trying to
rescue a non-booting system it's perhaps worth checking
for something it would clearly not make sense to check
in a more average tool that can just assume the system
is in a sane state.

The situation where I ran into this was that on moving a
disk to new hardware I needed to rebuild the initrd to
get it to boot. So I booted a livecd, mounted the disk,
chrooted into it and ran update-initramfs. Once I
realised I'd forgotten to mount or bind-mount all these
other things into the chroot it worked fine :-)

thanks
-- PMM

Reply via email to