LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Double boot system (XP and Etch) and grub (https://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.

fof3 10-28-2007 11:18 AM

Is this not what I have already attempted? Please correct me, if I am not understanding you.
I first had a working Etch OS. I disconnected it; and installed XP on another drive. XP started up, but then hung up, with the pastel blue screen. I am unable, for some reason, to get XP self-bootable in a healthy state.

fof3 10-28-2007 11:41 AM

I don't understand why I get a "View only" box, when I am trying to change things in BIOS; such as the boot order.

saikee 10-28-2007 11:41 AM

You have not confirmed if XP has ever been installed and operational before you re-connect it with the Linux disk.

Birigdriver's Post #3 asked you to disconnect the Linux disk. In a Sata disk arrangement the Bios will boot up your XP as the first boot disk, as there is no master and slave relationship in Sata disks.

The whole point is can you remove the Linux disk temporarily now and prove the XP is operational and bootable?

Your post #16 apparent suggests you have never managed to installed XP successfully. Was the XP you are using a legal copy?

You have sent us barking to the wrong tree by suggesting it is a Grub's problem in the thread title.

fof3 10-28-2007 12:02 PM

I totally disconnected the Etch drive; and the Windows start-up screen appeared (with the moving barrel); but then went to the same unchangeable pastel blue screen.

fof3 10-28-2007 02:27 PM

My XP is a legal copy that I registered with Windows; and used for a few years; until the Motherboard went bad. Having installed a new Motherboard I am trying to get the system up and running for my daughter to use.

syg00 10-28-2007 03:35 PM

O.K., so you've never had XP working in this setup. From your description, grub has done its work - transferred to the XP partition for it to boot.

Pull out the Etch disk again, and redo the install - take note of whether it completes successfully. Shouldn't be an activation issue -I've pulled out plenty of motherboards. Only once caused an issue with M$oft - too many changes in total (lightning strike). From memory the install completes o.k., but you get a message re registration on the reboot. Told them what happened, they gave me a new code.

fof3 10-28-2007 03:45 PM

Today I noticed that the SATA drive plug-ins on the 945GZT-M Motherboard are listed: 1 through 4. I had the two drives in slots 3 & 4 (not sure now which one was in which).
I tried XP in #1, and Etch in #2. Windows booted up first; then a blank screen; followed by the grub menu; and when XP was chosen; it would give me the opportunity to choose SAFE or NORMAL start. No matter which one I chose, it would get past the start-up screen; go blank; and then a reboot would occur.
I then tried Etch in #1, and XP in #2. The grub menu appeared; and when Windows was chosen; it would get past the start-up, and into a blank screen; followed by the SAFE mode choice page, etc... If I chose Etch, it would load normally.

fof3 10-28-2007 03:47 PM

I will try the re-install. Will get back to you.

syg00 10-28-2007 04:03 PM

Almost sounds like you installed grub over the top of the XP partition - did you (re-)do a manual install of grub (grub-install or similar) after the XP install ???

saikee 10-28-2007 04:40 PM

fof3,

I begin to suspect that you have sold us down the river by taking the XP hard disk from the bad mobo and offered it to the new mobo. That hard disk will never boot but the personal data is recoverable by Linux.

M$ has made sure its products are not transferable by keeping a record of every hardware's details (down to the serial number of the hard disk). It checks the list on every boot up and simply refuses to work if it found itself moved. An OEM license of a MS Windows is supposed to die with the PC.

If the above was what you did then you haven't got a booting problem. You simply have an activation problem with M$.

fof3 10-29-2007 05:20 PM

I installed XP on a brand new Drive. I could see if I got to the point of activation that Microsoft would see the difference; but not now.
I repeated BigrigDriver's directions, to see if I could get Window's to boot properly. I hooked up the Window's drive to "SATA #1' position on the mobo. It still ended up with the unchangeable pastel blue screen.
My suspicion is that it's a BIOS problem.
I don't understand why I can't change anything in the BIOS. When I press 'Enter' at any entry I get a red dialog box that says 'View only'; and to press OK in acknowledgment.

blackhole54 10-30-2007 04:19 AM

Quote:

Originally Posted by fof3 (Post 2941460)
I don't understand why I can't change anything in the BIOS. When I press 'Enter' at any entry I get a red dialog box that says 'View only'; and to press OK in acknowledgment.

Could the BIOS be password protected?

fof3 10-30-2007 04:20 AM

I wasn't able to follow BigrigDriver's directions to a tee, because I wasn't able to make the BIOS changes that he mentioned.

fof3 10-30-2007 04:23 AM

My daughter had, because it seemed harmless to her, entered a Supervisor's password. How can I cancel that?

blackhole54 10-30-2007 05:25 AM

Handling of passwords is BIOS specific. If your daughter remembers the password, try entering it (I hope it is obvious how to do that!) and then you will probably be given the option somewhere within the BIOS settings to cancel it. If she doesn't remember ... Some mother boards have a switch or a jumper you can use to kill the password (real secure, hugh?). I believe I have heard of people resetting the whole BIOS by disconnecting the battery. If you have a manual it should tell you. Otherwise your best bet is to use Google to try to find the answer.

saikee 10-30-2007 06:00 AM

Normally each mobo has a 3-pin jumper for initialise the Bios to the factory setting. Consult the mobo hand book.

It is usually jumpered with say pin 1 and 2 (could be pin 2 and 3). By removing the jumper and plugging into the other combination of pin 2 and 3 ( could be pin 1 & 2) for say 5 seconds and then back to the original pin 1 & 2 will cancel the user's setting and revert to the factory setting.

Removing the battery in the mobo also does the same trick.


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