SD卡安装Ubuntu 16.04.2后启动报错grub rescue> 求助
Hey there, let's work through this Grub rescue issue together—this is a typical hiccup when installing Linux on external media like your SD card, especially on devices like the ASUS X205TA which has some specific boot quirks.
First: Is Your Partition Setup Correct?
Short answer: Yes, your partition structure (root /, home /home, and swap space) is totally valid and standard for Ubuntu installations. The error you're seeing isn't caused by bad partitioning—it's almost certainly a problem with how Grub2 was installed or referenced on your SD card. That long numeric string is the UUID Grub expects to find for your root partition, but it can't locate it (either because the UUID changed, Grub was installed to the wrong device, or the BIOS isn't detecting the SD card properly).
Step-by-Step Fixes for Grub Rescue
Let's start with the rescue mode commands, then move to permanent fixes once you can boot into Ubuntu.
1. Identify Your Root Partition in Grub Rescue
When you land at the grub rescue> prompt:
- Run
lsto list all detected storage devices and partitions. You'll see entries like(hd0) (hd0,gpt1) (hd1) (hd1,gpt2)—hd0is likely your internal storage,hd1your SD card. - Test each partition to find your root
/partition by running:
Replacels (hdX,gptY)/XandYwith the numbers from yourlsoutput. If you see directories likebin,etc,usr, that's your root partition.
2. Boot into Ubuntu Temporarily
Once you've found your root partition (e.g., (hd1,gpt2)), run these commands to load the normal Grub menu:
set root=(hd1,gpt2) set prefix=(hd1,gpt2)/boot/grub insmod normal normal
This should bring up the Grub menu—select Ubuntu to boot into your system.
3. Reinstall Grub2 to Your SD Card
Once you're logged into Ubuntu, we need to make sure Grub is installed to the SD card's main device (not just a partition) so the BIOS can detect it on boot.
- First, identify your SD card's device name with
lsblk. Look for a device around 32GB (e.g.,/dev/mmcblk0—ASUS X205TA typically usesmmcblkdevices for SD cards). - Depending on your boot mode (UEFI or Legacy), run the appropriate command:
- UEFI Mode (most common on newer X205TA models):
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck /dev/mmcblk0 - Legacy/BIOS Mode:
sudo grub-install /dev/mmcblk0
- UEFI Mode (most common on newer X205TA models):
- Update the Grub configuration to ensure it recognizes your partitions:
sudo update-grub
4. Tweak ASUS X205TA BIOS Settings
The X205TA has finicky boot settings—double-check these:
- Enter BIOS by pressing
F2during startup. - Set your SD card as the first boot device.
- If using UEFI, disable Secure Boot (it can block Linux bootloaders).
- Save changes and exit.
Why Boot Repair Failed?
Boot Repair often defaults to targeting the internal storage instead of external media like your SD card. If you want to try it again later, launch it with the option to specify the target device (your SD card) instead of letting it auto-detect.
内容的提问来源于stack exchange,提问作者sammydsssss

