NetBSD Problem Report #58375
From www@netbsd.org Fri Jun 28 13:11:07 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 9BDA11A923A
for <gnats-bugs@gnats.NetBSD.org>; Fri, 28 Jun 2024 13:11:07 +0000 (UTC)
Message-Id: <20240628131106.7C5B11A923C@mollari.NetBSD.org>
Date: Fri, 28 Jun 2024 13:11:06 +0000 (UTC)
From: imil@home.imil.net
Reply-To: imil@home.imil.net
To: gnats-bugs@NetBSD.org
Subject: mount_tmpfs -o union tmpfs with ext2 root fs leads to ls: dev: Invalid argument
X-Send-Pr-Version: www-1.0
>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
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.