Re: boot from cd

Kerin Millar <[email protected]> Thu, 17 Oct 2002 14:54:44 +0100
Newsgroups gmane.linux.gentoo.newbies
Message-ID <[email protected]>
Dana Powers wrote:

 > I've noticed that on some of the XP machines I've tried to boot the
 > LiveCD on, the BIOS will boot XP no matter what I tell it to use as a
 > boot sequence. Very weird. Just thought I'd confirm that I've seen
 > XP/Bios/CDBoot oddness too.
 >
 > dpk

[Doh, forgot the reply-to for the upteenth time :-) ... apologies to Dana]

That's annnoying to say the least. It would have thought it's possible 
to add a line to C:\boot.ini to boot directly from the CD-ROM drive or 
floppy. But all of the information I've seen talks of dual-booting and 
doesn't address that concern.

Maybe this tool would help: http://www.winimage.com/bootpart.htm
Apparently, it can remove and restore the NT bootsector.

In any case, if you XP/NT bootsector is removed, you can restore it from 
an emergency recovery console (I think the command is FIXMBR). Another 
way of removing the bootsector is to use a DOS boot disk and do:

    fdisk /mbr

Technically, this Linux command would have the same effect:

    dd if=/dev/zero of=/dev/hda bs=512 count=1

but that would completely trash your partition tables! But you can use a 
variant of that command to reliable backup and restore your boot 
partition respectively:

    dd if=/dev/hda of=/path_of_your_choice/bootsector.orig bs=512 count=1
    dd if=/path_of_your_choice/bootsector.orig of=/dev/hda bs=512 count=1

Or maybe one of these two approaches might work:

* Use bootpart to read the bootsector of the Linux CD and save into a 
file. Then reference that file in the boot.ini for the XP bootloader.

* If you have an available Linux system. Insert a blank floppy and the 
Gentoo boot CD (make sure the floppy isn't mounted, or the CD) and:

   dd if=/dev/cdrom of=/dev/fd0

Now try and reboot the target PC from the floppy, with the CD present. 
The only other way I could think of (without destroying Windows, that 
is) is to put the hard disk in another PC!

--kerframil