Add more symlinks
This commit is contained in:
parent
70c1d4179c
commit
2afd04fb49
3 changed files with 17 additions and 9 deletions
|
@ -30,11 +30,10 @@ You will most likely wish to add the following to the overlay;
|
|||
Here is a reference fstab file, take note of the `subvol` mount option;
|
||||
```shell
|
||||
UUID=f8b62c6c-fba0-41e5-b12c-42aa1cdaa452 / btrfs rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/,compress=zstd 0 0
|
||||
UUID=f8b62c6c-fba0-41e5-b12c-42aa1cdaa452 /root btrfs rw,relatime,ssd,discard=async,space_cache=v2,subvol=arkdep/shared/root,compress=zstd 0 0
|
||||
UUID=f8b62c6c-fba0-41e5-b12c-42aa1cdaa452 /home btrfs rw,relatime,ssd,discard=async,space_cache=v2,subvol=arkdep/shared/home,compress=zstd 0 0
|
||||
UUID=f8b62c6c-fba0-41e5-b12c-42aa1cdaa452 /var btrfs rw,relatime,ssd,discard=async,space_cache=v2,subvol=arkdep/shared/var,compress=zstd 0 0
|
||||
UUID=f8b62c6c-fba0-41e5-b12c-42aa1cdaa452 /arkdep btrfs rw,relatime,ssd,discard=async,space_cache=v2,subvol=arkdep,compress=zstd 0 0
|
||||
UUID=1223-2137 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
|
||||
UUID=1223-2137 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
|
||||
```
|
||||
|
||||
If you wish to use custom kernel parameters you can edit `/arkdep/templates/systemd-boot`
|
||||
|
|
3
arkdep
3
arkdep
|
@ -104,9 +104,7 @@ init () {
|
|||
|
||||
# Add home shared subvolume and make writable
|
||||
btrfs subvolume create $(readlink -m $arkdep_dir/shared/home) || cleanup_and_quit "Failed to create home subvolume"
|
||||
btrfs subvolume create $(readlink -m $arkdep_dir/shared/root) || cleanup_and_quit "Failed to create root subvolume"
|
||||
btrfs property set -f -ts $(readlink -m $arkdep_dir/shared/home) ro false
|
||||
btrfs property set -f -ts $(readlink -m $arkdep_dir/shared/root) ro false
|
||||
|
||||
# Write default config file
|
||||
printf "\e[1;34m-->\e[0m\e[1m Adding default config file\e[0m\n"
|
||||
|
@ -346,7 +344,6 @@ deploy () {
|
|||
|
||||
printf "\e[1;34m-->\e[0m\e[1m Ensure var, root and arkdep mountpoints exist\e[0m\n"
|
||||
mkdir -pv $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/var)
|
||||
mkdir -pv $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/root)
|
||||
mkdir -pv $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/arkdep)
|
||||
|
||||
# Lock the root volume again
|
||||
|
|
20
arkdep-build
20
arkdep-build
|
@ -154,13 +154,25 @@ if [[ $type == 'archlinux' ]]; then
|
|||
rm -rf $workdir/var/lib/pacman/local/*
|
||||
|
||||
# Make /usr/local symlink in var
|
||||
printf "\e[1;34m-->\e[0m\e[1m Creating usrlocal symlink\e[0m\n"
|
||||
printf "\e[1;34m-->\e[0m\e[1m Creating moving dirs to var and creating symlinks\e[0m\n"
|
||||
mv $workdir/usr/local $workdir/var/usrlocal || cleanup_and_quit 'Failed to move usr/local to var/usrlocal'
|
||||
ln -s /var/usrlocal $workdir/usr/local || cleanup_and_quit 'Failed to create usrlocal symlink'
|
||||
ln -sv /var/usrlocal $workdir/usr/local || cleanup_and_quit 'Failed to create usrlocal symlink'
|
||||
|
||||
printf "\e[1;34m-->\e[0m\e[1m Creating usrliblocale symlink\e[0m\n"
|
||||
# locale symlink
|
||||
mv $workdir/usr/lib/locale $workdir/var/usrliblocale || cleanup_and_quit 'Failed to move usr/local to var/usrlocal'
|
||||
ln -s /var/usrliblocale $workdir/usr/lib/locale || cleanup_and_quit 'Failed to create usrlocal symlink'
|
||||
ln -sv /var/usrliblocale $workdir/usr/lib/locale || cleanup_and_quit 'Failed to create usrlocal symlink'
|
||||
|
||||
# roothome symlink
|
||||
mv $workdir/root $workdir/var/roothome || cleanup_and_quit 'Failed to move root to var/roothome'
|
||||
ln -sv /var/roothome $workdir/root || cleanup_and_quit 'Failed to create roothome symlink'
|
||||
|
||||
# Opt symlink
|
||||
mv $workdir/opt $workdir/var/opt || cleanup_and_quit 'Failed to move opt to var/opt'
|
||||
ln -sv /var/opt $workdir/opt || cleanup_and_quit 'Failed to create opt symlink'
|
||||
|
||||
# srv symlink
|
||||
mv $workdir/srv $workdir/var/srv || cleanup_and_quit 'Failed to move srv to var/srv'
|
||||
ln -sv /var/srv $workdir/srv || cleanup_and_quit 'Failed to create srv symlink'
|
||||
|
||||
# Make subvolume read-only
|
||||
printf "\e[1;34m-->\e[0m\e[1m Adding read-only property to subvolumes\e[0m\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue