LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing boot parameters in grub (https://www.linuxquestions.org/questions/linux-newbie-8/changing-boot-parameters-in-grub-729704/)

archp2008 05-31-2009 02:46 PM

Changing boot parameters in grub
 
Hello,

I have my Linux Mint booting successfully when it's installed on one of two SATA drives. There is also a fourth drive (an IDE). I order to get it to work I have to disconnect the third SATA drive. The boot parameters in grub for that are working now for just the two SATA drives (plus the IDE drive) are (hd0,1). If I reconnect my third SATA drive, which I would like to do, Mint will not boot. I have had this problem before and it took me a very long time to find the parameters that would work when I added the second SATA drive. Can someone please tell me what (hd0,1) should be changed to for Linux to boot when the third SATA drive is re-connected. I have no idea how to ascertain what the drive numbers are, and I don't understand the significance of (hd0,1). Thanks in advance for any assistance on this.

pixellany 05-31-2009 03:38 PM

Welcome to LQ---this sounds like a known issue with mixed SATA and IDE drives. There are at least two solutions:

1. Use the UUID designation for the drives.

2. Figure out how the drives are being mapped and adjust /boot/grub/menu.lst accordingly.

To see if you have UUID, go to /dev/disk. There will be 3 folders:
by-id by-path by-uuid

To have grub use the UUID, use this in the kernel line in menu.lst:
root=/dev/disk/by-uuid/<uuid_of_your_partition>

The (hdX,Y) form is the GRUB equivalent of sda1, hda2, etc. Because grub counts from zero, the numbering is different---for example:
/dev/sda1 = (hd0,0)

/dev/hdb3 = (hd1,2)

archp2008 06-01-2009 05:32 AM

Thanks for the reply and the welcome. I looked into UUID but don't know what drives these numbers correspond with. In labels the names are familiar as they are the same as in Windows, but the Linux partitions are not named. My menu.1st has ... root=dev/sda2 I can easily figure out the ID of the drives by the physical size. Mint is on the 640 gb drive which is shown having 7 partitions, but I don't know what is on each one. I presume, but I'm not sure, that Mint itself is installed on the first 3 partitions. How do I find the sd and hd designations for the drives? I thought that all I had to do was to change the (hd0,1) so that the 0,1 are different numbers.

syg00 06-01-2009 05:49 AM

Go get this, run it and post the RESULTS.txt it generates.
That way we'll know your setup and won't have to guess.

archp2008 06-01-2009 01:02 PM

1 Attachment(s)
Thanks for this. Remember I had to disconnect one of the SATA drives to boot into Linux. This is what I get with that one drive disconnected.

syg00 06-01-2009 09:40 PM

Stick the other drive in and re-run the script from a liveCD - let's see the RESULTS.txt from that as well.

archp2008 06-02-2009 08:46 AM

1 Attachment(s)
The attached file is from Ubuntu with all drives attached.Attachment 751

syg00 06-03-2009 12:04 AM

Did you have a look at those listings ?.
Adding that disk has changed the (BIOS) addressing: was
Code:

/dev/sda -> the 640 Gig (with Mint presumably)
/dev/sdb -> The Terabyte
/dev/sdc -> the 80 Gig

becomes:
Code:

/dev/sda -> the 80 Gig
/dev/sdb -> the 320 Gig
/dev/sdc -> the 640 Gig
/dev/sdd -> The Terabyte

I'd be thinking you are going to have to by by-id to get around something like this.

archp2008 06-03-2009 05:01 PM

Thanks for looking at this again. Can I do this? Sorry, I don't catch on to what you mean by, "by by-id."

jamescondron 06-03-2009 05:13 PM

Code:

ls -al /dev/disk/by-uuid/
These symlinks will tell you which disks have what uuid. If you can't work out which is which by the /dev/xxx stuff, mount them, see whats what.

syg00 06-03-2009 06:57 PM

Ubuntu (and thus presumably Mint) supports UUID in the initrd, so might be the better option for you. You can use UUID to define the (grub) root, and also root=UUID=?????? for the mount in menu.lst. I don't like it because UUIDs can change - especially swap if you happen to install a second distro.
Doesn't help with the boot disk (sda) changing device though - its hard to write the (latter) MBR to point to the correct partition.

(BTW, by-id is also under /dev/disk)

archp2008 06-03-2009 07:49 PM

arch@arch-desktop:~$ ls -al /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 340 2009-06-03 19:42 .
drwxr-xr-x 6 root root 120 2009-06-03 19:42 ..
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 0628CBA728CB9459 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 0E08F98808F96F59 -> ../../sda5
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 1EA8E047A8E01ED1 -> ../../sdb2
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 1f934d65-618f-4cb3-8e06-301f265e79d0 -> ../../sdc2
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 226AA1626AA13407 -> ../../sdd3
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 3e854ee7-c2d9-4eed-a70b-ab742c2a88e2 -> ../../sdb5
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 44E130AFA8CEA628 -> ../../sdc5
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 5560f64f-217b-4cbb-9fcc-5c10b810118c -> ../../sdc3
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 5A0C57E40C57BA29 -> ../../sdd4
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 7890BA4190BA05A2 -> ../../sdd1
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 901C34721C345606 -> ../../sdc6
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 96E4E85AE4E83DDD -> ../../sdd2
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 d23f4423-71f5-4588-a9d3-2845cacce7d2 -> ../../sdb6
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 ECE3E8C52282B5B6 -> ../../sda6
lrwxrwxrwx 1 root root 10 2009-06-03 19:42 fb9eb8d8-2756-4703-9af5-477dce4d476c -> ../../sdc1
arch@arch-desktop:~$

archp2008 06-03-2009 07:53 PM

Sorry, if you haven't figured it out by now, I'm totally illiterate in Linux. You will need to tell me exactly what to change in menu.1st for Mint. Unless I Google it, I don't even know what to do to "mount" a disk.

archp2008 06-05-2009 03:14 PM

Is all that I have to do is to type in "root=UUID=??????" substituting the the UUID numbers for the ????? for the drive that Mint is installed on? I'm about to try installing a new Windows OS on my IDE drive. I guess that won't screw things up any further. If I have to unplug the first SATA drive to get MINT, it's not a big deal, just another annoyance.


All times are GMT -5. The time now is 06:36 AM.