fix(mkimg): fix re-generate initramfs
Signed-off-by: Coelacanthus <coelacanthus@outlook.com>
This commit is contained in:
parent
6791623ab7
commit
e0ff416204
1 changed files with 4 additions and 1 deletions
5
mkimg.sh
5
mkimg.sh
|
@ -87,7 +87,6 @@ sudo arch-chroot qcow2 pacman \
|
|||
--noconfirm \
|
||||
-Syu linux linux-firmware dracut dracut-hook
|
||||
|
||||
sudo arch-chroot qcow2 dracut --force --add "qemu qemu-net" --regenerate-all
|
||||
sudo mkdir -p qcow2/boot/extlinux
|
||||
cat << EOF | sudo tee qcow2/boot/extlinux/extlinux.conf
|
||||
menu title Arch RISC-V QEMU Boot
|
||||
|
@ -101,6 +100,10 @@ label linux
|
|||
append earlyprintk rw root=/dev/vda1 rootwait rootfstype=ext4 LANG=en_US.UTF-8 console=ttyS0
|
||||
EOF
|
||||
|
||||
msg "Re-generate initramfs for QEMU..."
|
||||
local kver=$(sudo arch-chroot qcow2 pacman -Si linux | grep -Po '(?<=Version : ).*')
|
||||
sudo arch-chroot qcow2 dracut --force --add "qemu qemu-net" /boot/initramfs-linux.img ${kver/.arch/-arch}
|
||||
|
||||
msg "Clean up..."
|
||||
msg2 "Clean up pacman package cache..."
|
||||
yes y | sudo pacman \
|
||||
|
|
Loading…
Add table
Reference in a new issue