PDA

View Full Version : Emergency - Grub Installation Problems!



gessi2000
11-25-2004, 10:52 AM
I'm an absolute newbie and tried to install Knoppix yesterday on my Notebook.
I have one HDD with two NTFS Partitions for Windows.
Now I made the second Partition smaller with QTparted and added two new Partitions (ext2), one Swap and one System Partition for Knoppix.
The Swap Partition is 'hda6' and the System Parition is 'hda7' on my HDD now.

I also installed Grub as Boot Manager.

When starting my machine now the computers stops with following message:


Grub loading Stage1.5.

Grub Loading,please wait...


Nothing further...

When starting with Knoppix again and mounting my hda7 Partition with

mount /dev/hda7 /mnt/hda7

I try to edit my menu.lst in the folder '/mnt/hda7/boot/grub' but I think it's O.K.!


# Deutsche Tastaturbelegung

setkey y z
setkey z y
setkey Y Z
setkey Z Y
setkey equal parenright
setkey parenright parenleft
setkey parenleft asterisk
setkey doublequote at
setkey plus bracketright
setkey minus slash
setkey slash ampersand
setkey ampersand percent
setkey percent caret
setkey underscore question
setkey question underscore
setkey semicolon less
setkey less numbersign
setkey numbersign backslash
setkey colon greater
setkey greater bar
setkey asterisk braceright
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hda7 ro ramdisk_size=100000 init=/etc/init lang=de apm=power-off nomce splash fb1024x768 vga=791

## default grub root device
## e.g. groot=(hd0,0)
groot=(hd0,6)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=false

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
howmany=all

## ## End Default Options ##

title Debian GNU/Linux, kernel
root (hd0,6)
kernel /boot/vmlinuz root=/dev/hda7 ro ramdisk_size=100000 init=/etc/init lang=de apm=power-off nomce splash fb1024x768 vga=791
initrd /boot/initrd.img
savedefault
boot

title Debian GNU/Linux, kernel 2.6.7
root (hd0,6)
kernel /boot/vmlinuz-2.6.7 root=/dev/hda7 ro ramdisk_size=100000 init=/etc/init lang=de apm=power-off nomce splash fb1024x768 vga=791
initrd /boot/initrd.img-2.6.7
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27
root (hd0,6)
kernel /boot/vmlinuz-2.4.27 root=/dev/hda7 ro ramdisk_size=100000 init=/etc/init lang=de apm=power-off nomce splash fb1024x768 vga=791
initrd /boot/initrd.img-2.4.27
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
title Windows 2K/XP/2003 (hda1)
rootnoverify (hd0,0)
makeactive
chainloader +1
savedefault
title Windows 2K/XP/2003 (hda5)
rootnoverify (hd0,4)
makeactive
chainloader +1
savedefault


But I don't know why it's not starting at all!?

I tried to setup grub again with:

grub
root (hd0,6)
setup (hd0)
quit


and got as message:

Filesystem Type ist ext2fs, partition type 0x83'

Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/gru Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,6)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.
b/stage2" exists... yes'
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,6)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.

I' getting mad meanwhile cause I cannot start Windows at all!

baldyeti
11-25-2004, 11:23 AM
I am no grub expert but everything you've posted looks plausible -yet doesn't work. Which FS type did you choose for your knoppix root FS? I am not sure grub would recognise say xfs or reiser4.

Anyway as to your windows problem, if you have an install CD, go to the recovery console, and use fixmbr and fixboot. This should restore your windows boot sequence. You can always come back to a grub or lilo setup afterwards.

mzilikazi
11-25-2004, 03:32 PM
I try to edit my menu.lst in the folder '/mnt/hda7/boot/grub' but I think it's O.K.!


Your menu.lst is probably ok. Simply reinstall grub from Knoppix like so:

mount /dev/hda7 /mnt/hda7
grub-install --no-floppy --root-directory=/mnt/hda7 --recheck /dev/hda

gessi2000
11-25-2004, 04:43 PM
I fixed my MBR with the Windows Recovery Console now.
So Windows is working.

As root FS I choosed ext3 but I think the Partitioner QTparted has a Problem with it.
Which FS should I use?

Meanwhile I installed Knoppix again!
This time with LILO.
But it also hangs while booting with the message:

L
nothing more :cry:

baldyeti
11-25-2004, 05:29 PM
Gee, you're cursed, man! BTW I think there was no need to re-install, grub is definitely fine with ext[23]. Since somehow you seem to have a problem with installing linux boot loader to the MBR with this laptop, you might approach the problem the other way around. Restore your Win MBR & boot sequence, install either lilo or grub to your root FS, then add a pointer to (a copy of) your linux boot sector in your C:\boot.ini file. This will in effect add an entry for booting linux from the MS boot loader. You can find detailed instructions here (http://www.hk8.org/old_web/linux/lnut/ch04_04.htm).

garyng
11-25-2004, 08:42 PM
There is no need to let grub be in MBR. Just install it to (hd0,6) then dd out the first 512 byte of it and follow the boot.ini modification instructions.

You will have your XP loader as usual and chain boot into GRUB on (hd0,6). The only thing I see is you need to find a way to store the 512 byte sector under *nix as writing to NTFS is not allowed. May be a floppy.

Another advice, just delete that stage 1.5 thing, I have no idea why they like to use it as it just create more conflicts with other boot loaders.

gessi2000
11-30-2004, 10:03 AM
Sorry, but I don't have a Floppy Drive!
Can I use an USB Stick instead?
Do I have to mount the USB Stick before I can copy the Bootsector on it?
How do I mount an USB Stick?

EDIT: Mounted it already as sda1!
bootsec.lnx is now on my USB Stick!

gessi2000
11-30-2004, 10:31 AM
I got the way with the boot.ini file now!
I installed Knoppix on hda7 now and the Swap Partition is hda6.
Installed Knoppix with Lilo in the root partition of Linux.
Also I edited the boot.ini and I can choose also Linux now on booting up.

But when booting Linus it still stops at the bootup screen showing not more than:

L
That's all.
What damed problem do I have???

rrfish72
12-04-2004, 06:38 PM
I had that L problem a while back. It said L 99 99 99 99 99 999 99 99 99 9 99 ....... Anyway I had to delete the partition, recreate it and reinstall it. That is the only way I could get around it. There probably is a fix for it but I didn't have the patience to wait for it. Try using cfdisk to make changes to your partitons.