Jump to content

Grub loading error


nickstah
 Share

Recommended Posts

Mandriva 2007 only, no Windows

 

I've been happily using Mandriva for 4 months and this morning attempted to backup my system to an external hard drive.

 

The external hard drive was inherited from a Windows system and therefore I could not write to it. I attempted to use Mandriva's disk partitioning tool to reformat the external drive for use with Linux. The drive is 250gb and I reduced the existing windows partition to 100gb and created a new 150gb partition for Linux. Everything seemed fine in Mandriva but I could not find my new partition on the external drive so I rebooted.

 

Initially I got a message saying that the ext2 was not valid....superblock etc, so I tried to repair from the Mandriva installation disk. As I got Mandriva One, all it did was open a Mandriva session from the CD rom and did not repair anything.

 

Now when I reboot, I get the message:

 

GRUB Loading stage1.5

GRUB loading. please wait....

Error 17

 

and the system hangs.

 

I desparately need help in trying to recover the system but I'm afraid the more poking about I do, the more damage I do.

 

If anyone can help, I would be extremely grateful as I only have a partial back up of what is on the drive.

 

Thanks in advance

 

PS I have access to a terminal using the Mandriva disk, so I need help in mounting the drives correctly. Thx

 

 

[moved from Installing Mandriva by spinynorman - welcome aboard :)]

Edited by arctic
Link to comment
Share on other sites

Welcome to MUB!

 

I am not sure what you are doing when you boot up. If the system tries to boot from the external drive, you will get a grub error since the device was not configured for booting. Boot without the external drive plugged in. Do you get a grub error? If yes, then you were editing the wrong drive! That would be toast. If you get a boot, plug the drive in after booting. You can then configure grub for booting from that device.

Link to comment
Share on other sites

I unplugged the external drive and got the same GRUB message as before.

 

I'm pretty certain I was editing the correct drive though. The HDD was SDA and the external SDF. It was SDF that I was editing and did not touch SDA. Also, after I had done the disk partitioning and before I used the Mandriva CD ROM; the normal Mandriva start-up sequence launched and only stalled when it found a problem with the mounting of the partitions. It's only since I used the Mandriva CD ROM that the GRUB message appeared.

 

From my limited knowledge and searches under GRUB 17 errors, I think I have screwed up the mounting of the partitions.

 

Is there anything I can try or do I have to re-install everything? This will mean I have lost everything, so it's obviously a last step for me!

Link to comment
Share on other sites

Try the following:

 

At the boot-screen menu, hit "e" for editing the entry. You should get a display of the grub configuration. the important area is the "root" entry here, as it seems that it has a wrong pointer.

Let's assume it lists

 

root (hd0,0)

 

and comes up with Error 17, then the hd0,0 entry is not configures correctly. Hit "e" again, edit the entry, so that it really points to the root partition you have, e.g.

 

root (hd0,1)

or

root (hd1,0)

 

This really depends on your setup. You can find out the partitions you have e.g. by booting the live-CD again, opening a terminal and launch the command as root:

 

fdisk -l

 

this will list all partitions of your system. In my case it shows:

Platte /dev/hdc: 80.0 GByte, 80060424192 Byte
255 Köpfe, 63 Sektoren/Spuren, 9733 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Disk identifier: 0xe131e131

  Gerät  boot.	 Anfang		Ende	 Blöcke   Id  System
/dev/hdc1   *		   1		1288	10345828+  83  Linux
/dev/hdc3			1289		1543	 2048287+  82  Linux Swap / Solaris
/dev/hdc4			1544		9733	65786175	5  Erweiterte
/dev/hdc5			1544		9733	65786143+  83  Linux

Platte /dev/hdd: 160.0 GByte, 160041885696 Byte
255 Köpfe, 63 Sektoren/Spuren, 19457 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Disk identifier: 0x000a37c6

  Gerät  boot.	 Anfang		Ende	 Blöcke   Id  System
/dev/hdd1   *		   1		8926	71698063+  83  Linux
/dev/hdd2			8927	   19457	84590257+   5  Erweiterte
/dev/hdd5			8927	   19457	84590226   83  Linux

 

the root partition has an ID83* entry (native linux), thus in my case, the entry could/should be:

 

root (hd0,0)

 

Once you have adjusted the setting, hit "Enter" and "b" for booting. Remember that these changes are temporary, thus if anything goes wrong it can be changed again and again.

 

 

*= The IDs and their meaning:

0  Empty			9  AIX bootable	75  PC/IX		   b7  BSDI fs		
1  DOS 12-bit FAT   a  OS/2 Boot Manag 80  Old MINIX	   b8  BSDI swap	  
2  XENIX root	  40  Venix 80286	 81  Linux/MINIX	 c7  Syrinx		 
3  XENIX usr	   51  Novell?		 82  Linux swap	  db  CP/M		   
4  DOS 16-bit <32M 52  Microport	   83  Linux native	e1  DOS access	 
5  Extended		63  GNU HURD		93  Amoeba		  e3  DOS R/O		
6  DOS 16-bit >=32 64  Novell Netware  94  Amoeba BBT	  f2  DOS secondary  
7  OS/2 HPFS	   65  Novell Netware  a5  BSD/386		 ff  BBT			
8  AIX

