LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Server rebooted unexpectedly, no boot of OS due to GRUB error 22 (https://www.linuxquestions.org/questions/debian-26/server-rebooted-unexpectedly-no-boot-of-os-due-to-grub-error-22-a-495777/)

igreenhalgh 10-26-2006 10:53 AM

Server rebooted unexpectedly, no boot of OS due to GRUB error 22
 
Hi folks

I have setup a debian 3.1 server running Apache and Plone CMS. Server has been running perfectly for three weeks. Today the server unexpectedly rebooted itself and when I noticed this, the screen simply said:

GRUB
Error 22

Looking up this error, it appears that the partition table has been corrupted. I think there was a power interruption caused by someone accidentally pulling on the power cord which caused the power to drop for a split second and the server to reboot.

Can someone please tell me how to fix this problem with GRUB and get the server booting again?

linmix 10-27-2006 09:47 AM

As you correctly mentioned this is probably due to a corrupted partition table
Quote:

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.
In order to rebuild the partition table (the table, not the partitions!) use a tool like fdisk or cfdisk

igreenhalgh 10-31-2006 11:59 AM

Well, I downloaded and booted the Super GRUB disk and used the auto repair option. It didn;t work, I don't get any errors, after the SCSI BIOS screen when it should start booting and showing kernel info, it just gives me nopthing, a white cursor and nothing else. GRUB disk and Debian install disk won't boot either now. I used a ubuntu disk to boot and that worked fine, it will run ubuntu live from the CD fine. I tried the boot from first hard disk option of the ubunto boot disk menu and it successfully booted from the hard disk into my debian install, and it all worked fine, so the data on the disks is fine, just an issue with GRUB it would seem.

So, I can boot into debian using the ubuntu boot disk. How do I repair the GRUB boot problem from within Debian after booting using a boto disk?

linmix 11-06-2006 03:09 AM

From what you say I understand that you can now access the debian share(s). Try this: open a shell and as root type (or do sudo...)
Quote:

chroot /path/to/debian/root-directory
Just oin case you have a separate /boot partition do
Quote:

unmount /boot
mount /boot
to make sure the right /boot partition is mounted.
Then reinstall grub with the command
Quote:

grub-install /dev/hda
provided you want to install it to the MBR of your first HDD
Now try to boot normally. Hope that solves it!


All times are GMT -5. The time now is 08:34 PM.