Troubleshooting Hints

grub rescue "attempt to read or write outside of disk 'hd0'"

My netbook (Fujitsu Siemens Amilo Ui-3520: Intel Atom N270, 1GB RAM, 32 GB Compact Flash Disk) is running fine with Lubuntu 14.10. It came originally with Windows XP Home Edition but since XP is EOL I switched to Linux.

One morning I got only a cryptic error message instead of my shiny GRUB boot menu:

grub rescue "attempt to read or write outside of disk 'hd0'"

Google delivers tons of hints regarding this message and how to deal with grub rescue mode, however I could not get my netbook to boot, 'cause when I attempted to "ls (hd0,msdos1)/boot/grub I got the same message again and could not launch grub. As mentioned none of the hints worked for me. I tried re-installing grub from a live CD etc. with no success.

In my case it was not a problem with grub or the HDD but with the CMOS settings. At some point I realized that CMOS settings seemed to be reset because the BIOS splash screen was presented at boot, something I always disable because I want to see BIOS/POST messages. Furthermore booting from PXE was disabled and I'm quite sure I enabled that. So I entered the CMOS setup and checked the settings, where I found the "LBA disk access method" disabled. Once I enabled it again my netbook was booting like a charm again.



Repair grub using a live system

sudo mount /dev/sdXY /mnt/boot/efi
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc
sudo cp /proc/mounts /mnt/etc/mtab
sudo chroot /mnt /bin/bash
grub-install /dev/sdX
update-grub

In case of trouble try:

grub-install --recheck /dev/sdX



SSH client outdated, connects impossible
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 123.123.123.123

or more permanently, adding to ~/.ssh/config

Host 123.123.123.123
KexAlgorithms +diffie-hellman-group1-sha1

Host 192.168.1.123
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc