LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Booting linux in a multi-disk environment - bootloaders (https://www.linuxquestions.org/questions/linux-newbie-8/booting-linux-in-a-multi-disk-environment-bootloaders-930935/)

Nick_C 02-23-2012 03:18 PM

Booting linux in a multi-disk environment - bootloaders
 
I am trying to run Linux in a multi-disk environment where disk drives are often either added or removed and where the linux root path may sometimes change when other drives are plugged in.

Say for example I install it with only one drive /dev/sda and partition it as follows:
/dev/sda1 - /boot
/dev/sda2 - swap
/dev/sda3 - / root
/dev/sda4 - /home
Now when I install a couple of new disk drives I find that the linux disk has become sdc:
/dev/sdc1 - /boot
/dev/sdc2 - swap
/dev/sdc3 - / root
/dev/sdc4 - /home
And linux will not boot until the other disks are removed.

This happens even thought the linux disk is first in the BIOS boot order, and regardless of whether the lilo bootloader is written to the MBR or to the superblock of linux root partition.

Is there some other way of booting linux which avoids this problem?

TobiSGD 02-23-2012 03:34 PM

Use UUIDs instead of device descriptors, this should solve your problems. UUIDs are applied when formatting a device and never change (until the next re-format, of course).
You should be able to see the UUIDs for your device descriptors by running
Code:

ls -l /dev/disk/by-uuid

syg00 02-23-2012 05:34 PM

Nevermind - probably no boot-loader support for my suggestion.

Nick_C 02-24-2012 02:48 PM

Tried the uuid solution but still can't get it to boot with multiple disks in the system, errors with:
Code:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3)
What about Grub does that allow booting in a multi-disk environment?

syg00 02-24-2012 06:51 PM

The question is bad (all boot-loaders allow booting in a properly configured multi-disk environment), but grub2 - not classic grub - has the ability to use UUID natively (i.e. without the need for a patch or initrd/initramfs). Try that.

As an aside, current kernels also recognise UUID for partitions (not filesystems) - this means gpt formatted disks basically.

Nick_C 02-25-2012 05:47 AM

Quote:

Originally Posted by syg00 (Post 4611419)
The question is bad (all boot-loaders allow booting in a properly configured multi-disk environment), but grub2 - not classic grub - has the ability to use UUID natively (i.e. without the need for a patch or initrd/initramfs). Try that.

As an aside, current kernels also recognise UUID for partitions (not filesystems) - this means gpt formatted disks basically.

Ok lets say then trying to run linux in a variable multi-disk environment, that is where other disk drives may be inserted and/or removed.

Will try Grub2. Only thing I don't know is whether I still need to change the partition descriptors in fstab to uuid or not.

Edit
Just installed grub2, run sg2conf and wrote bootloader to MBR...
Still same problem:
Code:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3)
This is with fstab entries using uuid. Any other suggestions what to try?

Nick_C 02-25-2012 08:25 AM

Is there anything special I need to do to get grub2 to use uuid? I have used sg2conf to configure grub.

syg00 02-25-2012 03:10 PM

So we are to presume zenwalk ?.

grub2 should use UUID by default unless the option is disabled. So it depends on the (grub2) default/cfg file, and any wrapper(s) the distro choose to invoke. Perhaps try the grub-mkconfig shipped with the product.

Nick_C 02-26-2012 05:21 AM

Discovered by trial and error that CentOS uses grub2 and their implementation actually uses uuids properly.

I have installed CentOS onto a single disk, then added another couple of disks on top and doesn't seem to matter which order the disks are in it boots up fine. I can just choose the bootable drive by reordering the drives in the BIOS disk boot order, same as we have always done with windows drives.

Frankly I am surprised, and perhaps just a little disapointed, to have encountered this problem with modern linux distros. Maybe just me but I would have assumed that something this basic would have been sorted out years ago.

Anyway for the moment CentOS seems to work. Also it has a 'Virtualization Host' installation package and allows exact package selection/deselection at install time.

Never heard of Zenwalk before perhaps I should try that out to compare it to CentOS. Can anyone suggest how they compare, Zenwalk vs CentOS.

Nick_C 02-26-2012 06:17 AM

Been poking around the Zenwalk site tyrying to establish which version is most appropriate to provide the workstation virtualization host I am looking for. Then noticed mention of Zenserver has anyone used that before for virtualization?

TKH 02-26-2012 07:24 PM

You might want to add the "rootdelay" parameter to the "linux" line. To use it, just type it after the "root" parameter. This parameter gives a several seconds delay (depending on the value that you give in), giving the time for your kernel to detect the hardware.
Syntax:
Code:

rootdelay=<seconds>


All times are GMT -5. The time now is 07:22 AM.