Page 1 of 2

Grub error 22

Posted: 27 Mar 2010, 13:16
by viking60
Hey guys I really suck at grub. So after a Mandriva cooker update I have got this lovely black screen with:
Grub loading, please wait......
Error 22

Hmm this is strange: When I put in an USB-pen made with mandriva seed the boot goes just fine (no fixing no nothing). I I remove it = grub error again.
Looks like the disk detection is fubared.
Looks like this when booted from the USB-pen

Code: Select all

[thomas@viking60-server ~]$ df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb6              21G  7,4G   12G  39% /
/dev/sdb5              98G   20G   79G  20% /home
/dev/sda1             233G   94G  140G  40% /media/Gigathomas
/dev/sdb1             110G   73G   37G  67% /media/Nytt_volum
/dev/sdd              4,4G  4,4G     0 100% /media/PWP-2010-i586

Got an error here dunno if it is rellevant tho...

Code: Select all

[root@viking60-server thomas]# fsck /dev/sda1
fsck from util-linux-ng 2.17.1
fsck: fsck.ntfs-3g: not found
fsck: Error 2 while executing fsck.ntfs-3g for /dev/sda1


Code: Select all

[root@viking60-server thomas]# cat /etc/fstab
# Entry for /dev/sdb6 :
UUID=cadd7c16-0b28-4c7d-8740-4a4a53ef027a / ext4 relatime 1 1
# Entry for /dev/sdb5 :
UUID=c89c5907-a3e1-4b69-b619-0af96ed2ada2 /home ext4 relatime 1 2
# Entry for /dev/sda1 :
UUID=D094182894181396 /media/Gigathomas ntfs-3g defaults,umask=000 0 0
# Entry for /dev/sdb1 :
UUID=BA4C39AF4C3966F3 /media/Nytt_volum ntfs-3g defaults,umask=000 0 0
/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
# Entry for /dev/sdc1 :
UUID=BA6023D960239AE1 /media/win_c3 ntfs-3g defaults,umask=000 0 0
none /proc proc defaults 0 0
# Entry for /dev/sdb7 :
UUID=41dd094f-123f-4f55-baa5-1b542eba8f4a swap swap defaults 0 0

/boot/grub/menu.lst

Code: Select all

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd2,5)/boot/gfxmenu
default 0

title linux
kernel (hd2,5)/boot/vmlinuz BOOT_IMAGE=linux
root=UUID=cadd7c16-0b28-4c7d-8740-4a4a53ef027a resume=UUID=41dd094f-123f-4f55-b$
initrd (hd2,5)/boot/initrd.img

title linux-nonfb
kernel (hd2,5)/boot/vmlinuz BOOT_IMAGE=linux-nonfb
root=UUID=cadd7c16-0b28-4c7d-8740-4a4a53ef027a resume=UUID=41dd094f-123f-4f55-b$
initrd (hd2,5)/boot/initrd.img

title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe
root=UUID=cadd7c16-0b28-4c7d-8740-4a4a53ef027a failsafe
initrd (hd0,5)/boot/initrd.img

title windows
root (hd0,0)
makeactive
chainloader +1

title windows1
root (hd2,0)
map (0x81) (0x80)
map (0x80) (0x81)
makeactive
chainloader +1

Gimme a tip :D

Re: Grub error 22

Posted: 27 Mar 2010, 17:14
by dedanna1029
Ut ooh. Last time I got that, I had to rebuild the initrd. Sigh. Have forgotten how to do it, sorry. This one's rolf's lol.

Edit: here is the grub manual. In it, is a list of errors. Maybe you can find something from that?
22 : No such partition
This error is returned if a partition is requested in the device part of a device- or full file name which isn't on the selected disk.

Re: Grub error 22

Posted: 27 Mar 2010, 17:25
by viking60
Thanks! I'll dive into it. And I think we safely can say the disk detection is fubared. Edit:
It must have been a Kernel update here (I did not pay attention). It is not a good idea to have to many USB-disks connected when doing a kernel update - and that I had.
After having played around with it a bit I managed to get to the start menu. but it now gives me an error after entering the normal Mandriva:
Error 11: Unrecognized device string ( I kind of suspect that this could be because of my manual fiddling with /boot/grub/menu.lst)
A 2.6.33.1 (previous)kernel boot goes just fine. The thing is: I dont think that is a previous Kernel so I might just set that as the normal boot.

