NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: disks, partitions, slices, etc.



On Fri, 9 Oct 2026 at 12:26, Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>
> ea1abz%gmail.com@localhost (Ramiro Aceves) writes:
>
>
> >#        size    offset     fstype [fsize bsize cpg/sgs]
> > d: 120164352         0     unused      0     0        # (Cyl.      0 - 119=
> >210*)
> > e: 120164289        63 Linux Ext2      0     0        # (Cyl.      0*- 119=
> >210*)
>
>
> >Se est=E1 creando un sistema de ficheros con 15020544 bloques de 4k y 37601=
> >28 nodos-i
>
>
>
> Looks like a NetBSD bug.
>
> e2fsprogs picks up the DIOCGMEDIASIZE ioctl to check the size.
>
> On FreeBSD this will return either the total disk size or the size
> of a specific partition, depending on what device has been opened.
>
> On NetBSD it returns the total disk size even for a partition.
>


 On Linux:
mkfs.ext2 -L commons /dev/sda4            # optionally -O ^dir_index,^ext_attr

On NetBSD:
dkctl ld0 listwedges                      # find the wedge, e.g. dk3 /
GUID b5bff367-...
mount -t ext2fs NAME=b5bff367-4977-4887-bea0-7e42f7a04fe4 /mnt

In fstab:
NAME=b5bff367-4977-4887-bea0-7e42f7a04fe4  /commons  ext2fs  rw  0 0

To repair: use Linux e2fsck or pkgsrc e2fsck -- never
/sbin/fsck_ext2fs on 11/-current

Setting a GPT partition label (`gpt label -i 4 -l commons ld0` on
NetBSD, or `sgdisk -c 4:commons` on Linux) gives you `NAME=commons` in
fstab.

-- 
----


Home | Main Index | Thread Index | Old Index