NetBSD Problem Report #57700

From  Sat Nov 18 00:32:44 2023
Return-Path: <>
Received: from ( [])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 4F97E1A9238
	for <>; Sat, 18 Nov 2023 00:32:44 +0000 (UTC)
Message-Id: <>
Date: Sat, 18 Nov 2023 00:32:42 +0000 (UTC)
Subject: postinstall wrecks MAKEDEV on /dev ramdisk
X-Send-Pr-Version: www-1.0

>Number:         57700
>Category:       install
>Synopsis:       postinstall wrecks MAKEDEV on /dev ramdisk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 18 00:35:00 +0000 2023
>Originator:     Lloyd Parkes
>Release:        10.0_RC1
Must Have Coffee
NetBSD 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #1: Wed Nov 15 19:23:58 NZDT 2023 amd64
The command "postinstall -s ... fix makedev" will leave your system unbootable if /dev is a ramdisk created by init(8). 

This seems to be because populate_dir() deletes MAKEDEV from the underlying persistent filesystem and then creates a new MAKEDEV in the overlying ramdisk. e.g.

                elif ! rm -f "${fd}" ||
                     ! cp -f "${fs}" "${fd}"; then

1) Make sure you have alternate boot media available.

2) Upgrade to NetBSD 10 on a system using a ramdisk for /dev and then run "postinstall fix makedev ; shutdown -r now".

Maybe add a check to do_makedev() that will abort the "fix" operation if /dev is a ramdisk. 

Maybe maintain a list of files that not to be deleted before being copied in to place?

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.