LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub 17 error (https://www.linuxquestions.org/questions/linux-newbie-8/grub-17-error-625703/)

nickstah 03-04-2008 04:25 PM

Grub 17 error
 
Mandriva One 2007 only

Hi, I have been using Mandriva happily for a few months and at the weekend tried to reformat an external hard drive to act as a back up drive. In the process I seem to have screwed up the auto mounting of my devices so that I now get a GRUB 17 error message on startup and my system hangs without even beginning to boot. I've done a bit of research and I think the problem is in the fstab file. As I'm a newbie, I'm a little scared of editing this file as I may do more damage.

Please find below some of the informtion I have managed to find. I have access to a terminal through a live CD and access to the internet through another computer.

Hoping somebody can help me out of this whole which I've got myself into. Thx


"/etc/fstab" contains the following...
none / unionfs rw 0 0
/dev/sda1 /media/hd ext2 sync,relatime 0 0
/dev/sda5 /media/hd2 vfat unmask=0022,users,iocharset=utf8,sync,noauto,exec 0 0
/dev/sr0 /media/cdrom auto unmask=0022,users,iocharset=utf8,sync,noauto,ro,exec 0 0


"fdisk -l" shows the following...
Device Boot Start End ID System
/dev/sda1 * 1 15353 83 Linux
/dev/sda2 15354 30401 5 Extended
/dev/sda5 15354 30027 b W95 FAT32
/dev/sda6 30028 30401 82 Linux Swap/Solaris

and "mount" shows the following...
none on / type unionfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sda5 on /media hd2 type vfat (rw,nosuid,nodev,sync,users,umask=0022,iocharset=utf8)

Emerson 03-04-2008 04:35 PM

Welcome to LQ!

This reformat thing you did sounds a little suspicious ... are you sure you formatted correct partition on the correct drive?
The fstab you see is from livecd, not the one your Mandriva is using. Assuming your root partition is sda1, do something like ls -a /media/hd to see if there are any files.

nickstah 03-04-2008 04:43 PM

it says

./ ../

Emerson 03-04-2008 04:55 PM

OK, what is the output of mount command from LiveCD?

nickstah 03-04-2008 04:59 PM

none on / type unionfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sda5 on /media hd2 type vfat (rw,nosuid,nodev,sync,users,umask=0022,iocharset=utf8)

Emerson 03-04-2008 05:05 PM

Hmh, it mounts automatically your Windows partition but not Linux ... try

mount /dev/sda1 /mnt/hd

Are you sure there is no typo in your initial post
Quote:

/dev/sda1 /media/hd ext2 sync,relatime 0 0

nickstah 03-04-2008 05:13 PM

I've checked and there is no typo.

I tried:
mount /dev/sda1 /media/hd

I used "media" because I think Mandriva uses media rather than "mnt"....and it says

mount: you must specify the filesystem type

Ps does this mean I have NOT reformated the HDD by mistake?

Emerson 03-04-2008 05:25 PM

OK, you got the idea, to mount sda1 and check if there are any files. If there was a valid Linux filesystem the mount command you issued would have mounted it. How did you reformat that external drive?

nickstah 03-04-2008 05:29 PM

I used the Mandriva Disk Partitioning GUI. Is there anything I can do to recover the data?

Emerson 03-04-2008 05:47 PM

You formatted it to FAT32?

nickstah 03-04-2008 05:52 PM

I partitioned the external hard drive approx 50/50 linux EXT3 and Windows. I can see from fdisk and the partitioning GUI with the live CD that I have not altered the size of the HDD partitions...so have I really reformatted the HDD as well as the external drive?

Emerson 03-04-2008 05:58 PM

OK, try this:

mount -t vfat /dev/sda1 /media/hd

Something weird has happened to your sda1, GRUB error 17 (from memory) means partition not found, I think.

nickstah 03-04-2008 06:05 PM

I just tried:

#mount -t vfat /dev/sda1 /media/hd

and

#mount -t ext3 /dev/sda1 /media/hd

for both it says:
wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or other error

Emerson 03-04-2008 06:09 PM

Hmmm ... what fsck tells you about sda1? fsck /dev/sda1

nickstah 03-04-2008 06:15 PM

It says:

Couldn't find ext2 superblock, trying backup blocks...
/dev/sda1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inode 7 has illegal blocks. Clear<y>?

What should I press?

I forgot to say in the intro, that after I had formatted the external drive, I still could not access it so I rebooted. Everything was going ok and it was booting as normal and it got partly through booting Mandriva, before giving me a prompt saying something like could not find ext2 on sd....supoerblock etc.

I then went back into the disk partitioner using the Live CD to demount the external drive. don't ask me why... I wish I'd never touched it obviously.

But this means that after the formatting, I had not formatted the wrong drive as it still booted up, if only partially.


All times are GMT -5. The time now is 09:12 AM.