Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## login to live boot and start a bash session
- # login
- username: root
- password: voidlinux
- # start a bash session
- bash
- ## setup wifi for installation
- wpa_passphrase 'My SSID' >> /etc/wpa_supplicant/wpa_supllicant.conf Password
- sv restart dhcpcd
- # test that wifi is working
- ping voidlinux.org
- ## disk partitioning
- # create the partitions
- /dev/sda1 of size 1G to mount as /boot, with boot flag activated
- /dev/sda2 of all remaining free space to mount as /
- # add filesystems and extra options
- mkfs.ext2 -L boot /dev/sda1
- cryptsetup luksFormat /dev/sda2
- cryptsetup luksOpen /dev/sda2 crypt-pool
- vgcreate pool /dev/mapper/crypt-pool
- lvcreate --name swap -L 3G pool
- mkswap -L swap /dev/mapper/pool-swap
- lvcreate --name root -l 100%FREE pool
- mkfs.ext4 -L root /dev/mapper/pool-root
- ## mount the partitions
- mount /dev/mapper/pool-root /mnt
- mkdir /mnt/{boot,dev,proc,sys}
- mount /dev/sda1 /mnt/boot
- mount --rbind /dev /mnt/dev
- mount --rbind /proc /mnt/proc
- mount --rbind /sys /mnt/sys
- ## install and configure the system
- xbps-install -S -R https://repo.voidlinux.eu/current -r /mnt base-system lvm2 cryptsetup grub-x86_64-efi efibootmgr
- chroot /mnt /bin/bash
- passwd root
- chown root:root /
- chmod 755 /
- echo host > /etc/hostname
- # setup fstab
- vi /etc/fstab:
- # <filesystem> <dir> <type> <options> <dump> <pass>
- tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
- /dev/crypt-pool/root / ext4 defaults 0 0
- /dev/sda1 /boot ext2 defaults 0 0
- /dev/mapper/pool-swap swap swap defaults 0 0
- ## setup grub
- grub-install /dev/sda
- echo "LANG=en_US.UTF-8" > /etc/locale.conf
- echo "en_US.UTF-8 UTF-8" >> /etc/default/libc-locales
- xbps-reconfigure -f glibc-locales
- lsblk -f *get UUID for Luks*
- Add rd.auto=1 then UUID:lvm to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub:
- GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 slub_debug=P page_poison=1 rd.auto=1 cryptdevice=UUID=*UUID*:lvm"
- grub-mkconfig -o /boot/grub/grub.cfg
- grub-install /dev/sda
- xbps-reconfigure -f linux
- ## leave the chrooted enviroment and reboot
- ctr + d (^d)
- reboot
- ## setup temporary WiFi, install a few packages and add a user
- # setup WiFi temporarily
- wpa_passphrase 'My SSID' >> /etc/wpa_supplicant/wpa_supllicant.conf Password
- dhcpcd
- # if WiFi fails runs this:
- ip link set *interface* down
- ip link set *interfcae* up
- # test that wifi is working
- ping voidlinux.org
- # update the system
- xbps-install -Suv
- # install packages
- xbps-install -S:
- # shell:
- zsh
- # audio:
- pulseaudio
- # editor:
- neovim
- python-neovim
- # multiplexsion:
- tmux
- # terminal:
- rxvt-unicode
- urxvt-perls
- # desktop/window manager:
- i3-gaps
- i3status
- i3lock-color
- # lockscreen:
- lightdm
- lightdm-gtk3-greeter
- lightdm-gtk-greeter-settings
- # music and video:
- mpd
- mpc
- ncmpcpp
- ncmpc
- mpv
- # network:
- NetworkManager
- network-manager-applet
- tor
- # file management:
- ranger
- Thunar
- # application menu:
- dmenu
- # customuization tools:
- lxappearance
- feh
- dunst
- compton
- # utilities:
- udiskie
- light
- tree
- scrot
- rkhunter
- neofetch
- htop
- gotop
- grub-customizer
- firejail
- wget
- git
- cmake
- cronie
- cronutils
- gnome-disk-utility
- gimp
- kid3
- make
- man-db
- qemu
- time
- transmission
- unzip
- virt-manager
- xev
- xrdb
- ctags
- # social media:
- pidgin
- pidgin-otr
- pidgin-libnotify
- irssi
- qtox
- # web browsing
- w3m
- waterfox:
- # move to /opt/:
- cd /opt/
- # get the bz2 file:
- wget https://storage-waterfox.netdna-ssl.com/releases/linux64/installer/waterfox-56.2.3.en-US.linux-x86_64.tar.bz2
- # unzip the files:
- bzip2 -d waterfox-56.2.3.en-US.linux-x86_64.tar.bz2
- tar -xvf waterfox-56.2.3.en-US.linux-x86_64.tar
- rm waterfox-56.2.3.en-US.linux-x86_64.tar
- cd waterfox
- # add a symlink to launch waterfox from an application menu:
- ln -s /opt/waterfox/waterfox /usr/bin/waterfox
- tor browser:
- # you'll need to install xz:
- xbps-install -S xz
- # move to /opt/:
- # get the .xz file:
- wget https://www.torproject.org/dist/torbrowser/8.0.2/tor-browser-linux64-8.0.2_en-US.tar.xz
- # unzip the files:
- tar -xf tor-browser-linux64-8.0.2_en-US.tar.xz
- rm tor-browser-linux64-8.0.2_en-US.tar.xz
- # move into the directory and make a script to launch the tor browser:
- cd tor-browser
- nvim start-tor-browser.sh:
- 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
- chmod +x start-tor-browser.sh
- # add a symlink to launch the tor browser from an application menu:
- ln -s /opt/tor_browser/start-tor-browser.sh /usr/bin/tor_browser
- # programming
- python-ipython
- python-pip
- python-virtualenv
- # other:
- xautolock
- xorg-server
- xorg-server-xvfb
- xset
- linux-firmware
- noto-fonts-ttf
- liberation-fonts-ttf
- ## add user account and change shell
- # add a user
- useradd -m -s /bin/zsh -U -G wheel,users,audio,video,cdrom,input user
- passwd user
- # change shell
- chsh -s /bin/zsh
- ## setup sudo: reboot, etc without sudo password and enable insults
- # edit the file
- visudo
- # enable insults:
- ## sudoers file.
- ##
- ## This file MUST be edited with the 'visudo' command as root.
- ## Failure to use 'visudo' may result in syntax or file permission errors
- ## that prevent sudo from running.
- ##
- ## See the sudoers man page for the details on how to write a sudoers file.
- ##
- Defaults insults
- # let user sudo
- # uncomment the following line:
- %wheel ALL=(ALL) ALL
- # enable reboot (etc) without password
- %wheel ALL=(ALL) NOPASSWD: /usr/bin/halt, /usr/bin/poweroff, /usr/bin/reboot, \
- /usr/bin/shutdown, /usr/bin/zzz, /usr/bin/ZZZ
- ## enable the proper services
- # enable services
- ln -s /etc/sv/dbus /var/service/dbus
- ln -s /etc/sv/tor /var/service/tor
- ln -s /etc/sv/NetworkManager /var/serivce/NetworkManager
- ln -s /etc/lightdm /var/service/lightdm
- ## reboot and login as user
- reboot
- login
- ## disable login as root
- sudo passwd -l root
- ## setup network
- 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.
- ## create directories in home folder then mount usb and move files to proper location
- # create directories in home folder and /usr/share/
- mkdir Documents Downloads Pictures Music Videos .build
- # create directories in /usr/share/
- mkdir backgrounds
- # move files from USB to proper locations
- # open a terminal and run: udiskie, then open Thunar and start moving files
- 1) move fonts to /usr/share/fonts
- 2) move files in Zsh to ~/
- 3) move void install folder to ~/Documents
- 4) move images in Pictures to ~/Pictures
- 5) move dunst to ~/.config
- 6) move tox to ~/.config
- 7) move neofetch to ~/.config
- 8) move vis to ~/.config
- 9) move ncmpcpp to ~/.config
- 10) move .tmux.conf to ~/
- 11) move nvim to ~/.config
- 12) move i3 and i3status to ~/.config
- 13) move mpd to ~/.config
- 14) move .mpd and .ncmcpp to ~/
- 15) move bash.command-not-found to /etc/
- 16) move wallpapers to /usr/share/backgrounds/
- 17) move scripts to ~/Documents/
- 18) move python to ~/Documents/
- 19) move .Xresources to ~/
- ## find hardware (use if moving the HDD or SSD to another computer to detect the hardware: WiFi, etc)
- lspci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement