LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NTLDR Dual Boot XP(RAID)/SuSE9.0 (https://www.linuxquestions.org/questions/linux-newbie-8/ntldr-dual-boot-xp-raid-suse9-0-a-134225/)

MrOuija 01-13-2004 12:27 AM

NTLDR Dual Boot XP(RAID)/SuSE9.0
 
Been working on this one for several hours now. I know how to modify the boot.ini file for the Windows XP (NTLDR) boot loader. However, I have been unsuccessful as to this point at trying to fish the boot sector information off of the hard disk that Linux (SuSE 9) is installed on. I've used the "dd if=/blah/ of=/blah.lin etc." command to try and fish out the first 512 boot sector bytes from the Linux drive per many various FAQs and walkthroughs about configuring Linux to boot from NTLDR, with no success. None of these walkthroughs regarding Linux/XP dualboot seem to mention the HDD configuration. The jist of my question is: How do I point NTLDR to another hard disk that contains my SuSE installation. Also, what exactly should a boot record look like in text format? All I seem to be getting is a bunch of binary data, which, when I try to load it from NTLDR says that it can't turn over to the O/S because a suitable boot sector blah blah not found blah blah reboot.

Config:
Drive 0 = IBM 40.0gb Drive SiiG Hardware RAID 0 C: WinXP
Drive 1 = IBM 40.0gb Drive Siig Hardware RAID 0 C: WinXP
File system: NTFS
Single partition


Drive 2 = Western Digital 40.0gb Drive
File system: reiserfs
/dev/hdd1 10mb swap
/dev/hdd2 65mb /boot
/dev/hdd3 39.9gb /

Any help would be greatly appreciated!
Matt

Demonbane 01-13-2004 12:59 AM

Have you tried "dd if=/dev/hdd2 of=blah.bin bs=512 count=1"? Is Grub installed in /boot or mbr of drive 2?
The bootsector file is suppose to be binary

MrOuija 01-13-2004 01:16 AM

Methinks Im close
 
Okay, I've gotten it to the point where the loader will actually *attempt* to turn control of the system over to LILO. However, all I get when LILO attempts to load is LI 01 01 01 01 01 01 etc. How should I go about making a good boot file and knowing for sure it's correctly laid out and such? Should I edit lilo.conf to write the boot sector to /dev/fd0, run lilo, and then use dd to attempt to fish the file off of a diskette? It seems to me, that somewhere along the way, the loader data is becoming corrupted.

Demonbane 01-13-2004 01:32 AM

LI 01 01 01 usually means that lilo cannot find the disk with your /boot partition, yeah try installing lilo onto a floppy disk(boot=/dev/fd0), and see if the the disk can boot your linux, if it does then extract the bootsector from the disk.

MrOuija 01-13-2004 01:40 AM

Same problem
 
I have the same message come up when I try to boot from the floppy as well? Does this mean the LILO data is somehow becoming corrupted while it's being written to the floppy disk? Is there something Im missing about putting LILO onto a disk? Don't you just point lilo.conf to /dev/fd0. save. and then run lilo at the prompt to execute the changes?

Demonbane 01-13-2004 02:06 AM

That probably means lilo cannot properly determine the location of your drive, most likely has to do with your raid array which is set to the boot device. Right now I can only offer 2 suggestions, since im not overly familiar with Lilo:

1. Try GRUB, I've had it working in most dire situations, like having multiple operating systems on multiple drives on different controllers, each with grub in their boot partition extracted and loaded by NTLDR. Try making a grub bootdisk first and see if that works.

2. Try using bootpart http://www.winimage.com/bootpart.htm to extract the bootsector, from my experience it works better then using dd in linux, for extracting bootsectors for NTLDR. Though it works the best in dos u can still run it under XP.

MrOuija 01-13-2004 02:56 AM

Reinstall
 
Im thinking Im going to reinstall the SuSE distro sometime tomorrow- as it seems to have installed with some errors with it anyways (modprobe file not found?) and thus many other things fail, namely hotplugging and network devices. Ill try installing grub, as you suggested and see if I can get that to work. Now, when I install grub where should I put it? On the root partition or in the boot sector of the boot partition? Or in the boot sector of the root partition? Also, why would RAID prevent NTLDR from turning control of the system over to LILO. It seems like it would be a one way street- it's not like there's any data on the RAID array that LILO would need anyways right? Shouldn't it just get forwarded to boot of this other HD and that's the end of the story.... this really shouldn't be so complicated =P

jschiwal 01-13-2004 11:56 PM

I have the same setup as you but I'm using Mandrake 9.2 and I'm using lilo. First I went into bios and disabled the RAID drive as a boot drive. Only linux would boot up then. ( Remember to edit lilo.conf and running lilo so the linux loader actually gets written to the drive that linux is on. ) Then I used the dd command to copy the linux loader to floppy. I went back into bios and changed it back, booting from the RAID drive into XP. I copied the file from floppy to the C: drive, and added the file to the boot.ini file. Then I was able to boot up windows, or select linux and the linux lilo menu would come up. Make sure to re-run lilo anytime you make a change, and recopy the file using the dd command.

I didn't have to indicate the linux drive location in boot.ini.

Using the BIOS setting, I was able to boot straight into the system I needed to work on.

On my system, the first non-raid drive is hda and not hdd. An ata-raid drive will show up as a scsi drive.

MrOuija 01-14-2004 02:28 AM

Let me see if I follow
 
So on your system, you are indeed running Windows XP on a RAID array. It is the boot drive of the system, NTLDR is doing the booting, and it successfully boots to a non-RAID 3rd HD that Linux is on? Which means, NTLDR can turn the system over to LILO regardless of if there is a RAID array or not correct?

Let me make sure everything else is correct;
I installed Linux on /dev/hdd which is partitioned into /dev/hdd1 (100mb FAT32), /dev/hdd2 (swap), and /dev/hdd3 (reiserfs) and I installed the bootloader to the boot sector of /dev/hdd3.

You then extract the bootsector information from /dev/hdd3 via:
dd if=/dev/hdd3 of=/home/username/linux.lin

Then this is written to a floppy using
mount /media/floppy
cp /home/username/linux.lin /media/floppy

I then reboot and load Windows, copy the linux.lin file from the floppy disk to the root partition of Windows (which is on the RAID array) open up the boot.ini file and add in:
C:\linux.lin="SuSE Linux 9.0 Professional"
Save and reboot, and it *should* load, correct?

Demonbane 01-14-2004 06:40 AM

yea, it should

MrOuija 01-14-2004 01:38 PM

BS or MBR
 
Can LILO/GRUB be fished out of the BS or does it need to be put on the MBR of the Linux installed HDD? Because if it has to be the MBR... I think I know the problem :-P

Demonbane 01-14-2004 01:57 PM

No, you can either install it to the partition bootsector or the MBR. if its in the partition bootsector then you need some way of loading it, like using a bootloader such as ntldr. If you install it to the MBR of your linux disk it has to be set to the first bootable device to load, though I havent tried loading a mbr sector with ntldr, it might work, dunno.
Did grub work for you?

MrOuija 01-14-2004 02:08 PM

Nope, not yet
 
Im just not convinced Im getting the data out of the drive correctly- When you reinstall linux, it should write a new bootsector correct? And the bootsector should be at the beginning of the root drive right?

jschiwal 01-17-2004 12:37 PM

The dd command should contain bs=512 count=1. Otherwise, you will be trying to copy the entire partition to floppy, when you just need the first 512 bytes.

My computer has the raid controller chip on the mother board, and so the raid drives and the normal ide drives are on different busses, so my linux is installed in hda.

When I was using a previous kernel, I was able to to use the promise drivers to access the raid drives, but I wasn't able to get linux to boot up when installed on a raid drive.

That's the part I do not understand, how does the initrd file, which contains the raid driver, get read in if it's on a raid drive?

Demonbane 01-17-2004 03:55 PM

The initrd contains the raid driver for the linux kernel, keep in mind that GRUB does not need the linux kernel to operate.


Quote:

Im just not convinced Im getting the data out of the drive correctly- When you reinstall linux, it should write a new bootsector correct? And the bootsector should be at the beginning of the root drive right?
Yeah depends on where you select to install during installation, however a reinstall of lilo/grub would write a new bootsector. Take my advice, go make a grub bootdisk, get into the grub console and check if grub can see your linux drive.


All times are GMT -5. The time now is 12:44 PM.