Help! I’m getting a Grub 1.5 Error 21 after a Ubuntu USB hard drive install: We received this email the other day from someone who was trying to do a full Ubuntu Linux install to an external USB hard drive. This person already had Debian Linux installed on their local hard drive and was attempting to do an install of Ubuntu to an external USB hard drive.
During the Ubuntu USB hard drive installation process, Grub was accidently moved from the internal hard drive to their external hard drive, rendering the original Linux system unbootable without the external drive plugged in. When attempting to boot from the original Debian Linux system, they would encounter the Grub Error 21 shortly after the Grub 1.5 boot process.
The good news is that the fix to repair Grub on the original system was quite simple and is illustrated below:
Reinstalling or fixing Grub after error 21:
- Boot into the original Linux system with the external hard drive still installed (or you can boot from a Live Ubuntu CD).
- Open up a terminal and type sudo su
- Type fdisk -l and locate your Linux boot partition from the list Example: sda1 or hda1
- Type grub-install /dev/sdx or grub-install /dev/hdx to reinstall or repair Grub!
- Reboot and test!
Notes: x represents the drive letter a, b, c, d etc. Replace with your actual drive letter.
sdx= SATA, SCSI or USB devices hdx= IDE devices