mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-16 01:50:40 +00:00
15 lines
396 B
Bash
15 lines
396 B
Bash
#!/bin/sh
|
|
# Grows the root partition and filesystem to fill the disk.
|
|
# Runs once on first boot, then disables itself.
|
|
set -e
|
|
|
|
ROOT_DEV=$(findmnt -no SOURCE /)
|
|
DISK=$(lsblk -ndo PKNAME "$ROOT_DEV")
|
|
PART_NUM=$(cat /sys/class/block/$(basename "$ROOT_DEV")/partition)
|
|
|
|
growpart "/dev/$DISK" "$PART_NUM" || true
|
|
partprobe "/dev/$DISK"
|
|
resize2fs "$ROOT_DEV" || true
|
|
|
|
rc-update del grow-rootfs default
|