From b16bbb60ed83a53f26b32b708c4153aef8cd3b94 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 19 Feb 2022 23:25:39 +0100 Subject: [PATCH] fix dconf --- entry.sh | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/entry.sh b/entry.sh index 2bbdd1b..265bc63 100755 --- a/entry.sh +++ b/entry.sh @@ -2,10 +2,10 @@ function user_install(){ - dconf write /org/mate/desktop/interface/gtk-theme "'Materia-dark'" - dconf write /org/mate/marco/general/theme "'Materia-dark'" - dconf write /org/mate/desktop/interface/icon-theme "'Adwaita'" - dconf write /org/mate/desktop/peripherals/mouse/cursor-theme "'Adwaita'" + dbus-launch dconf write /org/mate/desktop/interface/gtk-theme "'Materia-dark'" + dbus-launch dconf write /org/mate/marco/general/theme "'Materia-dark'" + dbus-launch dconf write /org/mate/desktop/interface/icon-theme "'Adwaita'" + dbus-launch dconf write /org/mate/desktop/peripherals/mouse/cursor-theme "'Adwaita'" #wget --show-progress -qO ./toolbox.tar.gz https://download.jetbrains.com/toolbox/jetbrains-toolbox-1.20.7940.tar.gz @@ -55,14 +55,14 @@ function first_stage(){ apt install -y debootstrap cryptsetup btrfs-progs lvm2 - if [ -d /dev/vg0 ]; then + if [ -d /dev/cryptvg ]; then mount | grep target | awk '{print $3}'| sort -r | while read LINE; do umount -l $LINE; done - if [ -b /dev/vg0/swap ]; then - swapoff /dev/vg0/swap || true + if [ -b /dev/cryptvg/swap ]; then + swapoff /dev/cryptvg/swap || true fi - vgchange -an /dev/vg0 + vgchange -an /dev/cryptvg fi if [ -b /dev/mapper/cryptlvm ]; then @@ -100,30 +100,30 @@ function first_stage(){ echo $LUKS_PASSWORD | cryptsetup luksOpen ${DEVICE}2 cryptlvm unset LUKS_PASSWORD pvcreate /dev/mapper/cryptlvm - vgcreate vg0 /dev/mapper/cryptlvm + vgcreate cryptvg /dev/mapper/cryptlvm export LVM_SIZE=$(dev_size /dev/mapper/cryptlvm) export SWAP_SIZE=$(($(mem_size)/1024/1024)) export ROOT_SIZE=$(($LVM_SIZE/1024/1024-$SWAP_SIZE-512)) - echo lvcreate /dev/vg0 --name=root --size=${ROOT_SIZE}M - lvcreate /dev/vg0 --name=root --size=${ROOT_SIZE}M - yes | mkfs.btrfs /dev/vg0/root + echo lvcreate /dev/cryptvg --name=root --size=${ROOT_SIZE}M + lvcreate /dev/cryptvg --name=root --size=${ROOT_SIZE}M + yes | mkfs.btrfs /dev/cryptvg/root - echo lvcreate /dev/vg0 --name=swap --size=${SWAP_SIZE}M - lvcreate /dev/vg0 --name=swap --size=${SWAP_SIZE}M - mkswap /dev/vg0/swap - swapon /dev/vg0/swap + echo lvcreate /dev/cryptvg --name=swap --size=${SWAP_SIZE}M + lvcreate /dev/cryptvg --name=swap --size=${SWAP_SIZE}M + mkswap /dev/cryptvg/swap + swapon /dev/cryptvg/swap mkdir -p /tmp/mnt - mount /dev/vg0/root /tmp/mnt + mount /dev/cryptvg/root /tmp/mnt btrfs subvolume create /tmp/mnt/@ btrfs subvolume create /tmp/mnt/@home umount /tmp/mnt - echo mount -osubvol=@ /dev/vg0/root $TARGET - mount -osubvol=@ /dev/vg0/root $TARGET + echo mount -osubvol=@ /dev/cryptvg/root $TARGET + mount -osubvol=@ /dev/cryptvg/root $TARGET echo debootstrap sid $TARGET debootstrap sid $TARGET @@ -131,8 +131,8 @@ function first_stage(){ mount ${DEVICE}1 $TARGET/boot echo mount ${DEVICE}1 $TARGET/boot - echo mount -osubvol=@home /dev/vg0/root $TARGET/home - mount -osubvol=@home /dev/vg0/root $TARGET/home + echo mount -osubvol=@home /dev/cryptvg/root $TARGET/home + mount -osubvol=@home /dev/cryptvg/root $TARGET/home genfstab -U $TARGET | tee $TARGET/etc/fstab UUID=$(lsblk -lpo NAME,UUID | grep ${DEVICE}2 | awk '{print $2}') @@ -154,6 +154,8 @@ function second_stage(){ apt update apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 firmware-iwlwifi locales tzdata keyboard-configuration console-common zsh intel-microcode grub-install ${DEVICE} + update-grub + update-initramfs -u mkdir /snap btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_basesystem) apt install -y task-mate-desktop mate-desktop-environment-extra