全新 Ubuntu UEFI 安装无法启动

全新 Ubuntu UEFI 安装无法启动

在我的东芝 Satellite E45T Ultrabook 上,我备份了 Windows 8 恢复分区;然后我启动了带有 Ubuntu 的 Live USB,清理了 HDD(750GB)和 SSD(32GB)上的所有内容,并安装了带有 UEFI 分区的全新 Ubuntu 14.04。目前,SSD 是空的,我在安装过程中选择 HDD 作为可启动设备。

安装完成后,我重启了笔记本电脑。不幸的是,只有一条消息Reboot and select proper Boot device or Insert Boot Media in selected Boot device and press key

我尝试从实时 USB 运行启动修复,但未能解决问题。生成的结果可在 Pastebin 下找到引导修复摘要

有人知道我该怎么做吗?

parted --list 结果:

Model: ATA HGST HTS541075A9 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  538MB  537MB   fat32                 boot
 2      538MB   744GB  743GB   ext4
 3      744GB   750GB  6350MB  linux-swap(v1)


Model: ATA TOSHIBA THNSNX03 (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags


Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdc: 7747MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  7747MB  7747MB  primary  fat32        boot, lba

df——人类结果:

Filesystem      Size  Used Avail Use% Mounted on
/cow            2.9G   57M  2.9G   2% /
udev            2.9G   12K  2.9G   1% /dev
tmpfs           589M  1.2M  588M   1% /run
/dev/sdc1       7.2G  980M  6.3G  14% /cdrom
/dev/loop0      939M  939M     0 100% /rofs
none            4.0K     0  4.0K   0% /sys/fs/cgroup
tmpfs           2.9G  1.1M  2.9G   1% /tmp
none            5.0M     0  5.0M   0% /run/lock
none            2.9G   80K  2.9G   1% /run/shm
none            100M   68K  100M   1% /run/user

答案1

如果您要使用 EFI 启动,则必须有一个 FAT 格式的 EFI 系统分区(类型 EF00)作为第一个分区。

只要您选择“挂载其他分区”选项,EFI 系统分区也将被挂载为 /boot/efi,您无需告诉安装程序挂载此分区。

'gparted' 和 'partitionmanager' 等 GUI 工具确实提供了支持 GPT 磁盘的 GUI 界面。

话虽如此,gdisk 应该是您帮助防止意外 GUI 异常的首选工具。

但是“Gparted - gparted”以及“KDE Partition Manager - partitionmanager”(以及其他工具)都是很好的工具,可以直观地描述您在 gdisk 中所操作的操作。

例如,假设它是 /dev/sda 并使用磁盘路径启动 gdisk:

sudo -i
gdisk /dev/sda

如果磁盘不是新磁盘或已经使用 GPT 的磁盘,则初始输出是警告:

GPT fdisk (gdisk) version 0.8.8
Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************
Command (? for help):

输入 ? 你将看到可用命令的列表:

Command (? for help):  ? 
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

要验证您正在处理的磁盘是否正确,请输入 p

命令(?获取帮助):p

Disk /dev/sda: 165478400000 sectors, 750 GiB 
Logical sector size: 512 bytes
Disk identifier (GUID): 0367762F-9C06-4A10-A668-A83554786870
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1654780600000
Partitions will be aligned on 2048-sector boundaries
Total free space is 1654777300000 sectors (750 GiB)
Number  Start (sector)    End (sector)  Size       Code  Name

现在您需要删除磁盘上的整个分区表才能设置新的 GPT 分区:

命令(?获取帮助):o

创建 EFI 引导加载程序分区

输入 n 添加新分区并输入 +500M 为引导加载程序指定大小。

Command (? for help):  n 
Partition number (1-128, default 1):  1 

First sector (34-1654780600000, default = 34) or {+-}size{KMGTP}: 
Information: Moved requested sector from 34 to 2048 in
order to align on 2048-sector boundaries.
Use 'l' on the experts' menu to adjust alignment
Last sector (2048-1654780600000, default = 1654780600000) or {+-}size{KMGTP}:  +500M 
Current type is 'Linux filesystem'

输入 L 将显示代码列表:

Hex code or GUID (L to show codes, Enter = 8300):  L 
0700 Microsoft basic data  0c01 Microsoft reserved    2700 Windows RE          
4200 Windows LDM data      4201 Windows LDM metadata  7501 IBM GPFS            
7f00 ChromeOS kernel       7f01 ChromeOS root         7f02 ChromeOS reserved   
8200 Linux swap            8300 Linux filesystem      8301 Linux reserved      
8e00 Linux LVM             a500 FreeBSD disklabel     a501 FreeBSD boot        
a502 FreeBSD swap          a503 FreeBSD UFS           a504 FreeBSD ZFS         
a505 FreeBSD Vinum/RAID    a800 Apple UFS             a901 NetBSD swap         
a902 NetBSD FFS            a903 NetBSD LFS            a904 NetBSD concatenated 
a905 NetBSD encrypted      a906 NetBSD RAID           ab00 Apple boot          
af00 Apple HFS/HFS+        af01 Apple RAID            af02 Apple RAID offline  
af03 Apple label           af04 AppleTV recovery      be00 Solaris boot        
bf00 Solaris root          bf01 Solaris /usr & Mac Z  bf02 Solaris swap        
bf03 Solaris backup        bf04 Solaris /var          bf05 Solaris /home       
bf06 Solaris alternate se  bf07 Solaris Reserved 1    bf08 Solaris Reserved 2  
bf09 Solaris Reserved 3    bf0a Solaris Reserved 4    bf0b Solaris Reserved 5  
c001 HP-UX data            c002 HP-UX service         ef00 EFI System          
ef01 MBR partition scheme  ef02 BIOS boot partition   fd00 Linux RAID

输入 ef00 使其成为 UEFI 分区:

Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed system type of partition to 'EFI System'

创建 /、/home 和 swap 分区

键入 n 添加新分区并键入 +XXXG 指定分区大小。

类型代码为 8300 Linux 文件系统和 8200 Linux 交换。

由于 gdisk 创建的是分区而不是文件系统,因此您需要通过终端来格式化每个分区:

对于 UEFI 分区:

sudo -i
mkfs -t vfat /dev/sda1

对于 Linux 分区:

sudo -i
mkfs -t ext4 /dev/sdax

对于交换分区:

sudo -i
mkswap /dev/sdax
swapon /dev/sdax

并继续使用手动分区进行安装,选择每个分区作为目标,不要选择 UEFI 分区

相关内容