mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-16 01:50:40 +00:00
grow-rootfs: skip rootfs auto-grow on m2 (#26)
This commit is contained in:
@@ -12,6 +12,16 @@ set -e
|
|||||||
|
|
||||||
ROOT_DEV=$(findmnt -no SOURCE /)
|
ROOT_DEV=$(findmnt -no SOURCE /)
|
||||||
DISK="/dev/$(lsblk -ndo PKNAME "$ROOT_DEV")"
|
DISK="/dev/$(lsblk -ndo PKNAME "$ROOT_DEV")"
|
||||||
|
|
||||||
|
# PS5 M.2 drive appear as /dev/nvme*. Do not modify partition table,
|
||||||
|
# because it contains m2_init PS5 offset. Only USB drive (/dev/sd*)
|
||||||
|
# are safe for automatic grow root partition.
|
||||||
|
if [[ "$(basename "$DISK")" == nvme* ]]; then
|
||||||
|
echo "grow-rootfs: M.2 detected, skipping"
|
||||||
|
systemctl disable grow-rootfs.service
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
PART_NUM=$(cat /sys/class/block/$(basename "$ROOT_DEV")/partition)
|
PART_NUM=$(cat /sys/class/block/$(basename "$ROOT_DEV")/partition)
|
||||||
|
|
||||||
# Our images dd at their built size (~14 GB) onto a much larger USB. The GPT
|
# Our images dd at their built size (~14 GB) onto a much larger USB. The GPT
|
||||||
|
|||||||
Reference in New Issue
Block a user