Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.13 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. mkfs.ext2 -L boot /dev/sda1
  35.  
  36. cryptsetup luksFormat /dev/sda2
  37.  
  38. cryptsetup luksOpen /dev/sda2 crypt-pool
  39.  
  40. vgcreate pool /dev/mapper/crypt-pool
  41.  
  42. lvcreate --name swap -L 3G pool
  43.  
  44. mkswap -L swap /dev/mapper/pool-swap
  45.  
  46. lvcreate --name root -l 100%FREE pool
  47.  
  48. mkfs.ext4 -L root /dev/mapper/pool-root
  49.  
  50. ## mount the partitions
  51.  
  52. mount /dev/mapper/pool-root /mnt
  53.  
  54. mkdir /mnt/{boot,dev,proc,sys}
  55.  
  56. mount /dev/sda1 /mnt/boot
  57.  
  58. mount --rbind /dev /mnt/dev
  59.  
  60. mount --rbind /proc /mnt/proc
  61.  
  62. mount --rbind /sys /mnt/sys
  63.  
  64. ## install and configure the system
  65.  
  66. xbps-install -S -R http://repo.voidlinux.eu/current -r /mnt base-system lvm2 cryptsetup grub-x86_64-efi efibootmgr
  67.  
  68. chroot /mnt /bin/bash
  69.  
  70. passwd root
  71.  
  72. chown root:root /
  73.  
  74. chmod 755 /
  75.  
  76. echo host > /etc/hostname
  77.  
  78. # setup fstab
  79.  
  80. vi /etc/fstab:
  81.  
  82. # <filesystem> <dir> <type> <options> <dump> <pass>
  83.  
  84. tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
  85.  
  86. /dev/crypt-pool/root / ext4 defaults 0 0
  87.  
  88. /dev/sda1 /boot ext2 defaults 0 0
  89.  
  90. /dev/mapper/pool-swap swap swap defaults 0 0
  91.  
  92. ## setup grub
  93.  
  94. grub-install /dev/sda
  95.  
  96. echo "LANG=en_US.UTF-8" > /etc/locale.conf
  97.  
  98. echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
  99.  
  100. xbps-reconfigure -f glibc-locales
  101.  
  102. lsblk -f *get UUID for Luks*
  103.  
  104. Add rd.auto=1 then UUID:lvm to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub:
  105.  
  106. GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 slub_debug=P page_poison=1 rd.auto=1 cryptdevice=UUID=*UUID*:lvm"
  107.  
  108. grub-mkconfig -o /boot/grub/grub.cfg
  109.  
  110. grub-install /dev/sda
  111.  
  112. xbps-reconfigure -f linux
  113.  
  114. ## leave the chrooted enviroment and reboot
  115.  
  116. ctr + d (^d)
  117.  
  118. reboot
  119.  
  120. ## setup temporary WiFi, install a few packages and add a user
  121.  
  122. # setup WiFi temporarily
  123.  
  124. wpa_passphrase 'My SSID' >> /etc/wpa_supplicant/wpa_supllicant.conf Password
  125.  
  126. dhcpcd
  127.  
  128. # test that wifi is working
  129.  
  130. ping voidlinux.org
  131.  
  132.  
  133. # update the system
  134.  
  135. xbps-install -Suv
  136.  
  137. # install packages
  138.  
  139. xbps-install -S:
  140.  
  141. # shell:
  142.  
  143. zsh
  144.  
  145. # audio:
  146.  
  147. pulseaudio
  148.  
  149. # editor:
  150.  
  151. neovim
  152.  
  153. python-neovim
  154.  
  155. # multiplexsion:
  156.  
  157. tmux
  158.  
  159. # terminal:
  160.  
  161. rxvt-unicode
  162.  
  163. urxvt-perls
  164.  
  165. # desktop/window manager:
  166.  
  167. i3-gaps
  168.  
  169. i3status
  170.  
  171. i3lock-color
  172.  
  173. # lockscreen:
  174.  
  175. lightdm
  176.  
  177. lightdm-gtk3-greeter
  178.  
  179. lightdm-gtk-greeter-settings
  180.  
  181. # music and video:
  182.  
  183. mpd
  184.  
  185. mpc
  186.  
  187. ncmpcpp
  188.  
  189. ncmpc
  190.  
  191. mpv
  192.  
  193. # network:
  194.  
  195. NetworkManager
  196.  
  197. network-manager-applet
  198.  
  199. tor
  200.  
  201. # file management:
  202.  
  203. ranger
  204.  
  205. Thunar
  206.  
  207. # application menu:
  208.  
  209. dmenu
  210.  
  211. # customuization tools:
  212.  
  213. lxappearance
  214.  
  215. feh
  216.  
  217. dunst
  218.  
  219. compton
  220.  
  221. # utilities:
  222.  
  223. udiskie
  224.  
  225. light
  226.  
  227. tree
  228.  
  229. scrot
  230.  
  231. rkhunter
  232.  
  233. neofetch
  234.  
  235. htop
  236.  
  237. gotop
  238.  
  239. grub-customizer
  240.  
  241. firejail
  242.  
  243. wget
  244.  
  245. git
  246.  
  247. cmake
  248.  
  249. cronie
  250.  
  251. cronutils
  252.  
  253. gnome-disk-utility
  254.  
  255. gimp
  256.  
  257. kid3
  258.  
  259. make
  260.  
  261. man-db
  262.  
  263. qemu
  264.  
  265. time
  266.  
  267. transmission
  268.  
  269. unzip
  270.  
  271. virt-manager
  272.  
  273. xev
  274.  
  275. xrdb
  276.  
  277. ctags
  278.  
  279. # social media:
  280.  
  281. pidgin
  282.  
  283. pidgin-otr
  284.  
  285. pidgin-libnotify
  286.  
  287. irssi
  288.  
  289. qtox
  290.  
  291. # web browsing
  292.  
  293. w3m
  294.  
  295. waterfox:
  296.  
  297. # move to /opt/:
  298.  
  299. cd /opt/
  300.  
  301. # get the bz2 file:
  302.  
  303. wget https://storage-waterfox.netdna-ssl.com/releases/linux64/installer/waterfox-56.2.3.en-US.linux-x86_64.tar.bz2
  304.  
  305. # unzip the files:
  306.  
  307. bzip2 waterfox-56.2.3.en-US.linux-x86_64.tar.bz2
  308.  
  309. tar -xvf waterfox-56.2.3.en-US.linux-x86_64.tar
  310.  
  311. # add a symlink to launch waterfox from an application menu:
  312.  
  313. ln -s /opt/waterfox/waterfox /usr/bin/waterfox
  314.  
  315.  
  316. tor browser:
  317.  
  318. # move to /opt/:
  319.  
  320. # get the .xz file:
  321.  
  322. wget https://www.torproject.org/dist/torbrowser/8.0.2/tor-browser-linux64-8.0.2_en-US.tar.xz
  323.  
  324. # unzip the files:
  325.  
  326. tar -xf tor-browser-linux64-8.0.2_en-US.tar.xz
  327.  
  328. tar -xvf tor-browser-linux64-8.0.2_en-US.tar
  329.  
  330. # move into the directory and make a script to launch the tor browser:
  331.  
  332. cd tor-browser
  333.  
  334. nvim start-tor-browser.sh:
  335.  
  336. sh -c '"/opt/tor-browser_en-US/Browser/start-tor-browser" --detach || ([ ! -x "/opt/tor-browser_en-US/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
  337.  
  338. chmod +x start-tor-browser.sh
  339.  
  340. # add a symlink to launch the tor browser from an application menu:
  341.  
  342. ln -s /opt/tor_browser/start-tor-browser.sh /usr/bin/tor_browser
  343.  
  344. # programming
  345.  
  346. python-ipython
  347.  
  348. python-pip
  349.  
  350. python-virtualenv
  351.  
  352. # other:
  353.  
  354. xautolock
  355.  
  356. xorg-server
  357.  
  358. xorg-server-xvfb
  359.  
  360. xset
  361.  
  362. linux-firmware
  363.  
  364. noto-fonts-ttf
  365.  
  366. liberation-fonts-ttf
  367.  
  368. ## add user account and change shell
  369.  
  370. # add a user
  371.  
  372. useradd -m -s /bin/zsh -U -G wheel,users,audio,video,cdrom,input user
  373.  
  374. passwd user
  375.  
  376. # change shell
  377.  
  378. chsh -s /bin/zsh
  379.  
  380. ## setup sudo: reboot, etc without sudo password and enable insults
  381.  
  382. # edit the file
  383. visudo
  384.  
  385. # enable insults:
  386.  
  387. ## sudoers file.
  388. ##
  389. ## This file MUST be edited with the 'visudo' command as root.
  390. ## Failure to use 'visudo' may result in syntax or file permission errors
  391. ## that prevent sudo from running.
  392. ##
  393. ## See the sudoers man page for the details on how to write a sudoers file.
  394. ##
  395.  
  396. Defaults insults
  397.  
  398. # let user sudo
  399.  
  400. # uncomment the following line:
  401.  
  402. %wheel ALL=(ALL) ALL
  403.  
  404. # enable reboot (etc) without password
  405.  
  406. %wheel ALL=(ALL) NOPASSWD: /usr/bin/halt, /usr/bin/poweroff, /usr/bin/reboot, \
  407. /usr/bin/shutdown, /usr/bin/zzz, /usr/bin/ZZZ
  408.  
  409.  
  410. ## enable the proper services
  411.  
  412. # enable services
  413.  
  414. ln -s /etc/sv/dbus /var/service/dbus
  415.  
  416. ln -s /etc/sv/lightdm /var/service/lightdm
  417.  
  418. ln -s /etc/sv/tor /var/service/tor
  419.  
  420. ln -s /etc/sv/NetworkManager /var/serivce/NetworkManager
  421.  
  422. ln -s /etc/sv/I2pd /var/service/I2pd
  423.  
  424. ## reboot and login as user
  425.  
  426. reboot
  427.  
  428. login
  429.  
  430. ## disable login as root
  431.  
  432. sudo passwd -l root
  433.  
  434. ## setup network
  435.  
  436. launch nm-applet from demnu or the terminal. Left click and select your wifi, then exit the pop up menu and right click on it, go to edit connection. Select your wifi, go to general and enable the all users can use this network option, then go to wifi security and add your wifi password. Then save and exit nm-applet.
  437.  
  438. ## create directories in home folder then mount usb and move files to proper location
  439.  
  440. # create directories in home folder and /usr/share/
  441.  
  442. mkdir Documents Downloads Pictures Music Videos .build
  443.  
  444. # create directories in /usr/share/
  445.  
  446. mkdir backgrounds
  447.  
  448. # move files from USB to proper locations
  449.  
  450. # open a terminal and run: udiskie, then open Thunar and start moving files
  451.  
  452. 1) move fonts to /usr/share/fonts
  453.  
  454. 2) move files in Zsh to ~/
  455.  
  456. 3) move void install folder to ~/Documents
  457.  
  458. 4) move images in Pictures to ~/Pictures
  459.  
  460. 5) move dunst to ~/.config
  461.  
  462. 6) move tox to ~/.config
  463.  
  464. 7) move neofetch to ~/.config
  465.  
  466. 8) move vis to ~/.config
  467.  
  468. 9) move ncmpcpp to ~/.config
  469.  
  470. 10) move .tmux.conf to ~/
  471.  
  472. 11) move nvim to ~/.config
  473.  
  474. 12) move i3 and i3status to ~/.config
  475.  
  476. 13) move mpd to ~/.config
  477.  
  478. 14) move .mpd and .ncmcpp to ~/
  479.  
  480. 15) move bash.command-not-found to /etc/
  481.  
  482. 16) move wallpapers to /usr/share/backgrounds/
  483.  
  484. 17) move scripts to ~/Documents/
  485.  
  486. 18) move python to ~/Documents/
  487.  
  488. 19) move .Xresources to ~/
  489.  
  490. ## find hardware (use if moving the HDD or SSD to another computer to detect the hardware: WiFi, etc)
  491.  
  492. lspci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement