add sleep on local image

This commit is contained in:
Tobias Powalowski 2023-08-02 16:54:59 +02:00
parent 01b9d7531e
commit 0851e9a29a
2 changed files with 4 additions and 3 deletions

View file

@ -206,6 +206,7 @@ _new_environment() {
rm -rf /sysroot/{hooks,install,kernel,new_root,sysroot,mkinitcpio.*} &>"${_NO_LOG}" rm -rf /sysroot/{hooks,install,kernel,new_root,sysroot,mkinitcpio.*} &>"${_NO_LOG}"
rm -f /sysroot/{VERSION,config,buildconfig,init} &>"${_NO_LOG}" rm -f /sysroot/{VERSION,config,buildconfig,init} &>"${_NO_LOG}"
_progress "100" "Switching to rootfs ${_RAM}..." _progress "100" "Switching to rootfs ${_RAM}..."
read -r -t 2
# https://www.freedesktop.org/software/systemd/man/bootup.html # https://www.freedesktop.org/software/systemd/man/bootup.html
# enable systemd initrd functionality # enable systemd initrd functionality
touch /etc/initrd-release touch /etc/initrd-release

View file

@ -84,11 +84,11 @@ _second_stage() {
mkfs.btrfs /dev/zram0 &>/dev/null mkfs.btrfs /dev/zram0 &>/dev/null
# use discard to get free RAM on delete! # use discard to get free RAM on delete!
mount -o discard /dev/zram0 /sysroot &>/dev/null mount -o discard /dev/zram0 /sysroot &>/dev/null
_progress "72" "${_KEEP} Copying modules to /sysroot..." _progress "72" "${_KEEP} Moving modules to /sysroot..."
mkdir -p /sysroot/usr/lib mkdir -p /sysroot/usr/lib
_progress "73" "${_KEEP} Copying modules to /sysroot..." _progress "73" "${_KEEP} Moving modules to /sysroot..."
mv /lib/modules /sysroot/usr/lib mv /lib/modules /sysroot/usr/lib
_progress "76" "${_KEEP} Copying firmware to /sysroot..." _progress "76" "${_KEEP} Moving firmware to /sysroot..."
mv /lib/firmware /sysroot/usr/lib mv /lib/firmware /sysroot/usr/lib
_progress "80" "${_KEEP} Copying rootfs to /sysroot..." _progress "80" "${_KEEP} Copying rootfs to /sysroot..."
cd /sysroot || _emergency_shell cd /sysroot || _emergency_shell