rj1.su - my website
git clone https://github.com/rj1/rj1.su
void-install-notes.md (3231B) - raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | --- title: void linux installation notes date: "2022-07-08" --- install information: - luks encrypted - ext4 filesystem - no lvm - chroot install (https://docs.voidlinux.org/installation/guides/chroot.html) # login root:voidlinux # interactive shell ```shell bash ``` # create partition table | partition | size | code | fs | -------------------|-----------|------|------| | boot (/dev/sda1) | 512 MiB | ef00 | efi | | root (/dev/sda2) | the rest | 8300 | ext4 | # create filesystems ```shell cryptsetup luksFormat /dev/sda2 cryptsetup open /dev/sda2 cryptroot mkfs.ext4 /dev/mapper/cryptroot mount /dev/mapper/cryptroot /mnt mkfs.fat -F32 /dev/sda1 mkdir /mnt/boot mount /dev/sda1 /mnt/boot ``` # mount linux system ```shell mkdir /mnt/dev && mount --rbind /dev /mnt/dev mkdir /mnt/proc && mount --rbind /proc /mnt/proc mkdir /mnt/sys && mount --rbind /sys /mnt/sys ``` or ```shell for d in dev proc sys; do mkdir /mnt/$d && mount --rbind /$d /mnt/$d; done ``` # install void base-system ```shell xbps-install -Sy -R https://repo-fi.voidlinux.org/current -r /mnt base-system cryptsetup grub-x86_64-efi neovim ``` # copy resolv.conf so dns works in the chroot ```shell cp /etc/resolv.conf /mnt/etc/resolv.conf ``` # chroot ```shell chroot /mnt /bin/bash ``` # set root password ```shell passwd ``` # root permissions ```shell chown root:root / chmod 755 / ``` # set hostname ```shell echo <yr-hostname> > /etc/hostname ``` # add user ```shell useradd -m -G wheel rj1 passwd rj1 ``` # enable sudo ```shell nvim /etc/sudoers ``` # set timezone/keymap ```shell nvim /etc/rc.conf ``` # set locale ```shell echo "LANG=en_US.UTF-8" > /etc/locale.conf ``` uncomment your locale in `/etc/default/libc-locales` ```shell nvim /etc/default/libc-locales ``` # enable nonfree repo + install microcode patch ```shell xbps-install -S void-repo-nonfree xbps-install -S intel-ucode ``` # setup fstab ```shell nvim /etc/fstab ``` example fstab: ``` tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 UUID=21b8b8e9-29ca-4d2f-a7fc-3face2fc2b0a / ext4 defaults 0 0 UUID=0536-48CF /boot vfat defaults 0 2 ``` use `:r!blkid /dev/sda2 -sUUID -ovalue` in vim to insert the desired UUID # edit grub config edit `/etc/default/grub` ```shell nvim /etc/default/grub ``` append `rd.auto=1` to GRUB_CMDLINE_LINUX_DEFAULT e.g. `GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 rd.auto=1"` # install grub ```shell grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="void" grub-mkconfig -o /boot/grub/grub.cfg ``` # add cryptsetup to our initramfs ```shell echo 'add_dracutmodules+=" crypt "' > /etc/dracut.conf.d/dracutmodules.conf ``` # add hostonly setting to dracut ```shell echo 'hostonly=yes' > /etc/dracut.conf.d/hostonly.conf ``` # build initramfs note: the following command will reconfigure all of the packages you have installed, this is a simple way to generate the initramfs and enable our locale choice(s) by reconfiguring the `glibc-locales` package ```shell xbps-reconfigure -fa ``` you can `exit` the chroot and `reboot` now have fun! |