home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / mini / Linux+NT-Loader < prev    next >
Text File  |  1998-10-14  |  6KB  |  189 lines

  1.   NT OS Loader + Linux mini-HOWTO
  2.   Bernd Reichert, <reichert@dial.eunet.ch>
  3.   v1.11, 2 September 1997
  4.  
  5.   1.  Abstract
  6.  
  7.   This document describes the use of the Windows NT boot loader to start
  8.   Linux.  This procedures have been tested with Windows NT 4.0 WS and
  9.   Linux 2.0.
  10.  
  11.   2.  How does the NT OS Loader work
  12.  
  13.   The NT OS loader likes to have the boot sector from the other
  14.   operating systems available as a file. It reads this file and starts
  15.   the operating system selected, i.e. either Windows NT in different
  16.   Modes or any other OS.
  17.  
  18.   3.  Tips on how to install Windows NT and Linux on the same System
  19.  
  20.   3.1.  Windows NT installation
  21.  
  22.   Try to install Windows NT first. If you want to use NTFS for your
  23.   Windows NT-partition, keep in mind, that the todays production version
  24.   of Linux cannot access NTFS partitions.  An alpha driver that can read
  25.   NTFS-Partitions is available at http://www.informatik.hu-
  26.   berlin.de/~loewis/ntfs.  You may create a separate FAT-Partition for
  27.   data exchange or you have to use DOS-formatted floppies.
  28.  
  29.   3.2.  Partitioning
  30.  
  31.   Another Mini-howto recommends not to use NTs "Disk Administartor" to
  32.   create the Linux swap- and root-partitions. It is sufficient to see
  33.   the free space there. I also recommend to use linux's fdisk later.
  34.  
  35.   3.3.  Linux installation
  36.  
  37.   Now boot linux from diskettes, create the swap and root-partition.
  38.   Fdisk assumes the ntfs-partition to be a HPFS-partition.  This is
  39.   normal.  Boot again from diskettes and install Linux as you like.
  40.  
  41.   Just in case the installation procedure suggests that you could mount
  42.   the HPFS partition which it has found: Ignore it.
  43.  
  44.   3.4.  Lilo
  45.  
  46.   When you come to the Lilo-Section, specify your Linux-root-partition
  47.   as your boot device because the Master Boot Record (MBR) of your
  48.   harddisk is owned by Windows NT. This means that the root-entry and
  49.   the boot-entry in your /etc/lilo.conf have the same value.  If you
  50.   have a IDE-harddisk and your Linux-partition is is the second
  51.   partition, your boot-entry in /etc/lilo.conf looks like:
  52.  
  53.        boot=/dev/hda2
  54.  
  55.   If you have two disks and your Linux resides on the first partition of
  56.   your second disk, your boot-entry in /etc/lilo.conf looks like:
  57.  
  58.        boot=/dev/hdb1
  59.  
  60.   Run lilo with a kernel that matches your system.  Check the kernel by
  61.   booting from diskette first if you are not sure.
  62.  
  63.   If you cannot boot Windows NT now, you have a problem.  I hope you
  64.   have created a repair-disk recently.
  65.  
  66.   4.  Bootpart
  67.  
  68.   There is a NT-programm called bootpart written by G. Vollant that can
  69.   do the jobs from the next two points for you. Bootpart is available at
  70.   http://ourworld.compuserve.com/homepages/gvollant/bootpart.htm.
  71.  
  72.   If you want to know how things are working together, use the
  73.   procedures described in point 5 and 6.
  74.  
  75.   5.  The Linux part of the work
  76.  
  77.   You have to boot from diskettes until the NT-part is fixed.
  78.  
  79.   Now you have to peel the bootsector from your Linux-root-Partition.
  80.   With /dev/hda2 as your linux-partition, the dd-command is:
  81.  
  82.        # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1
  83.  
  84.   There is something wrong if your bootsect.lnx has more than 512 bytes.
  85.  
  86.   Now copy the file bootsect.lnx to a DOS-formated floppy if this is
  87.   your way to transfer files to the NTFS-Windows-partition.
  88.  
  89.   You can copy it with
  90.  
  91.        # mcopy /bootsect.lnx a:
  92.  
  93.   or with
  94.  
  95.   # mount -t msdos /dev/fd0 /mnt
  96.   # copy /bootsect.lnx /mnt
  97.   # umount /mnt
  98.  
  99.   6.  The Windows NT part of the work
  100.  
  101.   Copy the file from the diskette to C:\bootsect.lnx. I don't tell you
  102.   how to do that.
  103.  
  104.   What lilo.conf is for linux is c:\boot.ini for Windows NT.  Remove
  105.   the, system- and the read-only-attribute before you can modify it
  106.   with:
  107.  
  108.        C:\attrib -s -r c:\boot.ini
  109.  
  110.   Now change the file boot.ini with an editor, notepad for example, as
  111.   follows:
  112.  
  113.        [boot loader]
  114.        timeout=30
  115.        default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
  116.        [operating systems]
  117.        multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
  118.        multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
  119.        C:\BOOTSECT.LNX="Linux"
  120.  
  121.   Only the last line has been added in this example.  Restore the
  122.   attributes after you have saved boot.ini with:
  123.  
  124.        C:\attrib +s +r c:\boot.ini
  125.  
  126.   After a shutdown of your Windows NT and a restart your should see the
  127.   following:
  128.  
  129.     OS Loader V4.00
  130.  
  131.     Please select the operating system to start:
  132.  
  133.     Windows NT Workstation Version 4.0
  134.     Windows NT Workstation Version 4.0 [VGA mode]
  135.     Linux
  136.  
  137.   Select Linux and see
  138.  
  139.     LILO loading zImage ....
  140.  
  141.   7.  Play it again Sam
  142.  
  143.   A new copy of bootsect.lnx must be transfererd to C:\BOOTSECT.LNX evry
  144.   time the bootsector of your linux-partition has been modified.  This
  145.   happens for example when you install a new kernel with lilo.  As you
  146.   can see such a system in not ideal for testing experimental kernels.
  147.  
  148.   8.  Troubleshooting
  149.  
  150.   If things do not work as expected, check bootability with a floppy
  151.   disk.  With /dev/hdb1 as your Linux-partition, your /etc/lilo.conf has
  152.   the following entries:
  153.  
  154.        root=/dev/hdb1
  155.        boot=/dev/fd0
  156.  
  157.   Run lilo with a diskette inserted. Now try to boot from the diskette.
  158.   If your Linux on /dev/hdb1 can't be started, the NT OS loader will
  159.   also fail to start it.  If you see a lot of 01 01 01 01, your root-
  160.   disk is not accessible.  Check whether all your disks are known by the
  161.   bios.
  162.  
  163.   If the floppy boots your Linux partition, you can peel of your boot-
  164.   sector for the NT OS loader with:
  165.  
  166.        # dd if=/dev/fd0 of=/bootsect.lnx bs=512 count=1
  167.  
  168.   You can keep this diskette as your rescue-diskette just in case your
  169.   Windows NT installation breaks.
  170.  
  171.   9.  References
  172.  
  173.   ╖  The Linux+WindowsNT mini-HOWTO
  174.  
  175.   ╖  The FAQ for FreeBSD 2.X
  176.  
  177.   10.  Acknowledgements
  178.  
  179.   ╖  Thanks to Xiaoming Yi <z3c20@ttacs.ttu.edu> for the tip that the
  180.      procedures work also with other disks than the first one.
  181.  
  182.   ╖  Thanks to Frank Dennler <Frank.Dennler@zkb.ch> for the diskette-
  183.      trick.
  184.  
  185.   11.  Feedback
  186.  
  187.   Any comments are welcome.
  188.  
  189.