Crucial FreeBSD Toolkit
from vermaden@lemmy.ml to bsd@lemmy.sdf.org on 08 Jul 20:32
https://lemmy.ml/post/32888136

#bsd

threaded - newest

thedaemon@lemmy.sdf.org on 09 Jul 21:08 next collapse

You forgot to post any content on this.

vermaden@lemmy.ml on 11 Jul 22:06 collapse

Yep - I fucked up - fortunately thatsit@sh.itjust.work fixed that in comment below :)

pfr@lemmy.sdf.org on 10 Jul 22:46 collapse

Hi Vermaden, great to see you here.

I remember reading about the lsblk.sh some time ago and tried testing it on NetBSD. I ran into some errors, which I can’t remember right now. Will test it again and post the output here later.

vermaden@lemmy.ml on 11 Jul 22:05 collapse

Hi and thanks for testing it on NetBSD - let me know how it went - we can add that to my repo and I can ‘maintain’ lsblk(8) that will both for FreeBSD and NetBSD :)

pfr@lemmy.sdf.org on 12 Jul 03:06 collapse

This is what I get on NetBSD 10.1 STABLE

0x0.st/8DJP.png

Doesn’t look like glabel is available on NetBSD

vermaden@lemmy.ml on 12 Jul 21:52 next collapse

Doesn’t look like glabel is available on NetBSD

Is there some alternative command for labels on NetBSD?

pfr@lemmy.sdf.org on 13 Jul 14:20 collapse

gpt show sd0 and gpt show -l sd0 will show partition labels (if using GPT)

Could also use dkctl sd0 listwedges to show wedge names…

I’ll have a little play and see what might work best

vermaden@lemmy.ml on 14 Jul 20:59 collapse

I would love to sit down on this and just port it to NetBSD … but this month time is my ‘valuable’ thing - and I need to provide some things that I need to do for a living - please try and share what you found to work - I would really like to make lsblk(8) also work on NetBSD - as if FreeBSD would not exist - the NetBSD UNIX is the system I would be using instead :)

pfr@lemmy.sdf.org on 18 Jul 04:22 collapse

Yeah, I looked deeper into it and there’s just too many differences between each system to make a completely portable *BSD script. Well, is out of scope for my skills at least.

I whipped up a quick and dirty script that sort of emulates lsblk on NetBSD…

Not my finest, but it works on my machine

NetBSD-lsblk.sh

vermaden@lemmy.ml on 24 Jul 11:38 collapse

Thanks - I tried it under NetBSD in FreeBSD Bhyve VM - but no luck for me:

netbsd# uname -prsm
NetBSD 10.1 amd64 x86_64

netbsd# ./lsblk.NetBSD
DEV      LABEL        FS     SIZE   USED USE% MOUNT
----------------------------------------------------------------------
disklabel: ioctl DIOCGDINFO: Inappropriate ioctl for device

vermaden@lemmy.ml on 13 Jul 13:02 collapse

Also … is there some gpart(8) FreeBSD equivalent on NetBSD?