Google Answers Logo
View Question
 
Q: Setting up dual-boot with Windows 2000 and Red Hat Linux ( Answered 4 out of 5 stars,   2 Comments )
Question  
Subject: Setting up dual-boot with Windows 2000 and Red Hat Linux
Category: Computers > Operating Systems
Asked by: illuminati-ga
List Price: $10.00
Posted: 24 Oct 2002 12:13 PDT
Expires: 23 Nov 2002 11:13 PST
Question ID: 89299
I would like to have the option of booting either Windows 2000 or Red
Hat Linux WITHOUT the use of a floppy for the latter.

The Gory Detail:
I have successfully installed Windows 2000 (SP2) and Red Hat Linux 8.x
on my computer, each on a separate hard drive.  By default, the system
will boot Windows 2000 (this is the desired behavior).  I can run Red
Hat if I boot off a floppy drive.

It appears this should be the way to do a dual-boot system:

   0. Install the operating systems -- this is done.
   1. Create an image of the Linux boot
   2. Copy it onto the Windows primary drive
   3. Edit the Windows 2000 boot.ini.

It's possible that I'm doing something wrong in steps 1 or 3.  

  1.  For the boot image, from Window, I've tried this:
            
            dd if=e:\images\boot.img of=f:\bootsect.lin 

      where boot.img is taken from the Red Hat CD-ROM.  
 
      another online faq recommended, in linux mode:

           dd if=/dev/hdc1 of=/bootsect.lin bs=512 

      where /dev/hdc1 is the mount point of /boot.  However, this is
incorrect because /boot contains several files; the result of this
command has been a 512-byte file.
   
  2. I've not been able to mount an NTFS file system on Linux, so I've
worked strictly via floppy.  (How do I mount an NTFS-formatted file
system on Linux?

  3. When editing the boot.ini file on windows 2000, I do the
following:

       f:
       attrib -s -h boot.ini
       vi boot.ini

     These is what boot.ini looks like:

         [boot loader]
         timeout=5
         default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
         [operating systems]
         multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows
2000 Professional" /fastdetect
         multi(0)disk(0)rdisk(0)partition(1)\bootsect.lin="Red Hat
Linux"
         F:\bootsect.lin="Red Hat Linux - F drive"

     Followed by:

         attrib +s +h boot.ini

     The default option is to boot Windows 2000; this works great.  If
I try either of the other two variants, I see:
         "Windows 2000 could not start because the following file is
missing or corrupt" ... "ntoskrnl.exe"

Is this the best way to do it?  What am I doing wrong?  

Configuration detail (perhaps TMI):
    Software:
        Windows 2000, SP2
           Installed on internal hard drive, partitions f:, g:, h: and
i:
        Red Hat Linux 8.0  (kernel 2.4.18-14)
           Installed on modular bay hard drive, partitions /boot, /
and swap

    Hardware: 
        Dell Latitude 800 laptop, 1Ghz, 512Mb, 32Mb color card.
        This computer has an internal drive, an internal media drive,
and a
           modular bay.

              The internal drive: 60Gb, four partitions, Windows 2000
installed
              Internal media drive: CD-RW, mounted as device e: (W2k)
or
                 /mnt/cdrom (Linux)
              Modular bay hard drive: 20Gb, three partitions, Red Hat
Linux 8.0
                  installed 

              At times, the modular bay hard drive may be swapped out
with a
              second battery, DVD, or floppy.  Obviously when this
happens,
              I don't intend to be running Linux.
 
        I have two docking stations, one with a modular bay that will
support
              a floppy or CD-ROM.  (The bus speed is too slow for a
DVD, which
              is beyond the scope of this question.)
Answer  
Subject: Re: Setting up dual-boot with Windows 2000 and Red Hat Linux
Answered By: haversian-ga on 24 Oct 2002 12:38 PDT
Rated:4 out of 5 stars
 
You gave up too soon with your 512-byte file.  You aren't copying a
file from your boot partition, you're copying the boot *sector*, which
is a mere 512 bytes long.

I've done what you're trying to do, so take heart - it can be done.

Your 'dd if=/dev/hdc1 of=/bootsect.lin bs=512 count=1' is right - this
will give you a file called bootsect.lin at the root of your
filesystem.  It will contain your boot sector which points to the
begining of the OS.  Copy this file somewhere on your Windows hard
drive so Windows can use it.  Mounting an NTFS filesystem under linux
is problematic at best, and as far as I know only reading is supported
as yet.  Stick the file on a FAT-formatted floppy to get it to Windows
if necessary.

If you have copied bootsect.lin to f:\, then your boot.ini file should
work (it does for me, though I'm using c:\, not f:\...)


If this still doesn't work, let me know what exactly is going wrong
and I'll try to duplicate it on my machine.

Best of luck,
  -Haversian

Request for Answer Clarification by illuminati-ga on 24 Oct 2002 16:04 PDT
Thank you for the quick response.  I have tried this, but I still
receive the same error message ("Windows 2000 could not start [...]").
 I had a couple of thoughts:

1) Could this an issue with the windows boot disk (F:) being NTFS
(versus FAT/FAT32)?
2) is this a GRUB versus LILO issue?  When I installed Linux, I was
asked whether ot use GRUB (default) or LILO, and chose GRUB.
3) Did I grab the wrong bits?  The linux installer also gave me the
option of installing the loader in the MBR (which I believe I don't
want to do, since that affects Windows 2000) or the first sector of
the Linux disk, which I did.  Would there be any offset?

