LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-13-2010, 02:41 PM   #1
scottstensland
LQ Newbie
 
Registered: Feb 2010
Posts: 8

Rep: Reputation: 2
GRUB error 17


on boot I'm getting

GRUB error 17

on a Windows vista dual boot with mandriva 2010,
and I'm using a mandriva LiveCD.

fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa8a8a8a8

Device Boot Start End Blocks Id System
/dev/sda1 * 1531 33247 254766802+ 7 HPFS/NTFS
/dev/sda2 1460 60801 476664615 5 Extended
/dev/sda3 1 1459 11718976+ a5 FreeBSD
/dev/sda5 1460 1530 570276 83 Linux
/dev/sda6 33248 50569 139138933+ 83 Linux
/dev/sda7 50570 51078 4088511 82 Linux swap / Solaris
/dev/sda8 51079 60801 78099966 83 Linux

I see other posts asking for output of
grub files in /etc/ none found on my kit,
closest I see is

cat /boot/grub/menu.lst.example
timeout 10
color 2
splashimage (hd0,4)/grub/mdv-grub_splash.xpm.gz
default 0
viewport 3 2 77 22
shade 1

title 2611-8
kernel (hd0,4)/vmlinuz-2.6.11-8mdk root=/dev/hda6 resume=/dev/hda1
initrd (hd0,4)/initrd-2.6.11-8mdk.img


other posts reference this block of cmds
to which I need to perserve my dual boot
so uncertain how to proceed

mkdir /mnt/temp
mount /dev/hdaX /mnt/temp
chroot /mnt/temp
grub-install /dev/hda
exit
reboot

How do I make sense of output of fdisk shown above to issue above block of cmds ? Am familiar with unix as a software developer, not sysadmin

thanks - Scott

Last edited by scottstensland; 05-13-2010 at 03:21 PM. Reason: more concise
 
Old 05-13-2010, 04:05 PM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You Grub setup seems a bit odd with this line
Code:
kernel (hd0,4)/vmlinuz-2.6.11-8mdk root=/dev/hda6 resume=/dev/hda1
your hda1 or sda1 is a NTFS partition that got nothing to do with Mandriva's kernel.

The other odd thing is your Grub call the partitions hda6 and hda1 as against the booted up Mandriva which call them sda6 and sda1.

You seem to have a /boot in sda5 and / in sda6.

I suggest you to edit the menu.lst and replace the above line with

Code:
kernel (hd0,4)/vmlinuz-2.6.11-8mdk root=/dev/sda6 ro
The red bits are my suggested change with the resume parameter dropped.

You don't need to do a grub-install yet. I am assuming your sda5 is the /boot directory and has the required splash image /grub/mdv-grub_splash.xpm.gz inside.

It is possible that your kernel detects the sdax partition and the hdax named devices cannot be loaded.
 
1 members found this post helpful.
Old 05-13-2010, 05:07 PM   #3
scottstensland
LQ Newbie
 
Registered: Feb 2010
Posts: 8

Original Poster
Rep: Reputation: 2
no change, still getting GRUB error 17
after rebooting with your suggested edits of my :

/boot/grub/menu.lst.example

do I need to rename to this /boot/grub/menu.lst ?

I have not issued the grub-install

I find it bizarre LiveCD (mandriva) does not come with
a GRUB diag & repair application - super GRUB or such ?
must be political as its certainly in best interest of end users
to make such GRUB fixes avail.

next step ? should I post output of which cmd(s) ?

I really appreciate your help - Scott
 
Old 05-13-2010, 06:27 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You can rename your menu.lst to another name, say rubbish.txt. Grub will then be able to boot to a Grub prompt to enable you to boot the systems manually.

Believe me there is no installed operating system that cannot be booted by a Grub prompt.

In a Grub prompt you can fire up your renamed menu.lst any time with command
Code:
root (hd0,4)
configfile /boot/grub/rubbish.txt
If your grub configuration file is healthy then Grub can boot it. Without it Grub defaults to a Grub prompt.

You can fire up your Mandriva manually in the following manner

