Results 1 to 5 of 5
Grub errors 17 and now 15. Tried following instructions from old posts but I'm
a newbie getting nowhere very slowly. Apologies if the following is a bit long.
I took ...
- 11-13-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
[SOLVED] Grub errors
Grub errors 17 and now 15. Tried following instructions from old posts but I'm
a newbie getting nowhere very slowly. Apologies if the following is a bit long.
I took the leap, ditched doze and installed opensuse a couple of months ago.
Full instal from DVD. No dual boot - just suse.
At instal I tried to be clever with the partitioning (first mistake).
I started out with 3 partitions: swap, / and /home and I only used half my disk.
Later I decided to resize the existing partions and add a 4th: /home/robert/virtual
(mistake no2 ?) but still working ok.
Then I was trying out an opensolaris live CD just before it all went wrong (that'll
probably be mistake no3). Went to boot up and got grub error 17.
Anyway used puppylinux on a usb to boot into the system and menu.lst was as follows:
# Modified by YaST2. Last modification on Tue Nov 2 00:33:06 GMT 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
###YaST update: removed default
default 0
timeout 8
gfxmenu (hd0,1)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
rootnoverify (fd0)
chainloader +1
I noticed there was an older verion of the menu.lst.(old or something similar)
as follows so I renamed it menu.lst and rebooted:
# Modified by YaST2. Last modification on Sun Oct 17 21:57:33 BST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
default 0
timeout 8
gfxmenu (hd0,1)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.3 - 2.6.34.7-0.4
root (hd0,1)
kernel /boot/vmlinuz-2.6.34.7-0.4-desktop root=/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part2 resume=/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part1 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.34.7-0.4-desktop
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3 - 2.6.34.7-0.4
root (hd0,1)
kernel /boot/vmlinuz-2.6.34.7-0.4-desktop root=/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.34.7-0.4-desktop
###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
rootnoverify (fd0)
chainloader +1
At rebooted I got grub error 15
Puppied in again and in terminal went to the /boot and did an ls
.
..
backup_mbr
boot
boot.readme
config-2.6.34.7-0.5-desktop
grub
initrd
lsout
message
symsets-2.6.34.7-0.4-default.tar.gz
symsets-2.6.34.7-0.4-desktop.tar.gz
symsets-2.6.34.7-0.4-xen.tar.gz
symtypes-2.6.34.7-0.4-default.gz
symtypes-2.6.34.7-0.4-desktop.gz
symtypes-2.6.34.7-0.4-xen.gz
symvers-2.6.34.7-0.5-desktop.gz
System.map-2.6.34.7-0.5-desktop
vmlinux-2.6.34.7-0.4-default.gz
vmlinux-2.6.34.7-0.4-desktop.gz
vmlinux-2.6.34.7-0.4-xen.gz
vmlinux-2.6.34.7-0.5-desktop.gz
vmlinuz
vmlinuz-2.6.34.7-0.5-desktop
What struck me was that the menu.lst referenced 2.6.34.7-0.4 but the ls output
has references to 2.6.34.7-0.5 so I tried editing menu.lst replacing 2.6.34.7-0.4
with 2.6.34.7-0.5
Reboot and I still get grub error 15.
Bit more digging and I check outputs for fdisk -l and fstab and grub.conf and
something looks wrong.
fdisk has boot in sda4 (hd0,3)? whilst fstab, menu.lst and grub.conf have it as
part2 / (hd0,1).
The swap partition I expected to be sda1 but seems to be sda3
Going by the no of blocks sda1 and sda4 are mixed up.
To my mind and the way I set it up fstab should be correct.
I'm confused!
fdisk -l:
Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 18275 146792448 83 Linux
/dev/sda2 18275 23432 41423872 83 Linux
/dev/sda3 26043 26305 2097152 82 Linux swap / Solaris
/dev/sda4 * 26305 30516 33829888 83 Linux
Disk /dev/sdb: 1003 MB, 1003421696 bytes
64 heads, 32 sectors/track, 956 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 956 978928 6 FAT16
fstab:
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part1 swap swap defaults 0 0
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part2 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part3 /home ext4 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part4 /home/robert/virtual ext3 acl,user_xattr 1 2
grub.conf:
setup --stage2=/boot/grub/stage2 --force-lba (hd0) (hd0,1)
setup --stage2=/boot/grub/stage2 --force-lba (hd0,1) (hd0,1)
quit
So I tried changing references in menu.lst and grub.conf below to (hd0,3) but I still
get grub error 15.
menu.lst:
# Modified by YaST2. Last modification on Sun Oct 17 21:57:33 BST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
default 0
timeout 8
gfxmenu (hd0,3)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.3 - 2.6.34.7-0.5
root (hd0,3)
kernel /boot/vmlinuz-2.6.34.7-0.5-desktop root=/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part2 resume=/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part1 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.34.7-0.5-desktop
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3 - 2.6.34.7-0.5
root (hd0,3)
kernel /boot/vmlinuz-2.6.34.7-0.5-desktop root=/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.34.7-0.5-desktop
###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
rootnoverify (fd0)
chainloader +1
grub.conf:
setup --stage2=/boot/grub/stage2 --force-lba (hd0) (hd0,3)
setup --stage2=/boot/grub/stage2 --force-lba (hd0,3) (hd0,3)
quit
If you've taken the time to read this far then thanks very much. If you can help
me out it would be greatly appreciated.
- 11-13-2010 #2
So, can either reinstall grub or see if update-grub can figure it all out.
To Reinstall:
Boot however you can and mount /dev/sda1.
I've never run update-grub but I know it's in /usr/sbin/update-grub and it will recheck/edit the menu.lst file. Given the disparity in your files I would try update-grub first and if that doesn't fix it then reinstall.Code:mount -t auto /dev/sda1 /mnt grub-install --recheck --root-directory=/mnt /dev/sda1
HTH
Edit: One way around the distro hopping / grub issues is to find an OS that supports virtualbox-ose and once installed you can 'virtually' install another OS and if you like it then take the plunge to installing it as your host OS instead of running it as a guest. My distro search went something like this:
XP Pro
Dual Boot XP Pro / Ubuntu
Ubuntu
Debian
I ditched XP after 6 months of Ubuntu then blew that away after 2 upgrades and have been running Debian flawlessly for a year.
Last edited by barriehie; 11-13-2010 at 03:24 AM. Reason: More Info.
- 11-13-2010 #3
This might help
If you boot to your Linux install CD you should have the menu option to restore the bootloader.
It does not always find all of the O.Ss on the drives. Fifty percent of the time it will find the O.S that it installed. Some install CDs are better at configuring Grub so it works with all of your O.S installations.
Grub has a shell terminal that can be started in the (Choose OS to boot menu). Whatever you do here is not re- written to the Grub (list-menu) so you can copy your list-menu , keep a copy on a sheet of paper and experiment with it. If you find something that works you can edit your list-menu file later.
I spent about fifteen hours searching the net for Grub info and suggest you read guides to LILO for more info. I could not find a guide that was more that ten percent complete for Grub.
Grub is not all that stable and predictable with more than two OSs on it.
1. The kernel command is a command to boot the kernel with the arguments after it. Seems self explanatory but not really.
2. vmlinuz is the name for the kernel image.
3. Chainloading means that Grub the bootloader, is going to load another bootlloader into RAM.
4.initrd is a command to load a RAMdisk into memory that SOME Linux Distros need. It' like a hard drive in you RAM that has the characteristics of a hard drive, any application can access it.
- 11-14-2010 #4Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
Thanks for your replies. I'll have another shot at it tonight and let you know how I get on. Appreciated.
- 11-18-2010 #5Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
I am now back in suse.
Apparently I cant post html links in this forum so I can't reference other info I found helpfull but for the benefit of anyone reading looking at the same problem I'm pasting in the code.
1. Appears I had a broken symlink for initrd (the image file was missing). I fixed that by following instructions:
(1) boot live-cd
(2) open terminal
(3) type the following:
sudo su -
mkdir /mnt/disk
mkdir /mnt/disk/dev
mount /dev/{device_of_your_harddisk} /mnt/disk # (for most {device_of_your_harddisk} would be /dev/sdaX where X is the partition of your root disk, in my case /dev/sda1)
mount --bind /dev /mnt/disk/dev
chroot /mnt/disk
mount /proc
mount /sys
mkinitrd
2. The partitioning is mixed up - I don't know if it was necessary but I edited fstab to make it match the output of fdisk -l so it now looks like:
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part1 /home/robert/virtual ext3 acl,user_xattr 1 2
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part2 /home ext4 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part3 swap swap defaults 0 0
/dev/disk/by-id/ata-Maxtor_6V250F0_V50BYYDG-part4 / ext4 acl,user_xattr 1 1
3. Having taken advice to read up on grub then found this post to get grub to boot from rescue mode
.....boot the system and run grub command
Remember that for grub (hd0,1) means hda (primary controller master), second partition.
Now we need to tell grub where are the grub files:
If you know where they are, type something like:
root (hd0,1)
else if you have no idea, type:
find /boot/grub/stage1
and then the root command with the correct parameters:
setup (hd0)
to install it on hd0, that is MBR of the first HD.
type quit and reboot.
I've still got some issues with permissions but I can muddle along now.
Thanks for help and advice.


