LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-26-2007, 11:09 PM   #1
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Rep: Reputation: 30
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?
 
Old 10-27-2007, 06:42 AM   #2
larkl
Member
 
Registered: Sep 2007
Distribution: Puppy 5.2.8
Posts: 69

Rep: Reputation: 15
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.
 
Old 10-27-2007, 07:38 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,743

Rep: Reputation: 299Reputation: 299Reputation: 299
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>.
 
Old 10-27-2007, 07:46 PM   #4
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Original Poster
Rep: Reputation: 30
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
 
Old 10-27-2007, 08:04 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,096

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
From a terminal, let's see the output of "/sbin/fdisk -l" (lower case ell)
 
Old 10-27-2007, 08:43 PM   #6
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Original Poster
Rep: Reputation: 30
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
 
Old 10-27-2007, 08:57 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,096

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Try "rootnoverify (hd1,0)" in place of "root (hd1,0)".
If still no-go, more information - does Windoze actually start to load, any messages.
 
Old 10-27-2007, 10:02 PM   #8
BB_DaKraxor
LQ Newbie
 
Registered: Oct 2007
Location: Hungary, Budapest
Distribution: Gentoo
Posts: 17

Rep: Reputation: 0
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.
 
Old 10-27-2007, 10:38 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,096

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
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.
 
Old 10-28-2007, 07:35 AM   #10
BB_DaKraxor
LQ Newbie
 
Registered: Oct 2007
Location: Hungary, Budapest
Distribution: Gentoo
Posts: 17

Rep: Reputation: 0
I was just guessing...
 
Old 10-28-2007, 08:05 AM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.
 
Old 10-28-2007, 08:47 AM   #12
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by saikee View Post
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?

Last edited by blackhole54; 10-28-2007 at 08:50 AM.
 
Old 10-28-2007, 09:18 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 10-28-2007 at 09:20 AM.
 
Old 10-28-2007, 09:39 AM   #14
fof3
Member
 
Registered: Nov 2003
Distribution: Debian - Lenny
Posts: 174

Original Poster
Rep: Reputation: 30
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.
 
Old 10-28-2007, 10:56 AM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 10-28-2007 at 10:59 AM.
 
  


Reply

Tags
debian, etch


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot Debian Etch and XP with GRUB - Debian installed First - one HDD bence8810 Debian 11 01-07-2007 10:45 AM
Is Grub necessary for Dual boot system JOR000 Linux - General 6 09-02-2005 12:28 PM
Do you still need grub if you have a single boot system? LinuxPadawan Linux - General 4 04-14-2005 03:39 PM
help! grub does not boot the system! dual HD, 3 OS parv Fedora 3 08-31-2004 08:40 AM
GRUB Multi boot system JSThePatriot Linux - Newbie 11 07-30-2004 08:04 PM


All times are GMT -5. The time now is 03:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration