LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Bootloader problems (both grub & lilo fail?) (http://www.linuxquestions.org/questions/debian-26/bootloader-problems-both-grub-and-lilo-fail-546061/)

Method9455 04-14-2007 04:01 PM

Bootloader problems (both grub & lilo fail?)
 
Hey,

So I installed Etch last night, (netinstall, standard system, desktop options), and it booted up just fine, detected all my hardware and was good to go. When I rebooted and chose Windows XP Media Center from my grub menu to make sure that still worked it failed with the message

"Missing /system32/ntoskrnl.exe" .. etc and failed to load WinXP.

That time I had used the MBR so after reparing that, I went back and installed grub to the Debian partition so that windows wouldn't be screwed up. So now I can use cfdisk to set either /sda1 (windows) to be bootable and that will be fine, or I can set it to /sda2 and Grub will load and with grub I can load Debian fine.

On my 3rd partition I have Slackware with Lilo and updated lilo.conf and tried that using cfdisk to /sda3 the bootable drive. Now when I set that up Lilo loads up, I pick Windows XP and it loads up fine. Seems good but then when I pick Debian, Debian's kernel loads up, all of the boot messages go fine, and then its starts up GNOME and I just get a frozen black screen. Its like the xserver starts, dies, but doesn't return to the console. I get no error messages out of it, and I end up having to reboot again to no avail.

Summary - Grub loads Debian but not Windows, Lilo loads Windows but not Debian. None load slackware because my Slackware kernel needs to be recompiled to work with my SATA driver, but I haven't bothered with it after doing all my re-partitioning the other night. Thats low priority, I think I might even get rid of Slackware in favor of Gentoo soon anyway so whatever.

I don't care Lilo/Grub, I used to have Lilo dual booting Windows/Slackware, but before that I had Grub doing Windows/Ubuntu. If anything I'd take Grub because most people use it, Grub 2 will come out eventually, and it is probably good to get it working.


fdisk -L output:
--------------------------------------------------------------------

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 10199 81923436 7 HPFS/NTFS
/dev/sda2 * 10200 16278 48829567+ 83 Linux
/dev/sda3 16279 19317 24410767+ 83 Linux
/dev/sda4 19318 38913 157404870 5 Extended
/dev/sda5 19318 22356 24410736 83 Linux
/dev/sda6 22357 23936 12691318+ b W95 FAT32
/dev/sda7 23937 38525 117186111 83 Linux
/dev/sda8 38526 38913 3116578+ 82 Linux swap / Solaris

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 14592 117210208+ 7 HPFS/NTFS
----------------------------------------------------------------------

/sda1 = windows
/sda2 = debian
/sda3 = slackware
/sda5 = (empty other future linux distro)
/sda6 = share between all OS drives
/sda7 = backup documents
/sda9 = swap
/sdb1 = primary documents


As for the grub section that works for debian fails for windows

title Debian GNU/Linux, kernel 2.6.18-4-686
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/sda2 ro
initrd /boot/initrd.img-2.6.18-4-686
savedefault

title Windows XP Media Center Edition
rootnoverify (hd0,0)
makeactive
chainloader +1
boot


The lilo section that fails for debian works for windows:

other = /dev/sda1
label = Windows
table = /dev/sda

image = /boot/vmlinuz-2.6.18-4-686
root = /dev/sda2
label = Debian
initrd = /boot/initrd.img-2.6.18-4-686
append ="root=/dev/sda2"
read-only



I'm really stumped by this I googled and searched here & forums.debian.net, for about 5 hours of trying to fix it on my own now and I'm getting no where.

Thanks for any help

Junior Hacker 04-14-2007 07:40 PM

Now that you fixed the missing kernel.exe in Windows, have you re-tried installing grub in the MBR without making changes to the grub.conf or menu.lst . If the same problem occures, it's easy enought to replace the kernel.exe to get Windows happening again.
The most likely cause for the error is that the BOOT.INI file does not point to the correct partition number where the Windows directory is located. In which case, I would install grub back as it was in the MBR and if the problem happens again, you can edit the BOOT.INI file to point to the correct partition.
The article below is from the site of my prefered boot loader's vendor, you can use the tools for free to accomplish this, you would need to create the bootitng floppy or CD and boot with it in the drive, click Cancel to avoid installing it and click OK to go into maintenance, then follow instructions in the article below.
http://www.terabyteunlimited.com/kb/article.php?id=130

Link to bootitng:
http://www.terabyteunlimited.com

Method9455 04-15-2007 08:18 PM

New solution: I just erased windows and went all debian. I was stuck with just debian for a few days and never missed windows, so I bit the bullet and just dumped Windows for this.


All times are GMT -5. The time now is 02:51 PM.