PDA

View Full Version : Dual boot problem winxp/knoppix (GRUB)



hukdonfonix
12-03-2004, 02:43 AM
OK, so i had an existing xp home partition that filled my 76.6 gb drive. i reduced it by 10 gb. made a 2 gb swap ( i have 1 gb ram) and a ~8 gb ext3 partition.

i installed knoppix on it, and it went fine. problem is, i am on a laptop and do not have a floppy drive. i cant make a boot disk, or at least dont want to unless i have to emulate a floppy on a cd.

When asked to put LILO in the MBR, i clicked no. i like ntldr fine. I used these instructions to dual boot.


An alternative method :

1. go to here http://www.skyjammer.com/files/knoppix

2. get the w32grub.zip and unzip it to c:\, it is already a directory tree

3. run c:\boot\grub\w32grub

4. add 'c:\boot\stage1="GRUB"' to c:\boot.ini

Now there is a GRUB boot loader in your W2K/XP system.

Install your KNOPPIX as usual but don't let it touch your boot loader.

in c:\boot\grub\menu.lst add the following(just an example)

title KNOPPIX
root (hd0,2)
kernel /boot/vmlinuz
initrd /boot/initrd

and you can boot load your KNOPPIX. For detail about GRUB, read the manual on their main site.

If you want poorman's install(FAT only), follow the instruction in the doc on this site on how to extract the big file as well as the boot.img from the ISO and follow the followin procedure

1. get memdisk from syslinux site and put in c:\boot
2. put the boot.img(from the ISO) to c:\boot
2. add the following to c:\boot\grub\menu.lst courtesy of garyng


now, i can get into windows perfectly. when i boot i get two titles. XP HOME and GRUB.


When i click grub, i see for a second starting stage 2... and the computer reboots to the bios. here is my menu.lst for grub:


# Sample boot menu configuration file
#

# Boot automatically after a minute.
timeout 60

# By default, boot the second entry.
default 1

# Fallback to the first entry.
fallback 0

title Windows XP
unhide (hd0,0)
rootnoverify (hd0,0)
chainloader +1

# For booting Linux
title KNOPPIX
root (hd0,2)
kernel /boot/vmlinuz
initrd /boot/initrd

i know grub starts counting at 0, so my windows partition is the first, and my linux is the third so i believe the partitions are correct.

here is my boot.ini:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
c:\boot\stage1="GRUB"


does anyone know why i get the error i do? does anyone know how to fix it? if not, can someone explain how to remove grub and keep ntldr if possible? without a floppy in all of this please, unless its necessary.


Thanks.

Hukdonfonix

garyng
12-03-2004, 02:57 AM
try to copy the menu one level up, so it is at c:\boot and run w32grub with all the needed parameters rather than letting it just do the guess. I tried to make it as easy as possible but it obviously cannot handle all cases.

I believe it is

w32grub -d (hd0,0) -1 c:/boot/stage1 -2 c:/boot/stage2 -m /boot/menu.lst

You have an alternative which is to let LILO/GRUB to install to your linux partition and grab that out and put that into c:\boot.ini

hukdonfonix
12-03-2004, 03:47 AM
well i copied it up, and i ran w32grub with the parameters you gave. it still doesnt work. unless you have any other ideas, could you explain what i need to copy from my linux partition? i did install LILO on the root partition. what should i get, and i guess how should i get it since windows cant read ext3. i guess i could use the live cd and copy the information down.

hukdonfonix
12-03-2004, 03:55 AM
i probably should have mentioned this but im using knoppix 3.4..... i was looking through another post and saw the /vmlinuz looked different with 3.4.....



is it a different symlink for knoppix 3.4?

rrfish72
12-04-2004, 03:40 AM
Why not use grub or lilo? You can avoid all that by just installing one of them to mbr. If you don't like it there is a simple fix for it.

hukdonfonix
12-04-2004, 04:13 AM
well i was thining about that and i found a tutorial to use lilo with windows and knoppix, but it required a floppy disk. no floppy drive on my laptop. if you could explain how, then i might consider it. i didnt want to get rid of ntldr because why fool with it if it works. but i might have to.

garyng
12-04-2004, 04:52 AM
well i was thining about that and i found a tutorial to use lilo with windows and knoppix, but it required a floppy disk. no floppy drive on my laptop. if you could explain how, then i might consider it. i didnt want to get rid of ntldr because why fool with it if it works. but i might have to.

GRUB/LILO or my win32 patch are all the same. Basically what most XP users want is to continue using the NT loader(why change when it works?). So after you install linux to a seperate partition on the same HD, LILO/GRUB should give you a choice to install to either MBR(sector 0 of the HD) or BR of the partition(sector 0 of the partition). Just tell it to install to the boot sector of the partition rather than MBR. Then issue the following command under linux :

dd if=/dev/hda6 of=bootsect.lnx bs=512 count=1

assuming /dev/hda6 is your linux partition where lilo/grub put its boot sector.

Now you need to find a way to copy bootsect.lnx to c:\(of windows). If it is FAT, just mount and copy then modify just as the above, otherwise for NTFS, you need to find a place to hold it as normally linux cannot write to NTFS, captive driver may be(can be a floppy or USB stick or even email/upload/ftp the file to somewhere else like yahoo). Then change this line :

4. add 'c:\boot\stage1="GRUB"' to c:\boot.ini

to c:\bootsect.lnx="LINUX/GRUB/LILO or whatever you want to call it"

hukdonfonix
12-04-2004, 04:35 PM
Ok, and im assuming that i issue that command while running from the livecd, sicne thats the only way i can currently get into linux.



now to copy it over and see if it works.

hukdonfonix
12-04-2004, 06:39 PM
Thanks for all your help, everything is working now! :D