Advertisement
Guest User

Untitled

a guest
Oct 7th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. ## login to live boot and start a bash session
  2.  
  3. # login
  4.  
  5. username: root
  6.  
  7. password: voidlinux
  8.  
  9. # start a bash session
  10.  
  11. bash
  12.  
  13. ## setup wifi for installation
  14.  
  15. wpa_passphrase 'My SSID' >> /etc/wpa_supplicant/wpa_supllicant.conf Password
  16.  
  17. sv restart dhcpcd
  18.  
  19. # test that wifi is working
  20.  
  21. ping voidlinux.org
  22.  
  23.  
  24. ## disk partitioning
  25.  
  26. # create the partitions
  27.  
  28. /dev/sda1 of size 1G to mount as /boot, with boot flag activated
  29.  
  30. /dev/sda2 of all remaining free space to mount as /
  31.  
  32. # add filesystems and extra options
  33.  
  34. cryptsetup luksFormat /dev/sda1
  35.  
  36. cryptsetup luksOpen /dev/sda1
  37.  
  38. mkfs.ext2 -L boot /dev/sda1
  39.  
  40. cryptsetup luksFormat /dev/sda2
  41.  
  42. cryptsetup luksOpen /dev/sda2 crypt-pool
  43.  
  44. vgcreate pool /dev/mapper/crypt-pool
  45.  
  46. lvcreate --name swap -L 3G pool
  47.  
  48. mkswap -L swap /dev/mapper/pool-swap
  49.  
  50. lvcreate --name root -l 100%FREE pool
  51.  
  52. mkfs.ext4 -L root /dev/mapper/pool-root
  53.  
  54. ## mount the partitions
  55.  
  56. mount /dev/mapper/pool-root /mnt
  57.  
  58. mkdir /mnt/{boot,dev,proc,sys}
  59.  
  60. mount /dev/sda1 /mnt/boot
  61.  
  62. mount --rbind /dev /mnt/dev
  63.  
  64. mount --rbind /proc /mnt/proc
  65.  
  66. mount --rbind /sys /mnt/sys
  67.  
  68. ## install and configure the system
  69.  
  70. xbps-install -S -R http://repo.voidlinux.eu/current -r /mnt base-system lvm2 cryptsetup grub-x86_64-efi efibootmgr
  71.  
  72. chroot /mnt /bin/bash
  73.  
  74. passwd root
  75.  
  76. chown root:root /
  77.  
  78. chmod 755 /
  79.  
  80. vi /etc/rc.conf
  81.  
  82. echo host >/etc/hostname
  83.  
  84. # setup fstab
  85.  
  86. vi /etc/fstab:
  87.  
  88. # <filesystem> <dir> <type> <options> <dump> <pass>
  89.  
  90. tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
  91.  
  92. /dev/crypt-pool/root / ext4 defaults 0 0
  93.  
  94. /dev/sda1 /boot ext2 defaults 0 0
  95.  
  96. /dev/mapper/swap swap swap defaults 0 0
  97.  
  98. ## setup grub
  99.  
  100. grub-install /dev/sda
  101.  
  102. echo "LANG=en_US.UTF-8" > /etc/locale.conf
  103.  
  104. echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
  105.  
  106. xbps-reconfigure -f glibc-locales
  107.  
  108. lsblk -f *get UUID for Luks*
  109.  
  110. Add rd.auto=1 then UUID:lvm to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub:
  111.  
  112. GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 slub_debug=P page_poison=1 rd.auto=1 cryptdevice=UUID=*UUID*:lvm"
  113.  
  114. grub-mkconfig -o /boot/grub/grub.cfg
  115.  
  116. grub-install /dev/sda
  117.  
  118. xbps-reconfigure -f linux
  119.  
  120.  
  121. # install a few packages and add a user
  122.  
  123. # update the system
  124.  
  125. xbps-install -Suv
  126.  
  127. # install packages
  128.  
  129. xbps-install -S:
  130.  
  131. zsh
  132.  
  133. pulseaudio
  134.  
  135. neovim
  136.  
  137. tmux
  138.  
  139. rxvt
  140.  
  141. i3-gaps
  142.  
  143. i3status
  144.  
  145. lightdm
  146.  
  147. lightdm-gtk3-greeter
  148.  
  149. lxappearance
  150.  
  151. xorg-minimal
  152.  
  153. xorg-fonts
  154.  
  155. xf86-video-intel
  156.  
  157. mpd
  158.  
  159. mpv
  160.  
  161. ncmpcpp
  162.  
  163. udiskie
  164.  
  165. linux-firmware
  166.  
  167. dmenu
  168.  
  169. NetworkManager
  170.  
  171. network-manager-applet
  172.  
  173. ranger
  174.  
  175. tor
  176.  
  177. Thunar
  178.  
  179. feh
  180.  
  181. dunst
  182.  
  183. i3color-lock
  184.  
  185. compton
  186.  
  187. python-ipython
  188.  
  189. python
  190.  
  191. python-pip
  192.  
  193. light
  194.  
  195. xorg-xrdb
  196.  
  197. xorg-xev
  198.  
  199. xorg-fonts-misc
  200.  
  201. w3m
  202.  
  203. tree
  204.  
  205. scrot
  206.  
  207. qtox
  208.  
  209. pidgin
  210.  
  211. pidgin-otr
  212.  
  213. pidgin-libnotify
  214.  
  215. rkhunter
  216.  
  217. python-virtualenv
  218.  
  219. neofetch
  220.  
  221. mpc
  222.  
  223. lightdm-gtk-greeter-settings
  224.  
  225. htop
  226.  
  227. gotop
  228.  
  229. irssi
  230.  
  231. irssi-otr
  232.  
  233. ## disable and enable the proper services
  234.  
  235. # disable services
  236.  
  237. rm /var/service/dhcpcd
  238.  
  239. rm /var/service/wpa_supplicant
  240.  
  241. # enable services
  242.  
  243. ln -s /etc/sv/dbus /var/service/dbus
  244.  
  245. ln -s /etc/sv/lightdm /var/service/lightdm
  246.  
  247. ln -s /etc/sv/tor /var/service/tor
  248.  
  249. ln -s /etc/sv/NetworkManager /var/serivce/NetworkManager
  250.  
  251.  
  252. # add user account
  253.  
  254. useradd -m -s /bin/zsh -U -G wheel,users,audio,video,cdrom,input user
  255.  
  256. # leave the chrooted enviroment and reboot
  257.  
  258. ctr + d (^d)
  259.  
  260. reboot
  261.  
  262. # find hardware (use if moving the HDD or SSD to another computer to detect the hardware: WiFi, etc)
  263. lspci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement