Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo -i
- # ===================================
- # Installed the system onto an USB drive, then
- # ===================================
- pacman -Syu
- pacman -S mc rsync linux52-zfs zfs-utils linux52-headers manjaro-tools arch-install-scripts
- modprobe zfs
- # ===================================
- # ZPOOL Create
- # ===================================
- ls -lh /dev/disk/by-id/
- sudo zpool create -f -o ashift=9 zroot /dev/disk/by-path/pci-0000:00:1f.2-ata-1-part3
- zfs create -o mountpoint=none zroot/DATA
- zfs create -o mountpoint=none zroot/ROOT
- zfs create -o compression=lz4 -o mountpoint=/ zroot/ROOT/manjaro
- zfs create -o compression=lz4 -o mountpoint=/home zroot/DATA/home
- zfs umount -a
- zfs set mountpoint=/ zroot/ROOT/manjaro
- zfs set mountpoint=legacy zroot/DATA/home
- # ===================================
- # SWAP
- # ===================================
- sudo zfs create -V 3G -b $(getconf PAGESIZE) -o compression=off -o primarycache=metadata -o secondarycache=none -o sync=always -o com.sun:auto-snapshot=false zroot/swap
- sudo mkswap /dev/zvol/zroot/swap
- # ===================================
- # ZPOOL POST
- # ===================================
- sudo zpool set bootfs=zroot/ROOT/manjaro zroot
- sudo zpool export zroot
- sudo zpool import -d /dev/disk/by-id -R /mnt zroot
- sudo zpool set cachefile=/etc/zfs/zpool.cache zroot
- # ===================================
- # BOOT PARTITION
- # ===================================
- mkfs.ext2 /dev/sda1
- sudo mkdir -p /mnt/boot
- sudo mount /dev/sda1 /mnt/boot
- # ===================================
- # INSTALL PACSTRAP
- # ===================================
- sudo pacstrap -i /mnt manjaro-system mc manjarozfs zfs manjaro-tools
- sudo genfstab -U /mnt >> /mnt/etc/fstab
- # add to fstab:
- # zroot/DATA/home /home zfs rw,auto 0 0
- sudo cp /etc/zfs/zpool.cache /mnt/etc/zfs/zpool.cache
- # ===================================
- # CHANGE ROOT
- # ===================================
- sudo manjaro-chroot /mnt /bin/bash
- export PS1="(ZFS root) $PS1"
- # from the chroot
- pacman -Syu
- pacman -S file diffutils rxvt-unicode nano
- pacman -S linux52 linux52-zfs linux52-headers zfs-utils mc rsync manjaro-tools arch-install-scripts grub
- # edited the /etc/mkinitcpio.conf hooks: "…block keyboard zfs filesystems,"
- systemctl enable zfs.target
- modprobe zfs
- echo options zfs zfs_arc_min=268435456 >> /etc/modprobe.d/zfs.conf
- echo options zfs zfs_arc_max=1073741824 >> /etc/modprobe.d/zfs.conf
- passwd
- # build kernel
- mkinitcpio -P linux
- # went without any error:
- # ===================================
- # GRUB INSTALL
- # ===================================
- grub-install --target=i386-pc --boot-directory=/boot --recheck --debug --force /dev/sda
- # failed to find the caninical drive:
- # BE SURE YOU ARE IN CHROOT!!!!!
- update-grub
- # after the link, it was created the config without any problem:
- ln -s /dev/sda3 /dev/disk/by-path/pci-0000:00:1f.2-ata-1-part3
- # changing the grub.cfg
- # 'root=ZFS=Zroo’t\ was changed to ‘zfs=zrooz’
- sed -i -e 's/root=ZFS=zroot\//zfs=zroot/g' /boot/grub/grub.cfg
- update-grub
- # edit /etc/defaults/grub
- nano /etc/defaults/grub
- GRUB_GFXPAYLOAD_LINUX=keep
- # Boot with systemd instead of sysvinit (openrc)
- GRUB_CMDLINE_LINUX="init=/lib/systemd/systemd dozfs=force zfsforce=yes"
- #GRUB_CMDLINE_LINUX="init=/sbin/init dozfs=force dozfs=force zfsforce=yes"
- # ===================================
- # TO REBOOT
- # ===================================
- exit
- sudo umount /mnt/boot
- sudo zfs umount -a
- sudo zpool export zroot
- sudo reboot
- # ===================================
- # POSTINSTALL
- # ===================================
- # initialy pacman compile in /tmp
- # which is in memory, and there will not be enough space
- sudo nano /etc/makepkg.conf
- # edit text
- BUILDDIR=/var/tmp/makepkg
- # swap
- sudo mkswap /dev/zvol/zroot/swap
- > Setting up swapspace version 1, size = 3 GiB (3221221376 bytes)
- > no label, UUID=0d9a89c0-7434-4414-9f3a-a10006998ea5
- # enable it
- swapon /dev/zvol/zroot/swap
- # edit fstab
- # swap
- UUID=0d9a89c0-7434-4414-9f3a-a10006998ea5 none swap sw 0 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement