Blog: 2023-08-29

From razwiki
Revision as of 22:54, 28 August 2023 by Razzi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ok I got my starfive visionfive2 to boot, using their official 202306 debian image. Unzipped the image from the SD folder and flashed it with BalenaEtcher. I wasn't seeing any output printed, but after I watched a video that told me the way to put the boot pins, I followed their instruction to make switch 1 away and 2 is towards the number of switch.

After the usual boot I was presented with a graphical login!

user starfive

got me logged in.

The first thing I did was follow the quick start guide's instructions to resize the SD card system, which worked while it was running just fine. The key was an interactive fdisk followed by a resize2fs. Here's how it all looked before:

user@starfive:~$ whoami
user
user@starfive:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.7G     0  1.7G   0% /dev
tmpfs           390M  3.5M  386M   1% /run
/dev/mmcblk1p4  2.5G  2.2G  267M  90% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M   12K  5.0M   1% /run/lock
tmpfs           390M  132K  390M   1% /run/user/1000

And here's how it looks now:

user@starfive:~$ sudo fdisk /dev/mmcblk1

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

GPT PMBR size mismatch (5529599 != 124735487) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
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): d
Partition number (1-4, default 4): 

Partition 4 has been deleted.

Command (m for help): n
Partition number (4-128, default 4): 
First sector (34-124735454, default 221184): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (221184-124735454, default 124733439): 

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

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

Command (m for help): w

The partition table has been altered.
Syncing disks.

user@starfive:~$ sudo resize2fs /dev/mmcblk
mmcblk0       mmcblk0boot1  mmcblk1       mmcblk1p2     mmcblk1p4
mmcblk0boot0  mmcblk0rpmb   mmcblk1p1     mmcblk1p3     
user@starfive:~$ sudo resize2fs /dev/mmcblk1p4 
resize2fs 1.46.6-rc1 (12-Sep-2022)
Filesystem at /dev/mmcblk1p4 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 8
The filesystem on /dev/mmcblk1p4 is now 15564032 (4k) blocks long.

user@starfive:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.7G     0  1.7G   0% /dev
tmpfs           390M  3.5M  386M   1% /run
/dev/mmcblk1p4   59G  2.2G   57G   4% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M   12K  5.0M   1% /run/lock
tmpfs           390M  132K  390M   1% /run/user/1000

I can also see the SSD storage is recognized:

user@starfive:~$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mtdblock0     31:0    0   256K  0 disk 
mtdblock1     31:1    0     3M  0 disk 
mtdblock2     31:2    0     1M  0 disk 
mmcblk1      179:0    0  59.5G  0 disk 
├─mmcblk1p1  179:1    0     2M  0 part 
├─mmcblk1p2  179:2    0     4M  0 part 
├─mmcblk1p3  179:3    0   100M  0 part 
└─mmcblk1p4  179:4    0  59.4G  0 part /
mmcblk0      179:8    0  14.7G  0 disk 
mmcblk0boot0 179:16   0     4M  1 disk 
mmcblk0boot1 179:24   0     4M  1 disk 
nvme0n1      259:0    0 931.5G  0 disk 

but I haven't done anything with it yet. This blog seems to have instructions on how to get the board booting from SSD:

https://jamesachambers.com/starfive-visionfive-2-debian-ssd-boot-guide/

But I note they talk about using heat sinks, and I don't even have a fan attached to my lil cpu. Honestly the physical setup is tricky, but I think they assume you know exactly what you're doing. No "magic smoke" yet, just Debian ;)