Debian Sid/unstable NVDLA StarFive VisionFive V1 镜像

64G tf 卡上,使用 fdisk 和 resize2fs 扩展 root 分区到 54G

root@Debian-StarFive:~# fdisk -l
Disk /dev/mmcblk0: 58.24 GiB, 62534975488 bytes, 122138624 sectors
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: 0xc2d63c59

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p2        18432    51199    32768   16M  c W95 FAT32 (LBA)
/dev/mmcblk0p3 *      51200  1099775  1048576  512M 83 Linux
/dev/mmcblk0p4      1099776 14680063 13580288  6.5G 83 Linux
root@Debian-StarFive:~# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.38).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.


Command (m for help): p

Disk /dev/mmcblk0: 58.24 GiB, 62534975488 bytes, 122138624 sectors
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: 0xc2d63c59

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p2        18432    51199    32768   16M  c W95 FAT32 (LBA)
/dev/mmcblk0p3 *      51200  1099775  1048576  512M 83 Linux
/dev/mmcblk0p4      1099776 14680063 13580288  6.5G 83 Linux

Command (m for help): d
Partition number (2-4, default 4): 4

Partition 4 has been deleted.

Command (m for help): p
Disk /dev/mmcblk0: 58.24 GiB, 62534975488 bytes, 122138624 sectors
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: 0xc2d63c59

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p2      18432   51199   32768   16M  c W95 FAT32 (LBA)
/dev/mmcblk0p3 *    51200 1099775 1048576  512M 83 Linux

Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1,4, default 1): 4
First sector (2048-122138623, default 2048): 1099776
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1099776-122138623, default 122138623): 122138623

Created a new partition 4 of type 'Linux' and of size 57.7 GiB.
Partition #4 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: N

Command (m for help): p

Disk /dev/mmcblk0: 58.24 GiB, 62534975488 bytes, 122138624 sectors
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: 0xc2d63c59

Device         Boot   Start       End   Sectors  Size Id Type
/dev/mmcblk0p2        18432     51199     32768   16M  c W95 FAT32 (LBA)
/dev/mmcblk0p3 *      51200   1099775   1048576  512M 83 Linux
/dev/mmcblk0p4      1099776 122138623 121038848 57.7G 83 Linux

Command (m for help): w
The partition table has been altered.
Syncing disks.

root@Debian-StarFive:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.5G     0  3.5G   0% /dev
tmpfs           718M  908K  718M   1% /run
/dev/mmcblk0p4  6.3G  1.2G  4.9G  19% /
tmpfs           3.6G     0  3.6G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/mmcblk0p3  488M   39M  413M   9% /boot
/dev/mmcblk0p2   16M  4.5M   12M  29% /boot/efi
tmpfs           718M     0  718M   0% /run/user/0
root@Debian-StarFive:~# resize2fs /dev/mmcblk0p4 
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mmcblk0p4 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 8
The filesystem on /dev/mmcblk0p4 is now 15129856 (4k) blocks long.

root@Debian-StarFive:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.5G     0  3.5G   0% /dev
tmpfs           718M  908K  718M   1% /run
/dev/mmcblk0p4   57G  1.2G   54G   3% /
tmpfs           3.6G     0  3.6G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/mmcblk0p3  488M   39M  413M   9% /boot
/dev/mmcblk0p2   16M  4.5M   12M  29% /boot/efi
tmpfs           718M     0  718M   0% /run/user/0

4 Likes