NetBSD Problem Report #57700
From www@netbsd.org Sat Nov 18 00:32:44 2023
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))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 4F97E1A9238
for <gnats-bugs@gnats.NetBSD.org>; Sat, 18 Nov 2023 00:32:44 +0000 (UTC)
Message-Id: <20231118003242.C82C61A9239@mollari.NetBSD.org>
Date: Sat, 18 Nov 2023 00:32:42 +0000 (UTC)
From: lloyd@must-have-coffee.gen.nz
Reply-To: lloyd@must-have-coffee.gen.nz
To: gnats-bugs@NetBSD.org
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
>Organization:
Must Have Coffee
>Environment:
NetBSD gamer.must-have-coffee.gen.nz 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #1: Wed Nov 15 19:23:58 NZDT 2023 lloyd@kudzu.must-have-coffee.gen.nz:/vol/build/netbsd-10/objdir.amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
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
>How-To-Repeat:
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".
>Fix:
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?
(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-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.