Author Topic: Grub confusion with mixed sata and IDE drives  (Read 863 times)

Online ThirdOfSix

  • Hero Member
  • *****
  • Posts: 745
Grub confusion with mixed sata and IDE drives
« on: February 02, 2010, 07:53:33 PM »
The confusion is mine not the computer's.

I recently installed and internal SATA drive on my machine that I normally use only removable IDE drives in removable drive bays.

I set the Bios to boot from the SATA drive by setting it to first boot from a SCSI hard drive.

Now I want to set grub in that SATA drive to chainload the grub on whatever IDE drive I put in the drive bay.

I can not get it to work. I thought that I would just need to add a stanza in the menu.lst file on the SATA drive.

I have tried about every permutation of a stanza that I can think of.

Every search turns up the usual Windows remapping stanza but not how you do it when both drives have only Linux.

And, before anyone asks, I don't want to have to tell the calling grub what is on the IDE drive since I swap them frequently.

I know that I have done this before by accident. One of the installers on one distribution just did it without me intending for it to happen.

The difference is that now, for the first time, I have a SATA drive on this machine which must be set as the boot drive since it is the internal drive.

All suggestions appreciated.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Grub confusion with mixed sata and IDE drives
« Reply #1 on: February 02, 2010, 08:11:12 PM »
The confusion is mine not the computer's.

I recently installed and internal SATA drive on my machine that I normally use only removable IDE drives in removable drive bays.

I set the Bios to boot from the SATA drive by setting it to first boot from a SCSI hard drive.

Now I want to set grub in that SATA drive to chainload the grub on whatever IDE drive I put in the drive bay.

I can not get it to work. I thought that I would just need to add a stanza in the menu.lst file on the SATA drive.

I have tried about every permutation of a stanza that I can think of.

Every search turns up the usual Windows remapping stanza but not how you do it when both drives have only Linux.

And, before anyone asks, I don't want to have to tell the calling grub what is on the IDE drive since I swap them frequently.

I know that I have done this before by accident. One of the installers on one distribution just did it without me intending for it to happen.

The difference is that now, for the first time, I have a SATA drive on this machine which must be set as the boot drive since it is the internal drive.

All suggestions appreciated.


Not true. (The blue lettered statement above.) I had 4 removable drive bays in my other computer, and one fixed internal drive, and could boot from whichever of them was designated as the boot drive. A drive in a IDE drive bay is still considered by the machine to be an internal drive. Actually it works better to have the drive bay hard drives be the boot drives, if there's just one bay for their use. That drive, whichever is currently in place, will be (hd0) and the SATA drive will always be (hd1). The menu.lst for each IDE drive will have to have a stanza to boot whatever is on the SATA drive, but the same stanza can be copied to each of the IDE menu.lsts; it won't change.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Online ThirdOfSix

  • Hero Member
  • *****
  • Posts: 745
Re: Grub confusion with mixed sata and IDE drives
« Reply #2 on: February 02, 2010, 08:50:32 PM »
Thanks, I was afraid that you were going to say that.

I was hoping to be able to take any drive that normally boots on the system maybe with two or three distributions on it and just plug it in and be able to select it from the boot menu without making any changes to it at all.

I thought that I would be able to do this just by modifying the menu.lst.

Linux is so nice compared to Windows in that you can frequently take a drive with a running Linux install and plop it into a different machine and it just works.

I was hoping to be able to swap them between machines on occasion without making any changes.

But, as easy as it is to modify a menu.lst, I guess there really isn't that much value in doing it that way.

But, I still don't understand why it won't work.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Grub confusion with mixed sata and IDE drives
« Reply #3 on: February 02, 2010, 11:46:56 PM »
Thanks, I was afraid that you were going to say that.

I was hoping to be able to take any drive that normally boots on the system maybe with two or three distributions on it and just plug it in and be able to select it from the boot menu without making any changes to it at all.

I thought that I would be able to do this just by modifying the menu.lst.

Linux is so nice compared to Windows in that you can frequently take a drive with a running Linux install and plop it into a different machine and it just works.

I was hoping to be able to swap them between machines on occasion without making any changes.

But, as easy as it is to modify a menu.lst, I guess there really isn't that much value in doing it that way.

But, I still don't understand why it won't work.

Being able to move my hard drives between machines was what prompted me to get the removable bays. I had three computer shells in three cities that I circulated between. One machine had 4 bays, and the others each had three. Whenever I changed cities I just put the caddies in a carry case, then inserted them in the waiting shell, at the new location. That way I always had the same desktops, and same applications, and everything was always in the same relative place. When I stopped moving between cities, I kept the best of the three shells, and never bothered to change anything else. I pulled the bays from the other two, as replacements, in case of breakage.

When I rebuilt the machine, USB/E-SATA external drives were common, and easier to use than the removable bays, as every modern computer has at least USB sockets, so that's what I use now. I still have one removable bay in one machine, but the same hard drive is in it almost all the time. Most of my installations are on the external drives now. The one I'm typing this from is on the third partition of a 1 TB SATA drive in a USB/E-SATA case. This particular computer has no SATA connectors, so I'm using the USB connection. There are four other computers in the house, that have E-SATA connectors so I use the E-SATA cable with them.

The main reason for having the IDE drives being the boot drives is so that you don't have to change the settings in each menu.lst. If they are always (hd0) they are ready to boot in any machine. If they are (hd1) on your current machine, everything would need to be changed if you wanted to boot from that drive in another machine, then changed back when inserted in the current machine.
« Last Edit: February 03, 2010, 03:42:18 AM by old-polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline DeBaas

  • Hero Member
  • *****
  • Posts: 1522
    • PCLinuxOS.nl
Re: Grub confusion with mixed sata and IDE drives
« Reply #4 on: February 03, 2010, 02:59:58 AM »
Maybe you can use the fallback option ?
example:

timeout 5

color light-gray/red red/light-gray

gfxmenu (hd1,4)/boot/gfxmenu

default 0

fallback 1 2 3


title 2.6.32.2-pclos5
kernel (hd2,4)/boot/vmlinuz-2.6.32.2-pclos5 BOOT_IMAGE=2.6.32.2-pclos5 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788
initrd (hd2,4)/boot/initrd-2.6.32.2-pclos5.img

title 2.6.32.2-pclos5

kernel (hd1,4)/boot/vmlinuz-2.6.32.2-pclos5 BOOT_IMAGE=2.6.32.2-pclos5 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788

initrd (hd1,4)/boot/initrd-2.6.32.2-pclos5.img



title 2.6.32.2-pclos5

kernel (hd0,4)/boot/vmlinuz-2.6.32.2-pclos5 BOOT_IMAGE=2.6.32.2-pclos5 root=UUID=a1a74e10-9c73-418c-88e6-8659ede37838 acpi=on resume=UUID=eb2996c5-3be0-4487-9763-b25c4d54102b splash=silent vga=788

initrd (hd0,4)/boot/initrd-2.6.32.2-pclos5.img