安装 archlinux 之使用 EFI/GPT

vmware 上操作先看:vmware 上使用 EFI

建立ESP分区

参考 安装 archlinux 之用 parted 建立分区

 

第一行建立 gpt 分区表

第二行建立 ESP 分区

第三行设定 ESP 分区标志:boot

(parted) mklabel gpt
(parted) mkpart primary 1 512M
(parted) set 1 boot on

 

生成 ESP 分区的文件系统 fat32

mkfs.vfat -F32 /dev/sda1

 

安装grub2

mkdir -p /boot/efi
mount -t vfat /dev/sda1 /boot/efi

详见:
https://wiki.archlinux.org/index.php/GRUB2_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#.E5.88.9B.E5.BB.BA.E5.B9.B6.E6.8C.82.E8.BD.BD_UEFI_.E7.B3.BB.E7.BB.9F.E5.88.86.E5.8C.BA

https://wiki.archlinux.org/index.php/GRUB2#Hardware-Specific_UEFI_Examples

 

pacman -S grub-efi-x86_64
modprobe dm-mod
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug

详见:
https://wiki.archlinux.org/index.php/Beginners'_Guide_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#Grub_2

 

grub-mkconfig -o /boot/grub/grub.cfg
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

 

tips:

fstab 里不必包含ESP分区的信息

多块硬盘不影响

最好使用64位系统

 

EFI/GPT 简介

UEFI将替代已存在多年的BIOS,目前市场上的主板已经开始采用UEFI 。


从 Fedora 16 开始,将在全新的硬盘上默认使用 GPT (GUID Partition Table) 分区表。


现在的Mac基本都是64位的EFI Firmware。


在EFI系统上,windows只能安装到GPT磁盘。对于新安装,默认情况下,Windows 安装程序将创建可扩展固件接口系统分区(EFI 系统分区或 ESP)、Microsoft(R) 保留分区 (MSR) 和主 Windows 分区。

 

mbr无损转换为gpt?没找到方法。mklabel gpt 是丢失全部数据。

 

更多参考:

https://zh.wikipedia.org/wiki/%E5%8F%AF%E5%BB%B6%E4%BC%B8%E9%9F%8C%E9%AB%94%E4%BB%8B%E9%9D%A2

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#For_GPT_partitioned_disks

https://access.redhat.com/knowledge/docs/zh-CN/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s2-grub-whatis-booting-uefi.html

posted @ 2012-09-20 10:06  congbo  阅读(10295)  评论(0编辑  收藏  举报