Created
July 3, 2022 06:21
-
-
Save stu43005/27da08491b1ae9dbe219db8906ed1a14 to your computer and use it in GitHub Desktop.
Revisions
-
stu43005 created this gist
Jul 3, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ # 擴充大小 system_size=$(( $(du -sB512 system.img | cut -f1) + 200000 )) e2fsck -yf system.img resize2fs system.img "$system_size"s # 掛載映像檔 mkdir -p /tmp/system sudo mount -o loop system.img /tmp/system # # << 在這邊編輯 /tmp/system 內容 # # 取消掛載 sudo umount /tmp/system # 精簡大小 e2fsck -yf system.img resize2fs -M system.img