[blfs-support] kernel panic when booting with connected external disk

Michael Shell list1 at michaelshell.org
Mon Mar 18 12:17:01 PDT 2013

On Mon, 18 Mar 2013 16:39:34 +0000
Ken Moffat <zarniwhoop at ntlworld.com> wrote:

> I guess the difference is that ubuntu uses an initrd or initramfs,
> so its initial rootfs is not the ubuntu disk filesystem, and it can
> load enough of userspace to mount by UUID.

His ubuntu installation did originally use the UUID specifier for
the boot target, but he has since changed his grub config to use
conventional device labels:

menuentry "Ubuntu-12" {
  insmod ext3
set root='(hd0,1)'
  linux (hd0,2)/boot/vmlinuz-3.5.0-17-generic root=/dev/sda2 rw
#  linux (hd0,2)/boot/vmlinuz-3.5.0-17-generic root=UUID=172571a7-b547-4c90-a49c-f0128b784d6e ro 

So, it seems sda5's naming is being affected by the external drive, but
not sda2. That's what causes me to suspect that sda5's being a logical
partition might be a factor.

> I wouldn't attempt to *boot* an LFS system with any sort of external
> disk connected (hard disk, stick, whatever) because I think the order
> in which things show up will be random. Probably consistent for one
> kernel/config, but likely to change for a different kernel or a
> different config.

And here, I think, lies the crux of the problem at hand.

Call me old-fashioned, but if I were the one who controlled
how things work, I would never allow a USB (or other hot-pluggable)
device to affect the device naming of "fixed/internal" devices.

In the old days, hard drives had their hdx namespace and floppies
had theirs - fdx. I'd have usb drives get udx or rdx (usb or use
the more general case of removable disk).

What the powers-that-be want is for any drive in the system to
be treated like any other - why should usb devices get treated
differently from "fixed" disks? This is an understandable goal,
and one I would be totally onboard with - *IF* udev functionality
was considered to be part of the kernel rather than live in user
space. As it is now, we have two - now three - different device
naming conventions - (1) what the kernel does on startup, 
(2) UUID, PARTUUID, etc. and (3) what udev does according to
its rule set.

That's what caused the need for UUID and PARTUUID in the first
place - to bring some needed udev-like functionality into
the kernel because it really is needed earlier in the boot
process - a way to reliably specify "this device" when so
many devices can be plugged or unplugged from the system
at any moment.

I'd have udev be part of the kernel and its initial user-defined
rule set would be brought in at the same time and from
the same place when the boot image is loaded - one set of names
that can handle every case and used from the very beginning.



More information about the blfs-support mailing list