mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
sync filesystem before switch-root
This commit is contained in:
parent
24dadefb11
commit
d10dad76e9
7 changed files with 8 additions and 5 deletions
|
@ -57,6 +57,7 @@ if [[ "${TTY}" = "tty1" ]]; then
|
||||||
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
|
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
|
||||||
# systemd needs this for root_switch
|
# systemd needs this for root_switch
|
||||||
touch /etc/initrd-release
|
touch /etc/initrd-release
|
||||||
|
sync
|
||||||
echo -e "\e[1;96mArchboot\e[m \e[1m- Arch Linux Environment finished.\e[m"
|
echo -e "\e[1;96mArchboot\e[m \e[1m- Arch Linux Environment finished.\e[m"
|
||||||
echo -e "\e[1mSystemd initrd-switch-root will be launched in a second...\e[m"
|
echo -e "\e[1mSystemd initrd-switch-root will be launched in a second...\e[m"
|
||||||
read -r -t 3
|
read -r -t 3
|
||||||
|
|
|
@ -383,11 +383,13 @@ _new_environment() {
|
||||||
if [[ -e /var/cache/pacman/pkg/archboot.db ]]; then
|
if [[ -e /var/cache/pacman/pkg/archboot.db ]]; then
|
||||||
echo -e "\e[1mStep ${_STEPS}/${_STEPS}:\e[m Switch root to ${_RAM}..."
|
echo -e "\e[1mStep ${_STEPS}/${_STEPS}:\e[m Switch root to ${_RAM}..."
|
||||||
mv ${_W_DIR}/tmp/* /${_RAM}/
|
mv ${_W_DIR}/tmp/* /${_RAM}/
|
||||||
|
rm -r /${_RAM}/mkinitcpio.*
|
||||||
# cleanup mkinitcpio directories and files
|
# cleanup mkinitcpio directories and files
|
||||||
rm -rf /sysroot/{hooks,install,kernel,new_root,sysroot} &>/dev/null
|
rm -rf /sysroot/{hooks,install,kernel,new_root,sysroot} &>/dev/null
|
||||||
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
|
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
|
||||||
# systemd needs this for root_switch
|
# systemd needs this for root_switch
|
||||||
touch /etc/initrd-release
|
touch /etc/initrd-release
|
||||||
|
sync
|
||||||
systemctl start initrd-switch-root
|
systemctl start initrd-switch-root
|
||||||
fi
|
fi
|
||||||
echo -e "\e[1mStep ${_S_APPEND}7/${_STEPS}:\e[m Creating initramfs ${_RAM}/${_INITRD}..."
|
echo -e "\e[1mStep ${_S_APPEND}7/${_STEPS}:\e[m Creating initramfs ${_RAM}/${_INITRD}..."
|
||||||
|
|
|
@ -6,7 +6,7 @@ build ()
|
||||||
{
|
{
|
||||||
map add_binary head id cksum tail test uptime w who whoami xargs \
|
map add_binary head id cksum tail test uptime w who whoami xargs \
|
||||||
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
||||||
chgrp chown dialog dmesg egrep fgrep stty sync hdparm \
|
chgrp chown dialog dmesg egrep fgrep stty hdparm \
|
||||||
dirname chroot expr bzip2 su sdparm tput bsdcpio \
|
dirname chroot expr bzip2 su sdparm tput bsdcpio \
|
||||||
losetup mkfifo mknod readlink lzmadec lzop xz last wall mesg utmpdump \
|
losetup mkfifo mknod readlink lzmadec lzop xz last wall mesg utmpdump \
|
||||||
xzdec switch_root pivot_root chcpu ctrlaltdel gdisk sgdisk cgdisk fixparts findmnt \
|
xzdec switch_root pivot_root chcpu ctrlaltdel gdisk sgdisk cgdisk fixparts findmnt \
|
||||||
|
|
|
@ -6,7 +6,7 @@ build ()
|
||||||
{
|
{
|
||||||
apps="head id cksum tail test uptime w who whoami xargs \
|
apps="head id cksum tail test uptime w who whoami xargs \
|
||||||
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
||||||
chgrp dialog dmesg egrep fgrep stty sync hdparm bsdcpio\
|
chgrp dialog dmesg egrep fgrep stty hdparm bsdcpio\
|
||||||
dirname chroot expr bunzip2 bzcat bzip2 su sdparm tput \
|
dirname chroot expr bunzip2 bzcat bzip2 su sdparm tput \
|
||||||
losetup mkfifo mknod lzmadec lzop lzma lzcat unlzma unxz xzcat \
|
losetup mkfifo mknod lzmadec lzop lzma lzcat unlzma unxz xzcat \
|
||||||
lastb last wall mesg utmpdump xzdec switch_root pivot_root chcpu ctrlaltdel \
|
lastb last wall mesg utmpdump xzdec switch_root pivot_root chcpu ctrlaltdel \
|
||||||
|
|
|
@ -16,7 +16,7 @@ build ()
|
||||||
mkdir echo false sleep kmod pidof touch chmod find wc uname yes awk halt \
|
mkdir echo false sleep kmod pidof touch chmod find wc uname yes awk halt \
|
||||||
shutdown reboot poweroff insmod modprobe sh dd sort zstd date tee mktemp \
|
shutdown reboot poweroff insmod modprobe sh dd sort zstd date tee mktemp \
|
||||||
install pgrep mkfs.btrfs rmmod mountpoint gzip ldconfig nscd ln top df cut \
|
install pgrep mkfs.btrfs rmmod mountpoint gzip ldconfig nscd ln top df cut \
|
||||||
stat tr passwd od tar bsdtar
|
stat tr passwd od tar bsdtar sync
|
||||||
|
|
||||||
### add nano
|
### add nano
|
||||||
add_binary nano
|
add_binary nano
|
||||||
|
|
|
@ -35,7 +35,7 @@ ConditionPathExists=/dev/tty0
|
||||||
# The '-o' option value tells agetty to replace 'login' arguments with an
|
# The '-o' option value tells agetty to replace 'login' arguments with an
|
||||||
# option to preserve environment (-p), followed by '--' for safety, and then
|
# option to preserve environment (-p), followed by '--' for safety, and then
|
||||||
# the entered username.
|
# the entered username.
|
||||||
ExecStart=-/sbin/agetty --skip-login --login-options "-f root -p -- \\u" - $TERM
|
ExecStart=-/sbin/agetty --skip-login -o "-f root -p -- \\u" - $TERM
|
||||||
Type=idle
|
Type=idle
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=0
|
RestartSec=0
|
||||||
|
|
|
@ -30,7 +30,7 @@ Before=rescue.service
|
||||||
# The '-o' option value tells agetty to replace 'login' arguments with an
|
# The '-o' option value tells agetty to replace 'login' arguments with an
|
||||||
# option to preserve environment (-p), followed by '--' for safety, and then
|
# option to preserve environment (-p), followed by '--' for safety, and then
|
||||||
# the entered username.
|
# the entered username.
|
||||||
ExecStart=-/sbin/agetty --skip-login --login-options "-f root -p -- \\u" --keep-baud 115200,57600,38400,9600 - $TERM
|
ExecStart=-/sbin/agetty --skip-login -o "-f root -p -- \\u" --keep-baud 115200,57600,38400,9600 - $TERM
|
||||||
Type=idle
|
Type=idle
|
||||||
Restart=always
|
Restart=always
|
||||||
UtmpIdentifier=%I
|
UtmpIdentifier=%I
|
||||||
|
|
Loading…
Reference in a new issue