I have also done some additional experiments:

1. Copied the contents of the boot floppy (six files) to f:\linux,
tried booting off of those.  Result: Same error message.
2. Added entries in boot.ini to try booting off the raw disk
partition.  Result: the machine just rebooted instantly.
3. Took an extended partition, reformatted it as "FAT" and put the
bootsect.lin in there.  Result: same error message.

This is the octal dump (-c option) of the 512-byte file; does it look
similar to yours?

0000000000     ë   H      l   b   a   L   I   L   O 001  \0 025 004  
Z  \0
0000000020    \0  \0  \0  \0   «   m   ¶   =   ´   L   Á  \0 001   µ  
L   Á
0000000040    \0 001   ³   L   Á  \0 001 001   D   Z   ·   L   Á  \0
001   ¸
0000000060     L   Á  \0 001   ¤   L   Á  \0 001   ¥   L   Á  \0 001
003 002
0000000100       \0  \0   €   W   ‚  \0  \0  \0  \b   ú   ê   P   | 
\0  \0
0000000120     1   À   Ž   Ø   Ž   Ð   ¼  \0       û       @   |   <  
ÿ   t
0000000140   002   ˆ   Â   R   ¾   v   }   è   4 001   ö   Â   €   t  
T   ´
0000000160     A   »   ª   U   Í 023   Z   R   r   I      û   U   ª  
u   C
0000000200         A   |   „   À   u 005   ƒ   á 001   t   7   f   ‹  
L 020
0000000220     ¾ 005   |   Æ   D   ÿ 001   f   ‹ 036   D   |   Ç 004
020  \0
0000000240     Ç   D 002 001  \0   f   ‰   \  \b   Ç   D 006  \0   p  
f   1
0000000260     À   ‰   D 004   f   ‰   D  \f   ´   B   Í 023   r 005  
»  \0
0000000300     p   ë   }   ´  \b   Í 023   s  \n   ö   Â   € 017   „  
ó  \0
0000000320     é     \0   ¾ 005   |   Æ   D   ÿ  \0   f   1   À   ˆ  
ð   @
0000000340     f   ‰   D 004   1   Ò   ˆ   Ê   Á   â 002   ˆ   è   ˆ  
ô   @
0000000360     ‰   D  \b   1   À   ˆ   Ð   À   è 002   f   ‰ 004   f  
¡   D
0000000400     |   f   1   Ò   f   ÷   4   ˆ   T  \n   f   1   Ò   f  
÷   t
0000000420   004   ˆ   T  \v   ‰   D  \f   ;   D  \b   }   <   Š   T 
\r   À
0000000440     â 006   Š   L  \n   þ   Á  \b   Ñ   Š   l  \f   Z   Š  
t  \v
0000000460     »  \0   p   Ž   Ã   1   Û   ¸ 001 002   Í 023   r   *  
Œ   Ã
0000000500     Ž 006   H   |   ` 036   ¹  \0 001   Ž   Û   1   ö   1  
ÿ   ü
0000000520     ó   ¥ 037   a   ÿ   &   B   |   ¾   |   }   è   @  \0  
ë 016
0000000540     ¾      }   è   8  \0   ë 006   ¾   ‹   }   è   0  \0  
¾   
0000000560     }   è   *  \0   ë   þ   G   R   U   B      \0   G   e  
o   m
0000000600    \0   H   a   r   d       D   i   s   k  \0   R   e   a  
d  \0
0000000620         E   r   r   o   r  \0   » 001  \0   ´ 016   Í 020  
¬   <
0000000640    \0   u   ô   Ã  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 
\0  \0
0000000660    \0  \0  \0  \0  \0  \0  \0  \0   D   R       i   s      
c   o
0000000700     m   p   r   e   s   s   e   d  \0  \r  \n   P   r   e  
s   s
0000000720         C   t   r   l   +   A   l   t   +   D   e   l      
t   o
0000000740         r   e   s   t   a   r   t  \r  \n  \0  \0  \0  \0 
\0  \0
0000000760    \0  \0  \0  \0  \0  \0  \0  \0   ƒ       ³   É  \0  \0  
U   ª
0000001000

Any additional insight would be appreciated.

Request for Answer Clarification by illuminati-ga on 24 Oct 2002 20:12 PDT
[This is basically a comment]
The master boot record of the linux drive had previously been
populated with Windows 2000, hence it wasn't really bootable on its
own.  I worked around this by taking the internal drive out, putting
the modular drive in its place, and installing Linux with the boot
loader on the drive's MBR.  I can now select the preferred drive from
the kernel menu.

I repeated the "dd" command above, and the contents are indeed quite
different from what I posted.  I suspect that when I put the file in
its happy place, it will boot without a problem.

Thanks.

Clarification of Answer by haversian-ga on 25 Oct 2002 01:15 PDT
Ok.  The dd command is there to capture your boot sector.  So, if you
put the bootloader on /dev/hdc's MBR, you would do

dd if=/dev/hdc of=/bootsect.lin bs=512 count=1

If you installed the bootloader in the first sector of your boot
partition (say /dev/hdc1), you need to grab that sector instead:

dd if=/dev/hdc1 of=/bootsect.lin bs=512 count=1

If you only installed the bootloader on a floppy (*not* the generic
floppy linux comes with), you would do something like

dd if=/dev/fd0 of=/bootsect.lin bs=512 count=1


Sorry for the confusion - I thought you knew already where the boot
sector for RH was put.  Once you get that file, it won't matter what
filesystem you are using under Windows, because only Windows needs to
be able to read it from that point on.  It sounds like you've found
the sector you need - let me know if it works!

-Haversian
illuminati-ga rated this answer:4 out of 5 stars
Happy with answer.

Comments  
Subject: Re: Setting up dual-boot with Windows 2000 and Red Hat Linux
From: chris2002micrometer-ga on 25 Oct 2002 01:36 PDT
 
A safer way to do this is by using another identical hard drive and
switching the cable. The extra hard drive also provides extra
protection in the event of drive hardware failure. You can swap the
electronics to recover data off either spindle. I have done this twice
in the past.
Subject: Re: Setting up dual-boot with Windows 2000 and Red Hat Linux
From: seizer-ga on 28 Oct 2002 07:02 PST
 
May I also recommend the absolutely fantastic XOSL (eXtended Operating
System Loader)? It takes a little tweaking, but certainly less than
what you're doing at the moment!

It's here: http://www.xosl.org/

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy