I’ll give it a go to clone vf2 repo.
chroot /mnt
apt-get install git
The following error is because I didn’t mount the other stuff before chrooting. that’s what I meant by well-enough.
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
All good for this second git clone. Please recall I did a git clone of debootstrap because the debian-ports debootstrap .deb wasn’t completing on the /mnt successfully. The debootstrap was done straight from sources.
git clone https://github.com/starfive-tech/VisionFive2.git
Cloning into 'VisionFive2'...
remote: Enumerating objects: 4401, done.
remote: Counting objects: 100% (525/525), done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 4401 (delta 282), reused 491 (delta 258), pack-reused 3876
Receiving objects: 100% (4401/4401), 290.57 MiB | 13.49 MiB/s, done.
Resolving deltas: 100% (2408/2408), done.
within the chroot, I installed hdparm:
apt-get install hdparm
Then ran the test:
hdparm -tT /dev/nvme0n1
/dev/nvme0n1: No such file or directory LOL that’s because of those required pseudo filesystems mountpoints before chrooting. brb
BOTTOM LINE: mount those pseudo filesystems before chrooting.
IMPORTANT NOTE: the daemon-reload is necessary to mount in the specified order immediately. The order is important.
So as a point of reference: Repair the Bootloader - System76 Support
It does the following 2 step chroot:
for i in dev dev/pts proc sys run; do mount -B /$i /mnt/$i; systemctl daemon-reload; done
chroot /mnt
NOTE AFTER USING CHROOT: Please remember to unmount the pseudo filesystems.
IMPORTANT NOTE: the daemon-reload is necessary to unmount in the specified order immediately. The order is important.
for i in dev dev/pts proc sys run; do umount /mnt/$i; systemctl daemon-reload; done
You might need to run the unmount twice.
There. Now we won’t get any annoying issues for the pseudo filesystems in the chroot anymore.
Let’s try that hdparm test on the nvme drive again.
hdparm -tT /dev/nvme0n1
/dev/nvme0n1:
Timing cached reads: 1352 MB in 2.00 seconds = 676.26 MB/sec
Timing buffered disk reads: 494 MB in 3.01 seconds = 164.18 MB/sec
versus the sdcard:
hdparm -tT /dev/mmcblk1
/dev/mmcblk1:
Timing cached reads: 1242 MB in 2.00 seconds = 620.39 MB/sec
Timing buffered disk reads: 66 MB in 3.03 seconds = 21.81 MB/sec
unmount the pseudo filesystems
for i in dev dev/pts proc sys run; do umount /mnt/$i; systemctl daemon-reload; done
You might need to run the unmount twice.