參考資訊:
https://packages.pyra-handheld.com/images
https://pyra-handheld.com/wiki/index.php?title=Manual#Reflashing_a_Pyra
步驟如下:
$ cd
$ wget https://packages.pyra-handheld.com/images/bookworm/bookworm1.img.7z
$ 7za x bookworm1.img.7z
$ sudo dd if=bookworm1.img of=/dev/sdX bs=1M
$ fdisk -l
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 526335 524288 256M 83 Linux
/dev/sdb2 526336 8388607 7862272 3.8G 83 Linux
$ sudo fdisk /dev/sdb
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 238.3 GiB, 255869321216 bytes, 499744768 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9ef3bd97
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 526335 524288 256M 83 Linux
/dev/sdb2 526336 8388607 7862272 3.8G 83 Linux
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (526336-499744767, default 526336):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (526336-499744767, default 499744767):
Created a new partition 2 of type 'Linux' and of size 238 GiB.
Partition #2 contains a f2fs signature.
Do you want to remove the signature? [Y]es/[N]o: N
Command (m for help): p
Disk /dev/sdb: 238.3 GiB, 255869321216 bytes, 499744768 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9ef3bd97
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 526335 524288 256M 83 Linux
/dev/sdb2 526336 499744767 499218432 238G 83 Linux
Command (m for help): w
$ sudo fsck.f2fs /dev/sdb2
$ sudo resize.f2fs /dev/sdb2
P.S. fsck.f2fs、resize.f2fs指令必須在Pyra上執行,不能開完機後,再拿去做Resize