• vermaden@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      22 days ago

      Doesn’t look like glabel is available on NetBSD

      Is there some alternative command for labels on NetBSD?

      • pfr@lemmy.sdf.orgM
        link
        fedilink
        English
        arrow-up
        2
        ·
        21 days ago

        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.mlOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          20 days ago

          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.orgM
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            16 days ago

            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.mlOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              10 days ago

              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