NetBSD-Bugs archive

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

kern/58375: mount_tmpfs -o union tmpfs with ext2 root fs leads to ls: dev: Invalid argument



>Number:         58375
>Category:       kern
>Synopsis:       mount_tmpfs -o union tmpfs with ext2 root fs leads to ls: dev: Invalid argument
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 28 13:15:00 +0000 2024
>Originator:     Emile 'iMil' Heitor
>Release:        current
>Organization:
NetBSD
>Environment:
NetBSD  10.99.10 NetBSD 10.99.10 (MICROVM) #253: Fri Jun 28 12:30:27 CEST 2024  imil@tatooine:/home/imil/src/github.com/NetBSD-src/sys/arch/amd64/compile/obj/MICROVM amd64
>Description:
I wrote a script to generate minimal NetBSD root filesystem images than can run on NetBSD or Linux(*). The latter doesn't have decent r/w UFS support, and as NetBSD has ext2 support, when building an image on a Linux system, the image is formatted using Linux's mke2fs.
init(8) calls MAKEDEV with -MM which sets do_create_mfs to true, and triggers create_mfs_dev(), which calls mount_tmpfs or mount_mfs with the -o union flag.
This leads to:
# ls /dev
ls: dev: Invalid argument
When the virtual machine is booted with an ext2 filesystem.


(*) https://gitlab.com/iMil/mksmolnb/-/blob/main/mkimg.sh
>How-To-Repeat:
Boot NetBSD with an ext2 root filesystem.
>Fix:
Temporary fix: sed -i 's/-o union//g' MAKEDEV



Home | Main Index | Thread Index | Old Index