Click to See Complete Forum and Search --> : how to dual boot win2k and RH linux???


ralph wiggum
12-03-2001, 11:11 PM
Ive got an IBM thinkpad and i want both RH linux 7 and win2k to be on it

I got both installed just fine, installed win2k first, then RH7 (installed lilo on the first part of the second partition)

boots up with a boot disk just fine...

but here are the steps I went through to get it to dual boot w/out the disk..

in linux:
dd if=/dev/hda2/ of=/bootsec.lnx bs=512 count=1

copied bootsec.lnx to a floppy and stuck it in C:/

modified C:/boot.ini to read:
C:/bootsec.lnx="linux"

I also installed the newest version of lilo (22.1) because the win2k partition is 20 gigs (over the 1024 cyl wall dealie). Ive been told that the new version fixes this. I also took out the entry "linear" and added "lba32" in /etc/lilo.conf. Then ran /sbin/lilo to refresh it

when i try to run linux without the disk i just get a cursor :confused:

one thing I noticed. When i load it with a boot disk it reads "loading from /dev/hda10"

hda10 is my / partition. it loads fine (with boot disk), but Ive been told that it should load from hda2 (my boot partition)

so should I have done "dd if=/dev/hda10/ of=/bootsec.lnx bs=512 count=1" instead (remeber hda10 is my root partition)

or just leave it "dd if=/dev/hda2/ of=/bootsec.lnx bs=512 count=1" (hda2 = /boot)

im all sorts of confused....

thanks for any help

(i would have posted this in tech support... but i cant load it at all :()

[ 03 December 2001: Message edited by: ralph wiggum ]

TheMuso
12-03-2001, 11:47 PM
I would suggest letting LILO boot win2k for you. I have Linux installed on my Toshiba laptop, with win2k first, and set it up with Mandrake. Once lilo was configured for mandrake, it could launch win2k for me. I would suggest not to use win2k's boot loader, as it is too messy to set up. Lilo can boot win2k just fine for you.

cabu1966
12-04-2001, 12:25 AM
Originally posted by ralph wiggum:
<STRONG>
modified C:/boot.ini to read:
C:/bootsec.lnx="linux" </STRONG>
If I remember correctly, bootsec.lnx has to be in uppercase regardless of how the actual file is named.

<STRONG>
Then ran /sbin/lilo to refresh it
</STRONG>

You should run lilo, then the dd command. I have a script set so that when i make any changes to lilo i run this:

# Begin /root/ntset
/sbin/lilo &&
dd if=/dev/hda5 of=/bootsect.lin bs=512 count=1 &&
mount /dev/hda1 /w2k &&
cp -f /bootsect.lin /w2k
# End /root/ntset

/dev/hda5 is where I have lilo installed, it's also / for the first distro I installed. /dev/hda1 is my windows 2000 partition.

<STRONG>one thing I noticed. When i load it with a boot disk it reads "loading from /dev/hda10"

hda10 is my / partition. it loads fine (with boot disk), but Ive been told that it should load from hda2 (my boot partition)

so should I have done "dd if=/dev/hda10/ of=/bootsec.lnx bs=512 count=1" instead (remeber hda10 is my root partition)

or just leave it "dd if=/dev/hda2/ of=/bootsec.lnx bs=512 count=1" (hda2 = /boot)
</STRONG>

I believe it should be wherever you install lilo at. I'm not sure on this one (I only use one partition per distro. So I installed lilo on the same partition as / of the first distro I installed).

[ 03 December 2001: Message edited by: cabu1966 ]

ralph wiggum
12-04-2001, 12:43 AM
thanks all.

I finally got it to work...

I must have messed up the dd command. Cause I tried it again but with 2 files. 1 from hda2 and the other from hda10 (just to try)

the one from hda2 worked like a charm...

thanks again for the rapid replies all :)

btw, as for the name of the dd output file, it doesnt matter... cuz i called it fromhda1.lns (misspelled lnx ;)) just as long as boot.ini can find it...

ralph wiggum
12-05-2001, 05:39 PM
oh geez no!

now its all messed up again :mad:

I made a new kernel (2.4.16)

but now when lilo loads all it does is say "LI"??

I looked it up in one of many linux books and it said lilo is unable to find the kernel, try using "linear" in lilo.conf

but my first partition (win2k) is 20 gigs, which goes over the 1024 cylender limuit, so instead of linear i have to use "lba32"

the images in lilo.conf are pointing to the correct kernels in /boot...

POOOO!!!!!!!!!!!

any ideas?

*edit*

i have 2 images listed in lilo.conf, one for the old kernel and the new one...

gonna post my lilo.conf file now... (needs to restart and load up via boot disk. which takes 23728237498 minutes :mad: )

[ 05 December 2001: Message edited by: ralph wiggum ]

cabu1966
12-05-2001, 05:47 PM
Did u run the dd command and copy it to your windows partition again after you made the changes to lilo and ran /sbin/lilo?

[ 05 December 2001: Message edited by: cabu1966 ]

ralph wiggum
12-05-2001, 07:20 PM
no :o

I thought it didnt matter since I wasnt changing where it was booting from (hda2)

but now that i look at it that does make sense...

do I have to rerun the dd command everytime I change lilo.conf?

cabu1966
12-05-2001, 07:25 PM
Yup ...that's why i use that script...keeps me from having to type all that out . :)

ralph wiggum
12-05-2001, 08:56 PM
wow... and saweet :)

i would have skipped a whole bunch of problems if would have read your whole post....*smacks self in noggin*

thanks for the help AND that sweet little script...

lets see if it works now... ;)

Chatterjee
12-05-2001, 09:42 PM
if you had red hat 7.2, it's a real cinch since rh 7.2 comes with grub which can read the nt stuff to boot off.

-S

ralph wiggum
12-06-2001, 12:25 AM
works :)

*slaps self for waisting all sorts of time*

how were you able to write to a NTFS partition? When i wasgoing through the settings for the new kernel (2.4.16) all i can check off is read-only, there is an option below it for write access but its greyed out...

any ideas?

cabu1966
12-06-2001, 09:41 AM
My win2k partition is FAT32. I really haven't messed around with NTFS because of the read-only restriction.
[edit] - I didn't realize you could write to it also. As far as it being greyed out...my guess would be to under "Code maturity level options" enable "Prompt for development and/or incomplete code/drivers".

[ 06 December 2001: Message edited by: cabu1966 ]

ralph wiggum
12-06-2001, 05:10 PM
thanks for the help :)

all good to go now...