Skip to content

Commit

Permalink
Fix variable escape.
Browse files Browse the repository at this point in the history
  • Loading branch information
supdrewin committed Apr 5, 2022
1 parent c5ec6d1 commit b8b1c27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
$ echo "185.199.109.133 raw.githubusercontent.com" >>/etc/hosts
```

3. 安装完成后,重启即可进入新系统
3. 安装完成后,先在右下角 `弹出虚拟盘`,然后重启即可进入新系统
(用户名和密码都是 `root`):

``` shell
Expand Down
12 changes: 5 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/fstab | grep -A1 "${DISK}2" | tail -1)
echo "root=${UUID%/*}" >/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
Expand All @@ -60,12 +63,7 @@ echo "archvm" >/etc/hostname
echo "root
root" | passwd

UUID=$(cat </etc/fstab | grep -A1 "${DISK}2" | tail -1)
echo "root=${UUID%/*}" >/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 \
Expand Down

0 comments on commit b8b1c27

Please sign in to comment.