If /boot is in sda5 and / is in sda6 you tell Grub the root is sda5 or (hd0,4) in Grub's term
Code:
root (hd0,4)
You then type
Code:
kernel /vmlinuz-2.6.11
and hit the tap key so that Grub searches the partition to find a file that match the beginning. If it find the kernel it will respond by adding the missing bit which mean you have hit the correct partition and directory. You then add "ro" for ready only and state the location of the / like this
Code:
kernel /vmlinuz-2.6.11-8mdk ro root=/dev/sda6
you then add the ramdisk file again let Grub do the first part as it will find the missing bit Iindicated in red.
Code:
initrd (hd0,4)/initrd-2.6.11-8mdk.img
If Grub has no complaint then there is a 85% chance your Mandriva will boot if you give Grub the green light by command
Code:
boot
The above is to bypass the menu.lst completely. Once you find the correct instructions then edit the menu.lst so that you don't have to boot it manually every time.

Believe me you don't need Supergrub. Just tell Grub directly what you want! You can get everything the horse's mouth this way.

Last edited by saikee; 05-13-2010 at 06:29 PM.
 
Old 05-13-2010, 07:20 PM   #5
scottstensland
LQ Newbie
 
Registered: Feb 2010
Posts: 8

Original Poster
Rep: Reputation: 2
here is output of the grub cmd I issued from LiveCD


grub> root (hd0,4)
Filesystem type unknown, partition type 0x83

here is

fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa8a8a8a8

Device Boot Start End Blocks Id System
/dev/sda1 * 1531 33247 254766802+ 7 HPFS/NTFS
/dev/sda2 1460 60801 476664615 5 Extended
/dev/sda3 1 1459 11718976+ a5 FreeBSD
/dev/sda5 1460 1530 570276 83 Linux
/dev/sda6 33248 50569 139138933+ 83 Linux
/dev/sda7 50570 51078 4088511 82 Linux swap / Solaris
/dev/sda8 51079 60801 78099966 83 Linux



let me backup and give context to my GRUB error 17

prior to the GRUB error my mandriva 2010 laptop
ran out of battery and shut down (evidently too abruptly).
On boot it complained about filesystem corruption
and requested I run fsck which I did.
The fsck ran over 90 mins at which point
I did a hard powerdown as I thought it was just looping.
On boot I then started getting GRUB error 17

I have since ran (via LiveCD) a fsck /dev/sda6
which is now clean. I feel /dev/sda5 needs fixing
as its saying

fsck /dev/sda5
fsck from util-linux-ng 2.16.1
e2fsck 1.41.9 (22-Aug-2009)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda5

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


so then when I ran

e2fsck -b 8193 /dev/sda5
e2fsck 1.41.9 (22-Aug-2009)
e2fsck: Bad magic number in super-block while trying to open /dev/sda5

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


So possible reason why GRUB is erroring is sda5 is bad.
Should I start a new thread ? or is there something above
I have overlooked to fix sda5 to then address the GRUB issue ?

any suggestions are very welcome - Scott
 
Old 05-13-2010, 08:08 PM   #6
kurwongbah
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 23
Oh dear, looks like /dev/sda5 is broken beyond repair.
Grub tries to get its config from there and from that the kernel and ramdisk.
They are not there anymore...
Do you have a backup somewhere, dd dump or something?
You should make a point of umounting the /boot (/dev/sda5 in your case) every once in a while and do something like:
dd if=/dev/sda5 of=/var/backups/mybootpartition

There a a few possible scenarios in this case:
1) Boot from the live CD and restore your backup: dd of=/var/backups/mybootpartition if=/dev/sda5
Reboot
2) Boot from the live CD and recreate the boot partition by hand: mke2fs -t ext2 /dev/sda5
Copy files from the original install cd (or download the ones u where using from the repo mirror) to the newly created partition:
- kernel image (vmlinuz-2.6.11-8mdk)
- inird image (initrd-2.6.11-8mdk.img)
Reboot
Start grub boot process by hand as described above
When boot process works, proceed to grub-install
3) Reinstall Linux
If you have files you cannot miss, back em up:
a) Use Live cd and dd to backup root partition, if u have disk space to spare...
or b) Use Live cd and copy important data to your windows partition
or c) Boot windows, install ext2/3 driver from fs-drivers.org to access Linux partition and copy important files over to windows
 
  


Reply

Tags
boot, grub


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Grub can't find grub.cfg when booting - error: no such device Breagha Linux - Software 8 03-14-2010 12:40 PM
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 06:53 PM
Loading Grub 1.5 Please Wait...... Grub Failed Error 18 2words4uready Linux - Newbie 5 06-12-2008 05:37 PM
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM


All times are GMT -5. The time now is 07:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration