Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I build a LFS system that I use, that works well. It boots up nicely in any 64 bit computer.
If I put it in a USB enclosure it will boot up as long as there is no other hard drive in the computer.
But If there is a second hard drive it will not boot up. It kernel panics.
I've been fighting this for some time, and can't get it to boot up when there's another hard drive in the kernel. It books up looking like it's going to work, but then it kernel panics.
This problem only happens when using a USB connection.
If the "other" HD has an empty boot sector rather than boot code and partition table, does it make any difference?
I don't think any Grub version was ever designed to control other than from a specific drive position. When you make it work as a #1 drive, I doubt it can be expected to function correctly as some other.
Note that most (all?) distros intended for boot from removable media use Syslinux, not Grub.
If you have a bootloader on the system HD, and install bootloader on each USB distro's / filesystem, then you can chainload to an installation on USB from the HD, or load the installation's kernel and initrd directly either by preconfiguring to do so, or using the Grub shell instead of any Grub menuitem.
UUIDs were intended for scripts, not humans. Give your filesystems recognizable memorable labels, and refer to those instead of UUIDs in your bootloaders and fstabs if you want life to be easier.
Multiboot is complicated. It helps to simplify wherever possible. Avoiding dependence on scripts to anticipate every possibility helps. On MBR machines, Grub works for me because its Grub shell is easy to use. It does not depend on scripts to configure or anticipate.
"Non-persistent device naming using the /dev path format, in this example /dev/sdr1 is the root partition.
root=/dev/sdr1
"
What needs to be going on...
"
Persistent device naming using label and the /dev path format, in this example root_myhost is the label of the root partition.
root=/dev/disk/by-label/root_myhost
Persistent device naming using label and the LABEL= format.
root=LABEL=root_myhost
Persistent device naming using UUID and the UUID= format, in this example 1234-5678 is the UUID of the root partition
root=UUID=1234-5678
Persistent device naming using the PARTUUID and the PARTUUID= format.
root=PARTUUID=1234-5678
"
Or set bios so that the usb is now the first order in "hard drive" order in bios. NOT usb order.
Well, I had to revert a bit, as, while using the UUID method, I could no longer resume from hibernate.
So now my /boot/grub/grub.cfg is:
Code:
# Begin /boot/grub/grub.cfg
set default=1
set timeout=10
# set rootdelay=10
insmod ext2
set root=(hd0,2)
menuentry "Property of WayneSallee.com" {
linux /boot/vmlinuz-3.19-lfs-7.7 root=/dev/sda2 ro resume=/dev/sda3 rootdelay=10
initrd /boot/initrd.img-3.19.0
}
menuentry "GNU/Linux, Linux 3.19-lfs-7.7 sda setting" {
linux /boot/vmlinuz-3.19-lfs-7.7 root=/dev/sda2 ro resume=/dev/sda3 rootdelay=10
initrd /boot/initrd.img-3.19.0
}
menuentry "GNU/Linux, Linux 3.19-lfs-7.7" {
linux /boot/vmlinuz-3.19-lfs-7.7 root=UUID=50d2e935-4f21-4b1f-9363-d14c8226aa7f ro resume=UUID=dbd84ad6-9774-42d7-914c-ee8f028a3dc7 rootdelay=10
initrd /boot/initrd.img-3.19.0
}
menuentry "GNU/Linux, Linux 3.14.50-lfs-7.7" {
linux /boot/vmlinuz-3.14.50-lfs-7.7 root=UUID=50d2e935-4f21-4b1f-9363-d14c8226aa7f ro resume=UUID=dbd84ad6-9774-42d7-914c-ee8f028a3dc7 rootdelay=10
initrd /boot/initrd.img-3.14.50
}
menuentry "GNU/Linux, Linux 4.1.33-lfs-7.7" {
linux /boot/vmlinuz-4.1.33-lfs-7.7 root=UUID=50d2e935-4f21-4b1f-9363-d14c8226aa7f ro resume=UUID=dbd84ad6-9774-42d7-914c-ee8f028a3dc7 rootdelay=10
initrd /boot/initrd.img-4.1.33
}
The UUID method boots fine, but I can't return from hibernate when I use the UUID method.
I'm actually doing this with this system, and a cloned system that is slightly different. For example one system has a 4.133 kernel, and the the other has a 4.45 kernel. So I'm really not crazy when I post slightly different setups. :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.