Link to comment
Share on other sites

Please could you clarify how and where I should I hit "e"? I can't seem to get into the GRUB configuration. I tried pressing "e" during the boot phase but the GRUB17 message appeared again. Can I make the changes in a terminal window as I have access to this through the Live CD.

 

On the plus side, with the live CD, I was able to get the following from the "fdisk - l" query:

 

Boot ID

/dev/sda1 * 83 Linux

/dev/sda2 5 Extended

/dev/sda5 b Win95 FAT32

/dev/sda6 82 Linux swap/Solaris

 

 

This makes sense because when I set up the system originally, I partitioned the HDD approximately 50% for Linux and 50% for Windows, just in case I wanted to install Windows after all. I never have and never will! I have one internal SATA drive.

 

The size of the partitions agrees with my original partitioning, so I think this means that I have not repartitioned the HDD by mistake. The external drive was definitely sdf.

Link to comment
Share on other sites

Please could you clarify how and where I should I hit "e"?
When the computer is turned on, you will see the boot-menu

 

Mandriva

failsafe

...

 

Right there, press e.g. the arrow down key and afterwards the arrow up key. This will bypass the usually active timeout mode (boot system X after X seconds automatically). At the bottom of the page , there should be an explanation for editing grub. Anyway, at this stage you should press "Esc" (sorry, I forgot to mention this before :juggle: ), then "e".

 

Yes, you can make permanent changes to grub from a Live-CD terminal. For this, you will have to mount the root partition in root mode, open the root partitions /boot/grub/menu.lst file and commit the changes. Do a bit of search on this board or in google. There are tons of pages that explain how to edit grub. If you need further help, let us know. :)

Link to comment
Share on other sites

When the computer is turned on, you will see the boot-menu

 

Mandriva

failsafe

...

 

That's part of the problem, it no longer gets to this stage. The GRUB message comes up before the Mandriva boot menu.

 

After my initial changes and reboot, the screen did appear and it would proceed as normal before reaching a point where it gave me a message about "ext2 not being a valid drive" - sorry I can't remember the exact phrase now. Then it would just hang.

 

Then I used the Live CD to see if I could sort it out. Through the Live CD I went back into the Mandriva partitioning tool to unmount the external drive. Since I did this, even the Mandriva screen does not appear before the GRUB message.

 

It goes without saying that I should have not tried to fix it without help but if you can dig me out of this hole, I will be mightily relieved! :wall:

 

PS I still have internet access through another Windows computer from work (or through the Live CD if necessary), hence these messages.

Link to comment
Share on other sites

You can try the rescue mode, and choose restore grub, or reinstall boot loader. Please see instructions: DiskRescue

 

Thanks for the suggestion. My install disc only gives me the following options after hitting F3. F1 is a help screen.

 

Boot from hard disk

Installation

Installation ACPI disabled

 

then it gives me boot options:

 

a) installer options

Install

Network options

 

b) Kernel options

splash

acpi

ide

 

Is there anyway I can get to the repair option as hitting F1 does not give me a prompt.

Link to comment
Share on other sites

You can reinstall grub with the live-CD. It is a bit more complicated but should work.

 

Boot the CD, mount the /root partition (mount -t /dev/hda1 /mnt) with root privileges from a terminal. Chroot into your system

e.g.

chroot /dev/hda1

 

You will be root user of your installed system from now on. Now run

 

grub-install /dev/hda

 

then exit and reboot. That should basically get you up and running again - unless you really borked your system.

Link to comment
Share on other sites

Arctic, can I just clarify a couple of things from the above, in an attempt not to screw it up even more.

 

I should boot the Mandriva Live CD and open a terminal as a root, then:

 

mount -t/dev/hda/mnt (Should this be hda or sda?)

grub-install /dev/hda (same question)

 

Exit and reboot as normal.

 

I'm ok with the last bit but please could you spell it out for the first bit as this is a bit beyond me. Thanks

Link to comment
Share on other sites

After typing

 

mount -t /dev/hda1 /mnt

 

in the terminal, it came up with the help on syntax on "mount". Do I have it exactly right above or should I change it in some way?

 

I tried mount -t /dev/hda1 /mount and that seemed ok, but then when I tried to chroot to /dev/hda1, it could not find the directory.

Link to comment
Share on other sites

mount -t /dev/hda /mnt

It might be necessary that you specify the filesystem type, e.g.

mount -t ext3 /dev/hda /mnt

hda, hdb, hdc will be used if you have PATA harddisks, while sda, sdb, sdc will be used with SATA disks.

If the partition is not mounted, you (logically) cannot chroot into it and thus cannot reinstall grub. ;)

 

If you get stuck with commands, always try

commandname --help (e.g. mount --help)

first as it will explain the basics of any command (more information is available with "man commandname")

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...