How do I copy the lines when editing this stuff? Or better put: How do I make a previous kernel boot in the startup menu my default boot?
Well I fixed it - sort off. I am now booting automatically a kernel alternative in the menu list.

Re: Grub error 22

Posted: 30 Mar 2010, 19:42
by dedanna1029
viking60 wrote:It must have been a Kernel update here (I did not pay attention). It is not a good idea to have to many USB-disks connected when doing a kernel update - and that I had.

What I used to do with Cooker was run first:

Code: Select all

urpmi --auto-update --test -v

That would let me know if a kernel update was coming in, and if things will be fubarred or not in general. If they were, I knew not to update in real-time mode. Also, if I saw a kernel update in the list, it gave me one last chance to unplug all my usb drives. As you said, it's not a good idea at all, especially with Cooker, to have usb drives plugged in during a kernel update. As well, if I suspected that an update to the kernel was coming in, I'd run:

Code: Select all

urpmi --auto-update --test --keep -v

That way I made absolute sure the previous kernel would be kept if the new one fubarred.

Re: Grub error 22

Posted: 30 Mar 2010, 19:47
by dedanna1029
It also assurred that I kept KDE3 in Cooker LOL.

Re: Grub error 22

Posted: 01 Apr 2010, 16:07
by rolf
viking60 wrote:How do I copy the lines when editing this stuff? Or better put: How do I make a previous kernel boot in the startup menu my default boot?
Well I fixed it - sort off. I am now booting automatically a kernel alternative in the menu list.


Looks like you found a way. I edit in vi, calling, as root,

Code: Select all

# vi /boot/grub/menu.lst


In vi in konsole, I can drag text to copy, middle-click to paste, with some quirk sometimes leaving off a few characters at the beginning, I don't know why. Other editors would work. The default can be set in the boot module of MCC or setting the entry you want, counting from the top entry as 0, in the default statement line at the top of menu.lst, fyi, some, at least, of which it seems you have figured out.

Re: Grub error 22

Posted: 01 Apr 2010, 22:42
by viking60
Thanks rolf - I figured out the counting bit :D After I started installing Gentoo I tell you this is nothing :D Man talk about frustrations. I am getting there tho... :ugeek:

Re: Grub error 22

Posted: 02 Apr 2010, 00:39
by rolf
I tried Gentoo a long time ago. It's ok but I think I'd rather spend my time on other things, not building the whole distribution from source. :P

Re: Grub error 22

Posted: 02 Apr 2010, 01:51
by dedanna1029
Funny. That's the part I like lol. It's what I appreciated about FreeBSD, Arch, and Gentoo all three.

Re: Grub error 22

Posted: 02 Apr 2010, 02:58
by viking60
rolf wrote:I tried Gentoo a long time ago. It's ok but I think I'd rather spend my time on other things, not building the whole distribution from source. :P


You know what - I totally agree with you now (I have learned). No one has time for that sh.. in a production environment. It is a good education tho. But I'll set up the server now and never touch it again. Spending three days on that is not worth it. Hell the gnome compilation alone toke 3 hours.

Re: Grub error 22

Posted: 02 Apr 2010, 03:18
by rolf
From time to time, I enjoy going through the steps and seeing if everything is in line so that the machine builds some software. Not long ago, I managed to follow the directions to get a 64-bit build of Seamonkey, which wasn't otherwise forthcoming. It's gratifying when it works, can take a lot of time if it doesn't. I appreciate all the work the Mandriva and community devels put into creating a distro that, for the most part, just works. :)

Re: Grub error 22

Posted: 02 Apr 2010, 03:23
by viking60
Yeah - although cooker is going a bit bananas these days. I Just had a kernel panic - and a box that refused to boot. rebooted and it kind of works - but this thing is far from being ready for a release.
I have managed to make the Gentoo install but the GUI bit just PMO so I gave that up- No problem since I started out to build a server anyway.