*BSD News Article 60605


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!netnews.upenn.edu!dsinc!ub!news.kei.com!newsfeed.internetmci.com!in1.uu.net!news.ssd.intel.com!chnews!itnews.sc.intel.com!yoyodyne
From: jreece@sousa.intel.com (John Reece)
Newsgroups: comp.os.linux.setup,comp.unix.bsd.freebsd.misc
Subject: Howto: Use NT loader to boot Linux, FreeBSD, or whatever
Date: Fri, 26 Jan 96 22:05:57 GMT
Organization: Not an Intel spokesman
Lines: 57
Message-ID: <4ebj85$7m_001@itnews.intel.com>
Reply-To: jreece@sousa.sc.intel.com
NNTP-Posting-Host: yoyodyne.sc.intel.com
X-Newsreader: News Xpress Version 1.0 Beta #4
Xref: euryale.cc.adfa.oz.au comp.os.linux.setup:39079 comp.unix.bsd.freebsd.misc:13220



People keep asking, so here's what works for me.

The general idea is that one copies the first sector of your
native root Linux or FreeBSD partition into a file in
the DOS/NT partition.  Assuming one names that file
something like c:\bootsect.lnx or c:\bootsect.bsd (inspired by
c:\bootsect.dos) one can then edit the c:\boot.ini file to come 
up with something like this:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT" 
    C:\BOOTSECT.LNX="Linux"
    C:\BOOTSECT.BSD="FreeBSD"
    C:\="DOS"

This procedure assumes that DOS, NT, Linux, FreeBSD, or whatever 
have been installed into their respective fdisk partitions on 
the *same* disk.   In my case DOS & NT are in the first fdisk 
partition, Linux in the second,  and FreeBSD in the third.
I also installed Linux and FreeBSD to boot from their native 
partitions, not the disk MBR, and without delay. 

Mount a DOS-formatted floppy (if you've converted to NTFS) or
the FAT partition, under, say, /mnt.

In Linux:

    dd if=/dev/sda2 of=/mnt/bootsect.lnx bs=512 count=1

In FreeBSD:  

    dd if=/dev/rsd0a of=/mnt/bootsect.bsd bs=512 count=1

Reboot into DOS or NT.  NTFS users copy the bootsect.lnx 
and/or the bootsect.bsd file from the floppy to C:\.  
Modify the attributes (permissions) on boot.ini with:
 
    attrib -s -r c:\boot.ini

Edit to add the appropriate entries from the example
boot.ini above, and restore the attributes:

   attrib -r -s c:\boot.ini

If Linux or FreeBSD are booting from the MBR, restore
it with the DOS fdisk /mbr command after you reconfigure
them to boot from their native partitions.


John Reece
Usually not an Intel spokesman