LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Double boot system (XP and Etch) and grub (http://www.linuxquestions.org/questions/linux-newbie-8/double-boot-system-xp-and-etch-and-grub-594931/)

fof3 10-26-2007 11:09 PM

Double boot system (XP and Etch) and grub
 
I have Etch on a SATA drive.
I want to install XP on another SATA drive.
From past experience with Windows it wants to take priority; and to install the MBR on its drive.
Do I need to set Master and Slave settings?
How do I use grub to get Etch re-recognized? -- I was once told to use, for example, the first disc of an Etch install; get to the point where it wants to partition; doa Alt-Ctrl-F3 to get into a BusyBox console; see what is mounted with 'mount'; make a directory called 'target'; mount the partition that seems to contain the Etch boot directory; and then do 'grub'.
Does any of that make sense; or is there a better way?

larkl 10-27-2007 06:42 AM

I don't understand the busybox stuff (?), but I can tell you that I've had the best luck installing windows to the master, THEN moving this drive to the slave (changing the jumpers or whatever you have to do with SATA). Then install linux distro on the (new) master. If you're lucky it'll set up grub correctly. Since you already have a working linux, and if I understand that XP is not installed, I think you need to remove the linux drive and install XP on the master. My experience is the same - Windows will overwrite the MBR on the master drive. After windows is done, move it to the slave and get grub set up manually.

bigrigdriver 10-27-2007 07:38 AM

Unplug the computer and open the box. Unplug the drive with Etch installed on it. Set the jumper on the second drive to Master.

Plug everything in and power up. Immediately go into the BIOS. Set the boot order to: cd/dvd drive first, and the hard drive second.

Set the CMOS settings to show the hard drive as Primary Master (the BIOS won't see the Etch drive because it's disconnected).

Put the windows install cd in the drive, save the BIOS settings and exit. The windows install cd should boot up.

Install windows, writing the bootloader to the MBR of the new drive. Once installation is complete and windows boots properly, shutdown and open the box again.

Reconnect the Etch drive, setting the jumper to Primary Master. Set the jumper on the windows drive to Primary Slave.

Power up and go into the BIOS again. Set the boot order to cd/dvd drive first, Etch drive second, windows third. Set the CMOS to show Etch as Primary Master and windows an Primary Slave. Save and exit.

Boot process continues, and you should see the grub menu with only Etch as an option to boot.

When Etch is up and running, edit the grub config file to add an entry for windows.

title Windows XP
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

Save and exit. Now reboot and satisfy yourself that windows is in the grub menu, and that you can boot windows my selecting it from the menu and pressing <enter>.

fof3 10-27-2007 07:46 PM

Following your instructions I got a dual boot system on my daughter's machine. Thank You.
However, I never get past a light blue screen on Windows; and in the BIOS set-up I can't change anything; with only a "View only" message???


/boot/grub/menu.list

title Debian GNU/Linux, kernel 2.6.18-5-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.18-5-686
savedefault

title Debian GNU/Linux, kernel 2.6.18-5-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.18-5-686
savedefault

title Debian GNU/Linux, kernel 2.6.18-4-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.18-4-686
savedefault

title Debian GNU/Linux, kernel 2.6.18-4-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.18-4-686
savedefault

title Windows XP
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

syg00 10-27-2007 08:04 PM

From a terminal, let's see the output of "/sbin/fdisk -l" (lower case ell)

fof3 10-27-2007 08:43 PM

money:/home/elisa# /sbin/fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 30071 241545276 83 Linux
/dev/sda2 30072 30401 2650725 5 Extended
/dev/sda5 30072 30401 2650693+ 82 Linux swap / Solaris

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30400 244187968+ 7 HPFS/NTFS

syg00 10-27-2007 08:57 PM

Try "rootnoverify (hd1,0)" in place of "root (hd1,0)".
If still no-go, more information - does Windoze actually start to load, any messages.

BB_DaKraxor 10-27-2007 10:02 PM

Hey,

I belive
Code:

map (hd0) (hd1)
map (hd1) (hd0)

exchanges the order between the first hard disk and the second hard disk. You should either change root(hd1,0) to root(hd0,0) or erase the map commands.

syg00 10-27-2007 10:38 PM

no, I think @bigrigdriver is right. The ntldr only cares about being booted off the (BIOS) boot disk. Hence the need for the maps to fool it. Not since Win95 (maybe the original Win98 as well) has the M$oft loader cared about the partition number - just so long as it's a primary.

BB_DaKraxor 10-28-2007 07:35 AM

I was just guessing...

saikee 10-28-2007 08:05 AM

bigrigdriver and syg00 instructions have withstood test of time.

The OP does have a dual boot system except the XP doesn't boot.

I think the best course of action is to temporarily disable the Linux disk sda electrically, say by pulling off the power supply to it. This will make the Windows disk to take up the sda position and should boot if it has been correctly installed.

I couldn't fault the menu.lst commands on the booting the XP choice myself. I never use "rootnoverify" myself. It may cost Grub to spend an extra 30 nano seconds to verify it and declare it as an unknown system because Grub can't read a ntfs partition. The sdb1 has been marked bootable (with a *) and it should fire up if it is a healthy system.

blackhole54 10-28-2007 08:47 AM

Quote:

Originally Posted by saikee (Post 2939630)
I think the best course of action is to temporarily disable the Linux disk sda electrically, say by pulling off the power supply to it.

Is an unpowered device guaranteed to maintain a high impedance state on the bus? I was always under the impression that leaving the data cable connected to an unpowered device was asking for flaky behavior.

EDIT: Or is it all one cable on SATA?

saikee 10-28-2007 09:18 AM

blackhole54,

I don't actually know the answer but I expect the designer of the hard disk has to take into account that there could be a loose connection at the power supply and there should be sufficient impedance in the circuit board of the hard disk to withstand the digital signals from the data cable for a long duration.

Sata always has its own power supply cable. Some use the same 4-pin connector as a Pata hard disk and CD drive but a more sophisticated one is available on some models to do hotplugging.

fof3 10-28-2007 09:39 AM

I changed it to rootnoverify, with the same result - a pastel blue screen; and no key presses changing it. XP loading?? - I saw the intro - black background screen - with the passing barrel, appearing first.

saikee 10-28-2007 10:56 AM

You will save a lot of grief if you try to isolate the XP to boot on its own.

Linux boot loaders like Grub and Lilo cannot read a NTFS partition. They boot XP by booting its boot loader NTLDR at the "+1" position in the boot sector which is at the beginning of your sdb1.

Therefore you need to have a XP self-bootable first in a healthy state. Grub will load it up less its MBR. That is all.

As an example if your XP needs to be activated it could lock up itself after the grey period has expired. Grub will not be able to intervene.


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