Https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#EFI_System_Partition
Https://wiki.archlinux.org/index.php/Beginners ' _guide_ (English) #Grub_2
Https://wiki.archlinux.org/index.php/Beginners%27_guide_ (English)
Http://www.linuxsir.org/bbs/thread379335.html what to consider in a virtual machine test using the full Btrfs + GPT process [share]
Https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#EFI_System_Partition
Https://wiki.archlinux.org/index.php/GRUB2_ (English) #. 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
Before the old fstab.
/dev/disk/by-label/btrfs-root/btrfs Defaults,noatime,compress=lzo,space_cache,autodefrag 0 0
/dev/disk/by-label/btrfs-root/btrfs Defaults,noatime,compress=lzo,space_cache,autodefrag 0 0
#/dev/disk/by-label/debian64/ext4 Defaults,noatime 0 1
/dev/disk/by-label/arch64/btrfs Subvol=arch64_rootfs,compress=lzo,space_cache,autodefrag,rw,relatime,noatime 0 1
/dev/disk/by-label/arch64/home Btrfs Subvol=arch64_homefs,compress=lzo,space_cache,autodefrag,rw,relatime, Noatime 0 1
/dev/disk/by-label/arch64/var/cache/pacman/pkg Btrfs SUBVOL=ARCH64_PKG,COMPRESS=LZO,SPACE_CACHE,AUTODEFRAG,RW, Relatime,noatime 0 1
Menuentry ' Arch Linux Btrfs ' {
Load_video
Set Gfxpayload=keep
Insmod Gzio
#insmod zlib
Insmod Btrfs
#set root= ' HD1 '
Set Btrfs_rootfs=arch64_rootfs
Set root_label=arch64
Search--label--no-floppy--set=root $root _label
linux/$btrfs _rootfs/boot/vmlinuz-linux root=/dev/disk/by-label/$root _label ro rootfstype=btrfs rootflags=subvol=$ Btrfs_rootfs,compress=lzo,space_cache,autodefrag rootwait Init=/usr/lib/systemd/systemd
initrd/$btrfs _rootfs/boot/initramfs-linux.img
#linux/boot/vmlinuz-linux root=/dev/disk/by-label/$root _label rw rootfstype=btrfs rootflags=subvol= $btrfs _rootfs Rootwait INIT=/USR/LIB/SYSTEMD/SYSTEMD
#initrd/boot/initramfs-linux.img
}
Parted-a optimal-s ${disc} mkpart 1 1 ${guid_part_size} >${log}
Parted-a optimal-s ${disc} set 1 bios_grub on script auto set specified partition to Bios_grub
IP link Set enp2s0f0 up
IP addr Add 192.168.1.2/24 dev enp2s0f0
IP route add default via IP address
Nano/etc/modules-load.d/virtio-net.conf
# Load ' Virtio-net.ko ' at boot.
Virtio-net
# Pacman-s Grub
# Grub-install--TARGET=I386-PC--RECHECK/DEV/SDA
Tip: If you want to automatically detect other operating systems installed on your hard disk, install Os-prober, or Pacman-s os-prober, before you execute the command below.
# Grub-mkconfig-o/boot/grub/grub.cfg
Gummiboot
Install the Gummiboot, execute the Gummiboot install to mount the bootloader to the EFI system:
# pacman-s Gummiboot
# Gummiboot Install
Grub
Install grub and Efibootmgr, and then execute grub-install to install Bootloader:
# Pacman-s Grub Efibootmgr
# grub-install--target=x86_64-efi--efi-directory=/boot--bootloader-id=arch_grub--recheck
Btrfs Subvolume Create/mnt/arch64_rootfs
Mount-t Btrfs-o subvol=arch64_rootfs,space_cache,autodefrag,compress=lzo,noatime/dev/disk/by-label/arch64/mnt
Show current partition layout:
# lsblk-f
UEFI users should also format the appropriate EFI system partition (take/dev/sdaxy as an example):
# Mkfs.vfat-f32/dev/sdaxy
# pacman-s Dosfstools
Note: For UEFI boot mode, the disk needs to have GPT partition table and Unified extensible Firmware Interface#efi System partition, FAT32 format, MiB or greater, Gdisk type EF00). In the following demonstration, it is assumed that ESP is mounted to/boot.
Select New (or press N) –enter–enter in the first sector to use all remaining space (or you can enter a certain size, such as "30G") –enter to keep the default hexadecimal code (8300) –
UEFI BOOT. It should is marked as EF00 or ef00 type code in Gdisk,
Create a FAT32 partition and in GNU Parted set/activate the boot flag [not Legacy_boot flag] on that partition
Note:if you get the message warning:not enough clusters for a all-in-a-bit fat!, reduce cluster size with MKFS.FAT-S2-F32. . OR-S1, otherwise the partition is unreadable by UEFI.
Shell Code
GUID Partition Table aka GPT
Main article guid_partition_table
Bit 2 of the attributes for The/boot partition need to is set.
# SGDISK/DEV/SDA--attributes=1:set:2
This would toggle the attribute legacy BIOS bootable on partition 1
Verify:
# SGDISK/DEV/SDA--attributes=1:show
1:2:1 (Legacy BIOS bootable)
Install the master boot record:
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin OF=/DEV/SDA
Shell Code
Error filesystem ' Btrfs ' doesn ' t support blocklists
Online also recommended/boot separate partition, non-btrfs, but it seems that upstairs everyone is Btrfs's/boot partition, need any special hack?
Resolved: GPT is still required, divided into a 2M BIOS partition, it appears that GRUB2 still cannot support Btrfs as easily as supporting EXT4 and other partitions
Additional requirements for partitioning:
If you are using a UEFI motherboard, you need to create an additional EFI system partition.
If you use the BIOS board (or if you intend to boot in BIOS compatibility mode) and you want to install GRUB on a GPT partition drive, you need to create an additional 1 to 2 MiB with the type code EF02 BIOS boot partition. Syslinux is not
EF00 type is UEFI partition
This article is from the "Guns and Roses blog," Please be sure to keep this source http://axlrose.blog.51cto.com/434566/1566688
ArchLinux installation of Btrfs GPT using Bios_grub mode boot