Advertisement
RobertKalmar

Ubuntu 18.04 - ZFS

Aug 10th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.78 KB | None | 0 0
  1. Alaprendszer könyvtárak létrehozása, target könyvtárba....
  2.  
  3. apt -y install debootstrap
  4. debootstrap --include=zfsutils-linux bionic /target
  5.  
  6. echo asztalos01 > /target/etc/hostname
  7. echo "127.0.1.1 asztalos01.matrixhome.lan asztalos01" >> /target/etc/hosts
  8.  
  9. cat < /target/etc/netplan/00-lan-config.yaml
  10. # This file is generated from information provided by
  11. # the datasource.  Changes to it will not persist across an instance.
  12. # To disable cloud-init's network configuration capabilities, write a file
  13. # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  14. # network: {config: disabled}
  15. network:
  16.     ethernets:
  17.         enp2s0:
  18.             dhcp4: true
  19.     version: 2
  20. EOF
  21.  
  22. mount --rbind /dev /target/dev
  23. mount --rbind /proc /target/proc
  24. mount --rbind /sys /target/sys
  25. chroot /target /bin/bash
  26.  
  27. cat <> /etc/apt/sources.list
  28. #deb http://archive.ubuntu.com/ubuntu bionic main
  29.  
  30. deb http://archive.ubuntu.com/ubuntu bionic-updates main
  31. deb http://security.ubuntu.com/ubuntu bionic-security main
  32. deb http://archive.ubuntu.com/ubuntu/ bionic universe
  33. deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
  34. deb http://security.ubuntu.com/ubuntu bionic-security universe
  35. EOF
  36.  
  37. apt -y install linux-image-generic
  38.  
  39. apt -y install gdisk dosfstools zfs-initramfs
  40. mkdosfs -F 32 -n EFI-SDA1 /dev/sda1
  41. mkdosfs -F 32 -n EFI-SDB1 /dev/sdb1
  42. mkdosfs -F 32 -n EFI-SDC1 /dev/sdc1
  43.  
  44. mkdir /boot/efi
  45. echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-partlabel/sda1-EFI) /boot/efi vfat defaults 0 1 >> /etc/fstab
  46. mount /boot/efi
  47.  
  48. apt -y install grub-efi
  49.  
  50. grub-probe /
  51.  
  52. update-initramfs -u -k all
  53. update-grub
  54. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck --no-floppy
  55. echo '\EFI\ubuntu\grubx64.efi' > /boot/efi/startup.nsh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement