On Tuesday 27 Jan 2004 7:21 am, Moshe Kaminsky wrote:
> Hi
>
> I'm currently in the following situation: I have two hard drives, the
> old one contains Mandrake linux and windows, and on the new one I'm
> install gentoo. They are connected to the motherboard with the same
> cable, the old one first, so that the old one corresponds to /dev/hda
> and the new one to /dev/hdb.

'Order' of drives on the IDE cable is irrelevant: hda is the one set to 
'master', hdb is the one set to 'slave', with the jumpers on the drive 
(usually between power and cable).  If the cable is plugged into the 
secondary IDE socket on the motherboard, these become hdc & hdd.

IDE             master  slave
--------------------------------------
primary    hda  hdb
secondary          hdc  hdd

> When I'm finished installing, I want to
> connect the new one with a new cable to the motherboard, and connect the
> cdrom instead with the old cable. I also want to install a bootloader on
> the new drive, and change the boot sequence in the bios to boot from the
> new one first.

I'm guessing that you will want to boot into windows occasionally?  By 
changing the BIOS to boot C:?  Windows will want to stay on C: (1st partition 
on primary master), so you are putting the new drive on secondary cable.  But 
which drive letter is this?  It depends how many partitions you have.  If 
windows is just C:, Mandrake is maybe D:, E: & F:, cdrom is G:, new drive is 
H:.  Can your BIOS boot H:?  Mine can't.

You could leave the BIOS alone (connecting the cables as you say above), and 
add an entry in your current bootloader for Gentoo on the new drive.  This 
would mean your bootloader would be on a different drive to your new OS.  
This could be a good way to migrate slowly.

The next stage would be to install a new bootloader on the new drive, 
imagining it to be /dev/hda.  Include entries for Mandrake and windows, 
imagining them to be /dev/hdc.  This might involve mapping drives to fool 
windows that it is on C: though I haven't tried this (I use a switch 
connected to the jumpers on my drives via cdrom audio cables, to swap master 
& slave -- soldering iron required).  Then reconnect as follows;-

Connect the new one as master to the primary IDE socket (probably the one 
already being used) ie change the jumper to master.
Connect the old one as master to the secondary IDE socket.
Connect the cdrom as slave to the secondary IDE socket.
In this case booting C: will boot the new drive.

> Now, finally, my question is: how all this affects the mapping of the
> physical drive to the files (/dev/hd*)? What happens if I install the
> bootloader before changing the physical configuration?

You are currently using a bootloader installed in the mbr (master boot record) 
of your old drive.  If you install a new bootloader in the mbr of your new 
drive, it will only be used when you boot from your new drive.  If you then 
change the configuration to have the new drive on the primary IDE, it will 
boot using the new bootloader (BIOS still set to C:).
MAKE SURE THAT: /etc/lilo.conf & /etc/fstab (maybe other files too) refer to 
new configuration.

> is there a difference between lilo and grub with respect to these questions?

a)      Lilo refers to disks with /dev/hd[0..4]n (n is (optional) partition 
number).  I think grub doesn't use hd[a..d], but (hd[0..4],n); see 
info:/grub/Naming convention.
b)      If you have /dev/hda, /dev/hdc & /dev/hdd, I think grub uses (hd0), (hd1) & 
(hd2). (only what I understand from docs)
c)      After changing /etc/lilo.conf you have to run /sbin/lilo.  With grub you 
just edit the config file.

HTH
-- 
Nick


--
[EMAIL PROTECTED] mailing list

Reply via email to