l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 7: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2001 Dec 30 17:04

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
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



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
=========================


On Tue, 3 Apr 2001, Adam Getchell wrote:

> Hi all,
>
> I have a 9GB drive with Windows 2000 installed on it. I wanted to make a
> dual-boot system, so I added another 2.5GB IDE drive I had lying around
> (jumpered to slave). Then I setup an FTP installation of RedHat's Wolverine
> and let it run during the weekend.
>
> On return, I had a Red Hat Linux bootable installation on hdb. I also made a
> boot disk. fdisk shows:
>
> Cylinders    Device        Type
> 1-5            /dev/hdb1    boot
> 6-621        /dev/hdb2    extended partition
> 6-604        /dev/hdb5    /
> 605-621    /dev/hdb6    swap
>
> Where cylinders are 8164*512K = 4MB each.
>
> To make a bootfile for NTLoader to load linux, I did:
>
> dd if=/dev/hdb1 of=/bootsect.lnx bs=512 count=1
>
> then I copied this file to diskette.
>
> To get Windows 2000 back (and in accordance with the Linux-NT HOWTO on
> www.linuxdoc.org), I booted a DOS disk and ran fdisk /mbr, then repaired my
> NT bootsector using the repair procedure. (Actually, I've done this twice
> ... the second time, I just fdisk'ed). After I could boot to W2K, I copied
> bootsect.lnx onto C: and added the following line to boot.ini
>
> C:\BOOTSECT.LNX="Red Hat Linux (Wolverine)"
>
> Now, when I tried to use NT Loader to get to Linux, I get the error:
>
> BOOT Failed
>
> However, I can boot W2K. I can also boot to Linux using the boot disk. So, I
> tried copying the floppy's boot sector using
>
> dd if=/dev/fd0 of=/bootsec.lnx bs=512 count=1
>
> but this generates the same results.
>
> I don't want to run LILO, since that will overwrite my NT Bootloader. I
> tried that already, that adds the line:
>
> boot=/dev/hda
>
> to /etc/lilo.conf and erases the NT Bootloader, until I fdisk it.
>
> Any hints on completing this? I can dual boot by inserting the floppy, but
> I'd like to manage the process in NT Loader.
>
> Thanks,
>
> --Adam
>



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.