-
Notifications
You must be signed in to change notification settings - Fork 101
ZFS (notes)
-
Clean partition table
zap-all device
-
Clear all magic strings (mdadm, lvm, partition table, ...)
dd if=/dev/zero of=device bs=512 count=2048
-
Create fresh GPT
sgdisk clear device
-
Inform the kernel of the partition change
partprobe device
-
Clear partition table
dd if=/dev/zero of=device bs=512 count=2048
-
Create fresh MBR
parted mktable device msdos
- Create BIOS boot partition (EF02) 2MB
- Create BOOT partition (8300) 512MB ext4
- Create EFI partition (EF00) 200MB fat32
- Create BOOT partition (8300) 512MB ext4
- Create an unique EFI/BOOT partition (EF00) 512MB fat32
- Create BOOT partition 512MB ext4
-
Create a SOLARIS type partition with the rest of the disk
-
Create zfs pool named antergos
modprobe zfs
zpool create -f -m /install antergos
- Set the mount point of the root filesystem
zfs set mountpoint=legacy antergos
- Create zfs vol swap
zfs create -V size -b sc_page_size -o primarycache=metadata -o checksum=off -o com.sun.auto-snapshot=false antergos/swap
- Set the bootfs property on the descendant root filesystem so the boot loader knows where to find the operating system.
zpool set bootfs=antergos antergos
- Export the pool
zpool export antergos
Does not work (if I wait some time it does, maybe zfs is still working on something at this point?)
zpool export -f antergos
With force always works
- Reimport the pool
zpool import -d /dev/disk/by-id -R /install antergos
- Set the mount point of the filesystem
zfs set mountpoint=/ antergos
- Create zpool.cache file
zfs set cachefile=/etc/zfs/zpool.cache antergos
- Copy created cache file to destination
cp /etc/zfs/zpool.cache /install/etc/zfs/zpool.cache
© 2017 Antergos