-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5019405
commit 6671209
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# use all emmc free space for rootfs | ||
parted -s /dev/mmcblk0 "resizepart 3 -0" | ||
# resize root filesystem | ||
parted -s /dev/mmcblk0 "resizepart 4 -0" | ||
|
||
# refresh filesystem usable size | ||
resize2fs /dev/mmcblk0p2 | ||
resize2fs /dev/mmcblk0p3 | ||
resize2fs /dev/mmcblk0p4 | ||
|
||
# formatand enable swap partition | ||
mkswap /dev/mmcblk0p3 | ||
swapon -a | ||
|
||
# regenerate fstab | ||
genfstab -t PARTUUID / > /etc/fstab | ||
|
||
# regenerate openssh host keys | ||
dpkg-reconfigure openssh-server | ||
dpkg-reconfigure openssh-server | ||
|
||
# reboot | ||
reboot |
This file contains 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 characters