@@ -73,7 +73,8 @@ System Partition:
7373```
7474
7575Initialize swap space, if desired, using
76- [ mkswap(8)] ( https://man.voidlinux.org/mkswap.8 ) .
76+ [ mkswap(8)] ( https://man.voidlinux.org/mkswap.8 ) , and enable it with
77+ [ swapon(8)] ( https://man.voidlinux.org/swapon.8 ) .
7778
7879## Base Installation
7980
@@ -133,33 +134,40 @@ Unpack the tarball into the newly configured filesystems:
133134# tar xvf void-<...>-ROOTFS.tar.xz -C /mnt
134135```
135136
137+ ROOTFS images generally contain out of date software, due to being a snapshot of
138+ the time when they were built, and do not come with a complete ` base-system ` .
139+ Update the package manager and install ` base-system ` :
140+
141+ ```
142+ # xbps-install -r /mnt -Su xbps
143+ # xbps-install -r /mnt -u
144+ # xbps-install -r /mnt base-system
145+ # xbps-remove -r /mnt -R base-container-full
146+ ```
147+
136148## Configuration
137149
138- With the exception of the section "Install base-system (ROOTFS method only)",
139- the remainder of this guide is common to both the XBPS and ROOTFS installation
150+ The remainder of this guide is common to both the XBPS and ROOTFS installation
140151methods.
141152
142- ### Entering the Chroot
153+ ### Configure Filesystems
143154
144- [ xchroot(1 )] ( https://man.voidlinux.org/xchroot.1 ) (from ` xtools ` ) can be used to
145- set up and enter the chroot. Alternatively, this can be [ done
146- manually ] ( ../../config/containers-and-vms/chroot.md#manual-method ) .
155+ The [ fstab(5 )] ( https://man.voidlinux.org/fstab.5 ) file can be automatically
156+ generated from currently mounted filesystems using
157+ [ xgenfstab(1) ] ( https://man.voidlinux.org/xgenfstab.1 ) (from ` xtools ` ).
147158
148159```
149- # xchroot /mnt /bin/bash
160+ # xgenfstab -U /mnt > /mnt/etc/fstab
150161```
151162
152- ### Install base-system (ROOTFS method only)
163+ ### Entering the Chroot
153164
154- ROOTFS images generally contain out of date software, due to being a snapshot of
155- the time when they were built, and do not come with a complete ` base-system ` .
156- Update the package manager and install ` base-system ` :
165+ [ xchroot(1) ] ( https://man.voidlinux.org/xchroot.1 ) (from ` xtools ` ) can be used to
166+ set up and enter the chroot. Alternatively, this can be [ done
167+ manually ] ( ../../config/containers- and-vms/chroot.md#manual-method ) .
157168
158169```
159- [xchroot /mnt] # xbps-install -Su xbps
160- [xchroot /mnt] # xbps-install -u
161- [xchroot /mnt] # xbps-install base-system
162- [xchroot /mnt] # xbps-remove base-container-full
170+ # xchroot /mnt /bin/bash
163171```
164172
165173### Installation Configuration
@@ -191,60 +199,6 @@ To set a root password, run:
191199[xchroot /mnt] # passwd
192200```
193201
194- ### Configure fstab
195-
196- The [ fstab(5)] ( https://man.voidlinux.org/fstab.5 ) file can be automatically
197- generated from currently mounted filesystems by copying the file ` /proc/mounts ` :
198-
199- ```
200- [xchroot /mnt] # cp /proc/mounts /etc/fstab
201- ```
202-
203- Remove lines in ` /etc/fstab ` that refer to ` proc ` , ` sys ` , ` devtmpfs ` and ` pts ` .
204-
205- Replace references to ` /dev/sdXX ` , ` /dev/nvmeXnYpZ ` , etc. with their respective
206- UUID, which can be found by running
207- [ blkid(8)] ( https://man.voidlinux.org/blkid.8 ) . Referring to filesystems by their
208- UUID guarantees they will be found even if they are assigned a different name at
209- a later time. In some situations, such as booting from USB, this is absolutely
210- essential. In other situations, disks will always have the same name unless
211- drives are physically added or removed. Therefore, this step may not be strictly
212- necessary, but is almost always recommended.
213-
214- Change the last zero of the entry for ` / ` to ` 1 ` , and the last zero of every
215- other line to ` 2 ` . These values configure the behaviour of
216- [ fsck(8)] ( https://man.voidlinux.org/fsck.8 ) .
217-
218- For example, the partition scheme used throughout previous examples yields the
219- following ` fstab ` :
220-
221- ```
222- /dev/sda1 /boot/efi vfat rw,relatime,[...] 0 0
223- /dev/sda2 / ext4 rw,relatime 0 0
224- ```
225-
226- The information from ` blkid ` results in the following ` /etc/fstab ` :
227-
228- ```
229- UUID=6914[...] /boot/efi vfat rw,relatime,[...] 0 2
230- UUID=dc1b[...] / ext4 rw,relatime 0 1
231- ```
232-
233- Note: The output of ` /proc/mounts ` will have a single space between each field.
234- The columns are aligned here for readability.
235-
236- Add an entry to mount ` /tmp ` in RAM:
237-
238- ```
239- tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
240- ```
241-
242- If using swap space, add an entry for any swap partitions:
243-
244- ```
245- UUID=1cb4[...] swap swap rw,noatime,discard 0 0
246- ```
247-
248202### Enable services
249203
250204Services can be [ enabled] ( ../../config/services/index.md#enabling-services )
@@ -262,7 +216,7 @@ to install GRUB onto your boot disk.
262216install GRUB to. For example:
263217
264218```
265- [xchroot /mnt] # xbps-install grub
219+ [xchroot /mnt] # xbps-install -S grub
266220[xchroot /mnt] # grub-install /dev/sda
267221```
268222
@@ -272,7 +226,7 @@ optionally specifying a bootloader label (this label may be used by your
272226computer's firmware when manually selecting a boot device):
273227
274228```
275- [xchroot /mnt] # xbps-install grub-x86_64-efi
229+ [xchroot /mnt] # xbps-install -S grub-x86_64-efi
276230[xchroot /mnt] # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id="Void"
277231```
278232
0 commit comments