Update autoRepackUbuntuCloudImages.sh

This commit is contained in:
Molly Lau 2023-09-18 20:46:29 +09:00 committed by GitHub
parent 174540321a
commit 264857a043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,8 +17,8 @@ for distName in "jammy" "focal"; do
mount /dev/mapper/$mapperDevice /mnt 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/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/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/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 # sed -ri 's/set timeout=0/set timeout=3/g' /mnt/boot/grub/grub.cfg
umount /mnt umount /mnt
kpartx -dv $loopDevice kpartx -dv $loopDevice
losetup -d $loopDevice losetup -d $loopDevice