Operating System - Linux
1753701 Members
4845 Online
108799 Solutions
New Discussion юеВ

Re: making Linux HD Primary Master FROM Secondary Master

 
icedT
Frequent Advisor

making Linux HD Primary Master FROM Secondary Master

hi. just a confusion. . . can i make my Linux HD the Primary master from its current setup (secondary master)? My current setup now is WinXP primary master, Secondary Master Linux HD and Secondary slave is CDROM. . now i want to interchange the location my WInxp and Linux HD.
16 REPLIES 16
Ivan Ferreira
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

Are you talking about physically swapping drives? Yes you can.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Stuart Browne
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

Just be aware that if you do this, you'll need to mark the appropraite partition on the secondary master to be an 'Active' partition, and ensure it has a boot-loader (grub) installed into it's master-boot-record.
One long-haired git at your service...
icedT
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

okay.. my bootloader is LILO.. but wait isn't that IF i interchange them i MUST edit my lilo for the partitions involved? the primary hd (windows) is read as, hda (hda1 hda5) C: and D:
while my linux is read as hdc*
Ivan Ferreira
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

Yes, you have to edit your configuration files where the devices/partitions change. LILO and /etc/fstab are these files. You also probably need to re-install lilo after the disks changes, and modify the boot and root statements as required.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Matti_Kurkela
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

Note that in Linux, IDE HDs are named according to their position on the bus, i.e.
/dev/hda = Primary Master
/dev/hdb = Primary Slave
/dev/hdc = Secondary Master
/dev/hdd = Secondary Slave
etc.

So, when you physically swap the disks around, your old /dev/hda will become /dev/hdc and vice versa.

As others have indicated, you'll have to re-configure your LILO bootloader.

Activating the correct partition may or may not be necessary: if LILO is installed in the Master Boot Record of the new disk, it can run things from any partition regardless of whether the partition is active or not. But if LILO is installed to the boot record of the individual Linux partition, that partition needs to be marked active so that the MBR will find and activate LILO.

You'll also have to check your /etc/fstab file in Linux. If your partitions have been identified using /dev/hd* style names, you must change them to match the new situation. If your /etc/fstab is using "LABEL=..." or "UUID=..." style definitions for Linux partitions, the system should be able to find the correct Linux partitions with no changes required.

Note that your WinXP may become very confused if you change the disks around.

MK
MK
icedT
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

hmm sounds risky. . .i think i will not anymore move my Linux HD. . . It may be a one hell of a problem if i attempt to do that. . :(
icedT
Frequent Advisor

Re: making Linux HD Primary Master FROM Secondary Master

ei guys.. WHAT IF.. i just stick to my current CMOS setup. Primary Master -WInxp and Secondary Master LInux.. BUT since my winxp does not boot (hangs)THEN outputs binary number(0,1)when i disconnected the Secondary Master HD.


the concern happened when i changed the battery of my motherboard.

Now i just want to completely format my winxp HD.. and since you guys said that primary master is read as /hda* then is there a clear possibility that I will be successful in my attempt? (since after reinstalling winxp,) linux will still read my windows hd..
Matti_Kurkela
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

It's hard to know for sure, from the little bits of information you've told so far.

It would be easier to analyze the situation if you could show us all of the following:
- the output of "fdisk -l /dev/hda" in Linux
- the output of "fdisk -l /dev/hdc" in Linux
- the contents of your /etc/lilo.conf file
- the contents of your Windows C:\BOOT.INI file (it may be hidden, so it might be easiest to find it using Linux)

In an IDE system, the BIOS normally boots the system from the first disk it finds. Some BIOSes have an option to change this.

In some older machines the boot order was specified using DOS-style C: and D: drive letters, so the actual meaning was quite obscure. "Boot from C:" meant "boot from the first detected hard disk", just as usual. But "Boot from D:" meant "find the first two bootable disks, swap them around so that the second bootable disk is presented to the OS (or bootloader like LILO) as the first one, then boot from it." With DOS, this actually causes the C: and D: drive letters to switch places.

Using the BIOS "Boot from D:" option with modern operating systems just causes lots of confusion since the BIOS can fool the bootloader but not the actual OS.

You say your WinXP boot started to fail after the failure of the motherboard battery. This suggests your BIOS's boot disk selection option might have had been set to a non-default value originally. The battery failure probably caused a reset to default values.

What I cannot understand as yet is how your LILO bootloader still works after the battery failure...

By "binary numbers" do you mean a repeated string like "01 01 01..."? This is actually a LILO error message, and it means BIOS is not liking the commands LILO is trying to use.

This suggests your LILO may be installed on the Primary Master disk BUT gets its configuration and other data from the Secondary Master disk. If so, wiping either of the two disks is likely to make the system unbootable unless some preparations are made in advance.

We'll need all the information I asked above to plan a way to straighten this.

You might want to download and burn yourself a Knoppix Live CD: it's a Linux installation that is completely self-contained on a CD-ROM, using RAM disk as a work area. It has a lot of tools available, so it allows you to do some serious system surgery if necessary.
See:
http://www.knoppix.org

MK
MK
Andrew Cowan
Honored Contributor

Re: making Linux HD Primary Master FROM Secondary Master

When you say swap your drives, do mean physically? If so you need to swap the jumpers on the, or change their sockets if they are installed with "cable select".

Remember that both Grub and the BIOS can only report what they see, and not physically change it.

If you swap the jumpers/cables, you now need to edit Grub and the Windows boot loader to point to the new locations.