mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
cleanup / before switching
This commit is contained in:
parent
bae03ce7f1
commit
3d17b20ea1
1 changed files with 5 additions and 3 deletions
|
@ -141,15 +141,17 @@ fi
|
||||||
EOF
|
EOF
|
||||||
# motd not needed anymore
|
# motd not needed anymore
|
||||||
rm /etc/motd
|
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 ..."
|
echo -e " This takes some time ..."
|
||||||
tar -C / --exclude="./dev/*" --exclude="./proc/*" --exclude="./sys/*" --exclude="./tmp/*" --exclude="./run/*"\
|
tar -C / --exclude="./dev/*" --exclude="./proc/*" --exclude="./sys/*" --exclude="./tmp/*" --exclude="./run/*"\
|
||||||
--exclude="./mnt/*" --exclude="./media/*" --exclude="./lost+found" --exclude="./new_root/*" \
|
--exclude="./mnt/*" --exclude="./media/*" --exclude="./lost+found" --exclude="./new_root/*" \
|
||||||
--exclude="./etc/pacman.d/S.*" -clpf - . | tar -C /new_root -xlspf -
|
--exclude="./etc/pacman.d/S.*" -clpf - . | tar -C /new_root -xlspf -
|
||||||
# stop dbus to avoid 90 seconds hanging
|
# 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
|
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
|
echo "/dev/zram0 / btrfs defaults,discard,noatime,compress=zstd 0 0" >>/etc/fstab
|
||||||
systemctl switch-root /new_root
|
systemctl switch-root /new_root
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue