Re: [vox-tech] Dual-booting Linux and Windows 2000
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] Dual-booting Linux and Windows 2000
Dual booting Linux using NTLoader was successful. The steps were:
# Create a blank bootsect.lnx file of correct size
dd if=/dev/zero of=/bootsect.lnx bs=512 count =1
# Edit lilo.conf, set boot line to "boot=/bootsect.lnx",
vi /etc/lilo.conf
# Run lilo to write bootsector to file
/sbin/lilo
# Edit lilo.conf, set boot line to "boot=/dev/hdb" If you don't do this, you'll
get 'L' when LILO tries to load
vi /etc/lilo.conf
# Run lilo to write bootsector to MBR on second disk
# Copy bootsect.lnx to C:\ -- I haven't had luck mounting an NTFS5.0 partition on
Linux
Thanks again! Hope this helps someone!
Matt Roper wrote:
> I have found two different ways to dual-boot Windows 2000 in the past:
> 1) NT Loader comes up first, if "Linux" is selected, LILO loads up and I
> can choose which kernel I want to run
> 2) LILO comes up first; if I select "Windows," then NT bootloader pops up
>
> It sounds like you are are trying to get functionality similar to the
> first option above. I think where you are going wrong is where you
> use dd to make bootsect.lnx. The dd command that you are using copies the
> boot sector of partition hdb1 into a file; you can think of it as a
> program that would get executed if you tried to boot from that partition.
> NT Loader "executes" this program in order to load Linux when you choose
> the Linux option from the menu.
>
> I think your problem is that there is no bootup code in /dev/hdb1, so the
> bootsect.lnx file you are generating is either empty or garbage. In order
> to get the proper Linux bootup code into the boot sector, you need to use
> LILO to put it there. Normally, LILO installs this boot code into
> /dev/hda (the master boot record on the first hard drive) by default.
> However you want to install it to the boot sector of /dev/hdb1 instead so
> that you don't overwrite NT loader (which is sitting in /dev/hda).
> To do this, edit lilo.conf and change the line
>
> boot=/dev/hda
>
> to
>
> boot=/dev/hdb1
> or
> boot=/dev/hdb
>
> Which of the above lines you choose doesn't really matter; the first one
> will install to the boot sector of the hdb1 partition (/boot on your
> system) while the second one will install into the master boot record of
> your second hard drive. Either one is a valid place to put the boot code
> and neither one contains an existing boot sector on your system. After
> this, run LILO and then use dd to generate bootsect.lnx. Complete the
> process as you described and the result should be that NT Loader will run
> LILO if you choose the "Linux" option from the menu. If you don't want
> LILO's own menu (i.e. you only have one kernel and you never pass
> parameters to your kernel with LILO), you can keep it from coming up by
> removing the line
>
> prompt
>
> from your lilo.conf at the same time you make the other change to the
> file.
>
> I think the above process will get the solution you want. I did this
> about a year ago, so I don't remember the details really well. If you
> still have problems, I'll try to figure out what I have forgotten.
>
> A couple of final notes:
> - Your process of rebooting, fdisk /mbr, and then repair Win2k seems a
> little excessive to me. I don't see why you can't just mount your
> windows drive from within linux (i.e. mount -t vfat /dev/hda1 /mnt/C
> or mount -t ntfs /dev/hda1 /mnt/C), copy bootsect.lnx to /mnt/C, and
> then edit /mnt/C/boot.ini. I believe that is what I did a year ago...
>
> - Although I haven't tried it, I suspect that it might be possible to
> have LILO write its boot sector directly to a bootsect.lnx file instead
> of writing it to a boot sector and then copying it out into a file. My
> guess is that something like this might do the trick:
>
> # Make a file of the right size
> dd if=/dev/zero of=/bootsect.lnx bs=512 count=1
>
> # Edit lilo.conf, set boot line to "boot=/bootsect.lnx"
> vim /etc/lilo.conf
>
> # Run LILO to install bootup code into bootsect.lnx
> /sbin/lilo
>
> Of course that's just a guess. I have no idea whether LILO would accept
> a file instead of a boot sector...
>
> Hope that solves your problem or at least gives you enough insight to get
> it working. Let us know how it turns out.
>
> Matt
>
> =========================
> Matt Roper
> mdroper@ucdavis.edu
> http://www.mattrope.com
> =========================
>
|