LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding CentOS to Windows Boot.ini (https://www.linuxquestions.org/questions/linux-newbie-8/adding-centos-to-windows-boot-ini-546332/)

dbough 04-15-2007 07:20 PM

Adding CentOS to Windows Boot.ini
 
Greetings,

My setup:

SATA1: Windows XP NTFS
SATA2: NTFS Storage
PATA1: CentOS 4.4 (100MB Boot Partition, the rest is root) LVM / ext3)

While installing CentOS I decided to put GRUB on the primary partition of the PATA drive (or so I thought) and not part of the MBR. I was under the assumption I could go into the boot.ini on the Windows HD and add CentOS as an option at boot time.

My issue is, I cannot figure out the path to put in the boot.ini to point to CentOS. Windows reads the root partion on the PATA drive as "H" and does not recognize the boot partition at all.

Am I able to make CentOS part of the Windows bootloader?

Thanks!

Dan

Lenard 04-15-2007 07:52 PM

Follow the directions found here; http://www.redhat.com/advice/tips/dualboot.html

Starting from: "You may choose to let another boot loader handle the install, in which case you will want to:"

Boot from the installation media into rescue mode (linux rescue) answer a few questions and use chroot as instructed on screen to create the file mentioned in the link.

osor 04-15-2007 07:55 PM

What you can do is copy the boot sector from the primary partition of pata1 to your windows drive (i.e., extract it “dd if=/dev/hda1 of=bootsect bs=512 count=1”, then copy bootsect to your windows partition, then use the bootsect file instead of “multi(…” to describe your linux target in boot.ini).

dbough 04-15-2007 08:36 PM

Ok, this is what I have tried (without success.)

I've booted to the rescue linux prompt.

I've typed the following:

"dd if=/dev/hda1 of=/bootsect.lnx bs=512 count=1"

It would then tell me that it cannot find /dev/hda1. I ran LS in the dev directory - the closest thing I could find was /hdb so i used /hdb1 instead. It told me "1 files out, 0 files in" or something to that sort.

I've added the line to windows bootloader but of course it wouldn't work.

Am I missing something?

osor 04-15-2007 09:00 PM

First of all make sure what you extracted is actually the volume boot sector (it should be exactly 512 bytes in size, and the command “file bootsect.lnx” should say “x86 boot sector” or something similar). Now you have to copy it to your windows root partition (i.e., “C:\”). You can do this many ways (floppy, flash drive, direct ntfs write with ntfs-3g, read your ext partition from within windows, email an attachment, etc.). Then reference it in boot.ini by its windows path (e.g., “C:\bootsect.lnx”).

dbough 04-15-2007 09:38 PM

Ok, thats definatly where the issue is (I need to copy the bootsect to the other drives - via removable media.

bootsect.lnx now lies at the root of my linux drive

-ls shows it along with /etc /dev and all of the other folders.

It was copied from /dev/hdb1

Now I'm at the point where I want to copy the file onto a USB drive - however I can't find the usb stick at all. Does it need to be mounted first? (I assume this is where my problem lies.) I'm still rather new so I appologize for all of the questions.


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