This should work whether or not you are sitting in GRUB, or just hung frozen:
- (1) Reboot with the LiveCD.
(2) mount the swap drive (make sure you know what the partition was: mine was hda2.)
a) # mkswap /dev/hda2 <enter>
b) # swapon /dev/hda2 <enter>
(3) mount the other boot and root partitions:
a) # mount /dev/hda4 (yours might be hda3) /mnt/gentoo <enter> (this directory should exist)
b) # mkdir /mnt/gentoo/boot <enter> ('boot' folder may already exist'. Ignore error.)
c) # mount /dev/hda1 (the boot partition) /mnt/gentoo/boot <enter>
d) # mount -t proc none /mnt/gentoo/proc <enter> (this I think is necessary when booting off the liveCD)
(4) chroot to your hard drive:
a) # chroot /mnt/gentoo /bin/bash <enter>
b) # env-update <enter> (this may take a couple of minutes...)
c) # source /etc/profile <enter>
(You don't need to do anything else if your file systems are intact, other than the GRUB files.)
(5) Reinstall GRUB:
a) # grub-install --root-directory=/boot /dev/hda <enter>
(if you get an error here, make sure you have chrooted and mounted properly, start again.
That is, Exit and unmount, by following step 6, and reboot with the LiveCD again:)
(6) Exit the chrooted environment and unmount all partitions:
a) # exit <enter>
b) # cd <enter>
c) # umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo <enter>
d) # reboot <enter>
(don't forget to pull the CD out of the drive after you get the blank screen/BIOS screen.)
some of which I haven't fixed yet. Please post a reply whether this works or not for you.
But see also this thread: GRUB stopped working...
Easy Firewall with IPtables
Hardware Fixes
CUPS Printer Install
Switching Linux from Master to Slave
