Update autoRepackUbuntuCloudImages.sh

This commit is contained in:
Molly Lau 2023-09-17 13:58:09 +09:00 committed by GitHub
parent 069bbd81d3
commit 0abc4334f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,8 @@ for distName in "jammy" "focal"; do
mount /dev/mapper/$mapperDevice /mnt
sed -ri 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"/g' /mnt/etc/default/grub
sed -ri 's/cloudimg-rootfs ro/cloudimg-rootfs ro net.ifnames=0 biosdevname=0/g' /mnt/boot/grub/grub.cfg
sed -ri 's/GRUB_TIMEOUT=0/GRUB_TIMEOUT=3/g' /mnt/etc/default/grub
sed -ri 's/set timeout=0/set timeout=3/g' /mnt/boot/grub/grub.cfg
umount /mnt
kpartx -dv $loopDevice
losetup -d $loopDevice