Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Oct 2021 20:06:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259012] makefs -t msdos creates broken image when out of space
Message-ID:  <bug-259012-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259012

            Bug ID: 259012
           Summary: makefs -t msdos creates broken image when out of space
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

I attempted to create a FAT image using:

makefs -t msdos \
    -o fat_type=3D16 \
    -o sectors_per_cluster=3D1 \
    -o volume_label=3DEFISYS \
    -s 64m \
    -D arm64.rootfs METALOG-boot

as it happens the content will not actually fit in 64m, and makefs emits er=
rors
and reports that the image is not created:

makefs: warning: FAT type limits file system to 66069 sectors
arm64.rootfs: 65524 sectors in 65524 FAT16 clusters (512 bytes/cluster)
BytesPerSec=3D512 SecPerClust=3D1 ResSectors=3D1 FATs=3D2 RootDirEnts=3D512=
 Media=3D0xf0
FATsecs=3D256 SecPerTrack=3D63 Heads=3D255 HiddenSecs=3D0 HugeSectors=3D660=
69
Populating `arm64.rootfs'
makefs: msdosfs_mkfile ./boot/kernel/ath_hal_ar9300.ko: No space left on de=
vice
makefs: msdos_populate_dir ./boot/kernel: No space left on device
makefs: msdos_populate_dir ./boot: No space left on device
makefs: Image file `arm64.rootfs' not created.

However, an image of the requested size with truncated contents does exist =
at
this point:

$ ls arm64-stage/arm64.rootfs=20
arm64-stage/arm64.rootfs

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259012-227>