From 3d17b20ea1fdb0fe2fdd7c42af3d63c539a65bbb Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 2 Jun 2022 18:21:21 +0200 Subject: [PATCH] cleanup / before switching --- usr/lib/archboot/update-installer.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index c7f05dccf..2cd616893 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -141,15 +141,17 @@ fi EOF # motd not needed anymore rm /etc/motd - echo -e "\033[1mStep 5/7:\033[0m Copying initramfs to /new_root ..." + echo -e "\033[1mStep 5/8:\033[0m Removing not necessary files from / ..." + _clean_archboot + echo -e "\033[1mStep 6/8:\033[0m Copying initramfs to /new_root ..." echo -e " This takes some time ..." tar -C / --exclude="./dev/*" --exclude="./proc/*" --exclude="./sys/*" --exclude="./tmp/*" --exclude="./run/*"\ --exclude="./mnt/*" --exclude="./media/*" --exclude="./lost+found" --exclude="./new_root/*" \ --exclude="./etc/pacman.d/S.*" -clpf - . | tar -C /new_root -xlspf - # stop dbus to avoid 90 seconds hanging - echo -e "\033[1mStep 6/7:\033[0m Stopping dbus ..." + echo -e "\033[1mStep 7/8:\033[0m Stopping dbus ..." systemctl stop dbus - echo -e "\033[1mStep 7/7:\033[0m Switching root to /new_root ..." + echo -e "\033[1mStep 8/8:\033[0m Switching root to /new_root ..." echo "/dev/zram0 / btrfs defaults,discard,noatime,compress=zstd 0 0" >>/etc/fstab systemctl switch-root /new_root fi