PDA

View Full Version : [SOLVED] 10.04 clean installation on simple old h/w gives 'grub rescue'. But it looks OK.



henrylaw
September 22nd, 2011, 11:04 PM
Installed 10.04 (alternate) on an AMD K6-400 with 192M memory, completely wiping out the Fedora installation that was there, working. It has a single 6GB disk which I allowed the installer to partition automatically, with grub in the MBR. The installation apparently ran clean but when I reboot I get "invalid filesystem" and the boot rescue prompt. I did a complete clean install again, to be sure, and got the same result.

But using a live CD -- both the recovery console from Ubuntu and also SysRescueCD -- shows an EXT4 filesystem with all the directories and files that you'd expect.

I ran bootinfoscript, which I think confirms that everything is in order. The full results are at http://www.lawshouse.org/download/RESULTS.txt but the critical part is this:


============================= Boot Info Summary: ===============================

=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 1 for /boot/grub.

sda1: __________________________________________________ ________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04.1 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: Unknown
Boot sector info:

sda5: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 6448 MB, 6448619520 bytes
255 heads, 63 sectors/track, 784 cylinders, total 12594960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 * 2,048 11,943,935 11,941,888 83 Linux
/dev/sda2 11,945,982 12,593,151 647,170 5 Extended
/dev/sda5 11,945,984 12,593,151 647,168 82 Linux swap / SolarisSurely it should boot with that configuration? I'm at a loss to know what
to look at next.

I've looked at dozens of "grub rescue" posts on these forums but they're
mostly odd installation in some way -- external drives, dual boot, drives
over 192GB and so on. This one is dead simple!

YesWeCan
September 23rd, 2011, 01:07 AM
It all looks peachy to me, and yet...
The grub-rescue prompt arises when the Grub code at the start of the disk cannot find the /boot directory. So it is most likely not looking in the right place or the BIOS is giving it bad info.

Have you tried helping it by hand by following the "boot from grub-rescue" instructions here? https://help.ubuntu.com/community/Grub2#Rescue_Mode_.28.27.27grub_rescue.3E.27.27.29 _Booting

When you boot Ubuntu you'll need to run
sudo update-grub
sudo grub-install /dev/sda

mrgs
September 23rd, 2011, 01:07 AM
With 192 MB memory you should rather do a fresh install of Lubuntu.

garvinrick4
September 23rd, 2011, 01:21 AM
You have the Live CD so try to chroot into /. Boot off of live CD and open a terminal and:

sudo mount /dev/sda1 /mnt
sudo mount -o bind /dev /mnt/dev; sudo mount -o bind /dev/pts /mnt/dev/pts; sudo mount -o bind /proc /mnt/proc; sudo mount -o bind /sys /mnt/sys
sudo chroot /mnt
dpkg --configure -a
grub-install /dev/sda
update-grub
exit
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt/sys; sudo umount /mnt
sudo rebootIf you can get a internet connection on your live CD we can get a internet connection for your install while
in chroot. Run these first to see if you what is up with install and if grub will be placed. All looks well in the
portion of boot_info_script.sh you posted.
#But of course "invalid filesystem" is not a good thing. But this is worth a try any which way.
## Installing Lubuntu is a very good post

henrylaw
September 23rd, 2011, 10:08 AM
Quoth YesWeCan:
or the BIOS is giving it bad info
That was the key to it. This is an old BIOS and for reasons best known to itself it had forgotten what the disk geometry was. A little fiddling caused it to discover it (and the LBA mode), and off went Ubuntu with a roar. Thank you all for your helpful suggestions; I've learnt a lot as usual.

(And I'm downloading Lubuntu as I write; sounds more appropriate).