-
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 3b524b5
Showing
2 changed files
with
26 additions
and
7 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,29 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
# whiptail --infobox "Resizing filesystem..." 20 60 | ||
|
||
# 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 | ||
|
||
# whiptail --infobox "Enable SWAP partition..." 20 60 | ||
|
||
# formatand enable swap partition | ||
mkswap /dev/mmcblk0p3 | ||
swapon -a | ||
|
||
# regenerate fstab | ||
genfstab -t PARTUUID / > /etc/fstab | ||
update-initramfs -u | ||
|
||
# whiptail --infobox "Generating SSH Host keys..." 20 60 | ||
|
||
# regenerate openssh host keys | ||
dpkg-reconfigure openssh-server | ||
dpkg-reconfigure openssh-server | ||
|
||
# whiptail --infobox "Firstboot Done. Rebooting in 3 seconds..." 20 60 | ||
# sleep 3 | ||
# 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