Forum Home
Press F1
 
Thread ID: 24982 2002-09-23 03:57:00 Installing Linux, but keeping the XP boot sector XKPay (2003) Press F1
Post ID Timestamp Content User
82244 2002-09-23 03:57:00 I have recently reinstalled XP, but have got hold of a copy of the newest Linux Mandrake [8.2], and want to install that, but keep the XP boot sector, with its boot up menu and settings. I was thinking of a possible way of doing this was to install Linux, but then load the XP System Restore off the XP System disc to restore the boot sector. Would this work? If it wouldn't, is there any other way to get what I want? XKPay (2003)
82245 2002-09-23 04:34:00 You don't mention if you are loading on to a seperate HD or not, but to retain the original XP boot loader you would probably need to create a boot floppy for your Linux distro. Most distros give the option to either load Lilo or Grub to the MBR OR create a boot floppy. Gorela (901)
82246 2002-09-23 05:03:00 if you just want a play with linux, try noppix
One CD, boot from the CDR, and run the operating system from the CDR
that way you dont have to install or change ANYTHING, except a wee change in the bios.
Chris Wilson (431)
82247 2002-09-23 06:55:00 I posted an answer to this on Sep 19. Use the search on this page for "Linux/XP problems. I see (now!) that the link I gave was corrupted in the system: it should be www.poopoccurs.com . Graham L (2)
82248 2002-09-23 07:15:00 Hi,

There are other options apart from installing to the MBR and using a boot floppy.

Partitions also have boot sectors, and because of this you are also able to install lilo to the boot sector of your linux partition.

Depending on how you have setup your linux partitions and how many partitions you have will be a major factor of where to install lilo.

In general you should install it to the FIRST linux partition, for instance if you have;

/ = hda5
/usr = hda6

you would install lilo to hda5, dont take any notice of my partition numbering above as they are an example only. The best advice I could give is to also have a /boot partition that is located BEFORE all the other linux partitions and install lilo to that.

The key here is to take note of what partitions the Mandrake installer configures for you and what partition numbers they are hda5, hda6 etc..

Once you have your partitions sorted out and setup reaches the install lilo stage you will notice that you will get the option of installing lilo into a partition's boot sector as well as the MBR. The MBR will be hda and a partition will be hdax where x is the number of your first linux partition.

After doing this always make a boot floppy because things can go wrong.

Now here's the tricky part, boot linux from floppy disc, login and run the following command;

dd if=/dev/hda(x) bs=512 count=1 of=/bootsect.lin
(where x is the partition you installed lilo to)

Next, copy the bootsect.lin file to a floppy disc. What the above command does is it copies the linux bootsector into a file (bootsect.lin). Now reboot to Windows and copy the bootsect.lin file to the drive where the boot.ini file is situated, it may be hidden so you might need to unhide it.
This is required because Windows cannot read ext2 or ext3 filesystems and therefore must boot the linux loader from a filesystem it can read from.

Now you need to edit the boot.ini file. your boot.ini probably looks similar to this;

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows Xp" /fastdetect

Now add the following line;

C:\BOOTSECT.LIN="Linux" (assuming your boot.ini is on drive C:)

Save & exit and everything should be sweet.

As you can see this is a long and arduous process. It can be may easier however if you install lilo to the MBR and use that to boot Windows, but that's another story...

If you have any questions reply to this post.

Bruce.
b1naryb0y (3)
82249 2002-09-23 08:09:00 Bruce: XP, 2000, and NT are very different from the other flavours of Windows. The link I have given is much more helpful. Your posting assumes too much knowledge. Graham L (2)
82250 2002-09-23 08:18:00 Sorry, Graeme L, maybe I should have read your link before I posted my msg. b1naryb0y (3)
1