You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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:

1. First, Tweak Your BIOS/UEFI Settings

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.
2. Verify Your Disk Partitioning

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/sda uses a GPT partition table and you’re using Legacy boot mode, you’ll need a small 1MB BIOS Boot Partition (no file system, marked as bios_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.
3. Manually Install GRUB (If Automatic Setup Fails)

If the installer keeps throwing the "Unable to install GRUB in /dev/sda" error, try installing GRUB manually from the live environment:

  1. Mount your Ubuntu root partition (replace X with your actual partition number, e.g., sda1):
    sudo mount /dev/sdaX /mnt
    
  2. If you’re using UEFI mode (and have an EFI partition), mount it too (replace Y with your EFI partition number):
    sudo mount /dev/sdaY /mnt/boot/efi
    
  3. 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
    
  4. Switch to your installed Ubuntu system:
    sudo chroot /mnt
    
  5. Install GRUB to the mSATA drive:
    grub-install /dev/sda
    
  6. Update the GRUB configuration to detect all installed systems:
    update-grub
    
  7. Exit the chroot environment and reboot:
    exit
    sudo reboot
    
4. Alternative: Install GRUB to the Mechanical Drive

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/sdb instead 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:28:34