NetBSD-Bugs archive

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

install/57700: postinstall wrecks MAKEDEV on /dev ramdisk



>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@localhost:/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?




Home | Main Index | Thread Index | Old Index