From b8b1c2737e165ed95e5a56d30cd4ac5efa2bd01f Mon Sep 17 00:00:00 2001 From: Supdrewin Date: Tue, 5 Apr 2022 13:42:04 +0000 Subject: [PATCH] Fix variable escape. --- extra.md | 2 +- install.sh | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/extra.md b/extra.md index 0331f7c..7264d7a 100644 --- a/extra.md +++ b/extra.md @@ -79,7 +79,7 @@ $ echo "185.199.109.133 raw.githubusercontent.com" >>/etc/hosts ``` - 3. 安装完成后,重启即可进入新系统 + 3. 安装完成后,先在右下角 `弹出虚拟盘`,然后重启即可进入新系统 (用户名和密码都是 `root`): ``` shell diff --git a/install.sh b/install.sh index c6c9caf..735de92 100644 --- a/install.sh +++ b/install.sh @@ -45,7 +45,10 @@ done pacstrap /mnt base linux linux-firmware networkmanager genfstab -U /mnt >>/mnt/etc/fstab -arch-chroot /mnt bash -c "$(sed -n 51,77p "$0")" +UUID=$(cat /mnt/etc/kernel/cmdline + +arch-chroot /mnt bash -c "$(sed -n 54,75p "$0")" umount -R /mnt && exit $? ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime @@ -60,12 +63,7 @@ echo "archvm" >/etc/hostname echo "root root" | passwd -UUID=$(cat /etc/kernel/cmdline - -mkdir -p /boot/efi/boot - -objcopy \ +mkdir -p /boot/efi/boot && objcopy \ --add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \ --add-section .cmdline="/etc/kernel/cmdline" --change-section-vma .cmdline=0x30000 \ --add-section .splash="/usr/share/systemd/bootctl/splash-arch.bmp" --change-section-vma .splash=0x40000 \