ThinkPad T520安装Ubuntu 16.04时遇“Unable to install GRUB in /dev/sda”报错求助
Hey there, let's work through this GRUB installation error on your ThinkPad T520. I’ve dealt with similar issues on older ThinkPads with mSATA drives, so here’s a step-by-step breakdown of what to check and fix:
The T520’s firmware can be finicky with mSATA drives and newer OS installations. Reboot your laptop and press F1 to enter the BIOS, then check these settings:
- Go to the Startup tab:
- Set UEFI/Legacy Boot to Legacy Only or Both (Ubuntu 16.04 has spotty pure UEFI support on this model, especially with mSATA)
- Ensure SATA Controller Mode is set to AHCI (RAID mode often blocks GRUB from accessing the mSATA drive)
- Head to the Security tab:
- Disable Secure Boot (even though 16.04 supports it, this can cause conflicts on older hardware)
- Finally, in the Boot Order menu, make sure your mSATA drive (
/dev/sda) is listed as a bootable device and moved to the top of the list.
Your mSATA is /dev/sda and mechanical is /dev/sdb—let’s confirm the partition table type first:
- Boot into the Ubuntu live environment ("Try Ubuntu without installing") and run this command in the terminal:
sudo parted -l- If
/dev/sdauses a GPT partition table and you’re using Legacy boot mode, you’ll need a small 1MB BIOS Boot Partition (no file system, marked asbios_grub). If you don’t have one, create it using GParted before reinstalling. - If it’s an MBR partition table, just make sure there’s at least one primary partition (your Ubuntu root partition) where GRUB can install.
- If
If the installer keeps throwing the "Unable to install GRUB in /dev/sda" error, try installing GRUB manually from the live environment:
- Mount your Ubuntu root partition (replace
Xwith your actual partition number, e.g.,sda1):sudo mount /dev/sdaX /mnt - If you’re using UEFI mode (and have an EFI partition), mount it too (replace
Ywith your EFI partition number):sudo mount /dev/sdaY /mnt/boot/efi - Bind the system directories needed for chroot:
sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys - Switch to your installed Ubuntu system:
sudo chroot /mnt - Install GRUB to the mSATA drive:
grub-install /dev/sda - Update the GRUB configuration to detect all installed systems:
update-grub - Exit the chroot environment and reboot:
exit sudo reboot
If the mSATA drive still refuses to cooperate, try installing GRUB to your mechanical disk (/dev/sdb):
- During the Ubuntu installation, when you reach the "Installation type" step, select Something else.
- Assign your Ubuntu root partition’s mount point as
/. - In the Device for boot loader installation dropdown, choose
/dev/sdbinstead of/dev/sda. - Finish the installation, then reboot and press F12 to select the mechanical drive from the boot menu—you’ll be able to boot into Ubuntu from there.
内容的提问来源于stack exchange,提问作者user792918

