Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2023 16:24:36 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Dave Cottlehuber <dch@skunkwerks.at>, stable@freebsd.org
Subject:   Re: etcupdate created empty files = system unbootable
Message-ID:  <19399711-4a71-7025-7ceb-8dd481ec0038@quip.cz>
In-Reply-To: <95169DC0-5DB6-41D1-8B04-5A450094529F@FreeBSD.org>
References:  <312ae63f-4fab-e194-c603-a85fd11f6edd@quip.cz> <bae5d97b-42af-48a6-abf8-ff88ac19c62e@app.fastmail.com> <0db3bbf1-9e98-d721-c734-fdfe2483cbf0@quip.cz> <95169DC0-5DB6-41D1-8B04-5A450094529F@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28/04/2023 15:16, Dimitry Andric wrote:

>> yes, I have Boot Environment created before system upgrade (I always create BE before system or pkg upgrades) and there are automatic snapshot from cron.
>>
>> Should I try to clone it and reproduce it again?
>>
>> I will file a PR today.
> 
> I have seen some bad behavior in the past from etcupdate, when you interrupted it (with control-C) at the 'wrong' time. In that case, it would have built up a bad tree in /var/db/etcupdate, and as a result *delete* almost all files in /etc! However, this problem has been solved, as far as I know, and the effect was definitely not zero-sized files, but really deleted ones.
> 
> If you have a good way of reproducing it, I think the etcupdate maintainers will be interested enough, moreover since mergemaster is going to go away.

I have saved screens of the whole upgrade process so I am sure 
everything was fine without any error printed on the screen, nothing was 
interrupted etc. but the result was more than 80 empty files.

And the next thing which bothers me there is no way to fix the half 
updated state of /etc/ by etcupdate. I had to use mergemaster to fix it. 
How can we fix something like this in 14 without mergemaster?


root@rico ~/ # etcupdate
   D /etc/amd.map
   D /etc/newsyslog.conf.d/amd.conf
   D /etc/rc.d/amd
   D /etc/rc.d/nsswitch
   D /etc/rc.d/timed
   U /.profile
   U /COPYRIGHT
   U /etc/defaults/devfs.rules
   U /etc/defaults/rc.conf
   U /etc/devd.conf
   U /etc/devd/hyperv.conf
   U /etc/devd/iwmbtfw.conf
   U /etc/devd/zfs.conf
   U /etc/disktab
   M /etc/group
   U /etc/inetd.conf
   U /etc/libalias.conf
   U /etc/login.conf
   U /etc/mail/Makefile
   U /etc/mail/freebsd.cf
   U /etc/mail/freebsd.mc
   U /etc/mail/freebsd.submit.cf
   U /etc/mail/freebsd.submit.mc
   U /etc/mail/helpfile
   U /etc/mail/sendmail.cf
   U /etc/mail/submit.cf
   U /etc/mtree/BSD.debug.dist
   U /etc/mtree/BSD.include.dist
   U /etc/mtree/BSD.lib32.dist
   U /etc/mtree/BSD.root.dist
   U /etc/mtree/BSD.sendmail.dist
   U /etc/mtree/BSD.tests.dist
   U /etc/mtree/BSD.usr.dist
   U /etc/mtree/BSD.var.dist
   U /etc/network.subr
   C /etc/newsyslog.conf
   U /etc/portsnap.conf
   U /etc/profile
   U /etc/rc
   U /etc/rc.d/FILESYSTEMS
   U /etc/rc.d/archdep
   U /etc/rc.d/auditd
   U /etc/rc.d/bluetooth
   U /etc/rc.d/cleanvar
   U /etc/rc.d/ctld
   U /etc/rc.d/devmatch
   U /etc/rc.d/dhclient
   U /etc/rc.d/dumpon
   U /etc/rc.d/fsck
   U /etc/rc.d/growfs
   U /etc/rc.d/gssd
   U /etc/rc.d/hostapd
   U /etc/rc.d/hostid
   U /etc/rc.d/hostid_save
   U /etc/rc.d/ipfs
   U /etc/rc.d/ipfw
   U /etc/rc.d/jail
   U /etc/rc.d/ldconfig
   U /etc/rc.d/linux
   U /etc/rc.d/local
   U /etc/rc.d/local_unbound
   U /etc/rc.d/lockd
   U /etc/rc.d/motd
   U /etc/rc.d/mountcritremote
   U /etc/rc.d/mountd
   U /etc/rc.d/mountlate
   U /etc/rc.d/netif
   U /etc/rc.d/nfsd
   U /etc/rc.d/ntpd
   U /etc/rc.d/os-release
   U /etc/rc.d/pf
   U /etc/rc.d/routed
   U /etc/rc.d/routing
   U /etc/rc.d/statd
   U /etc/rc.d/syscons
   U /etc/rc.d/tmp
   U /etc/rc.d/wpa_supplicant
   U /etc/rc.d/zfs
   U /etc/rc.d/zfsbe
   U /etc/rc.d/zvol
   U /etc/rc.firewall
   U /etc/rc.initdiskless
   U /etc/rc.subr
   U /etc/regdomain.xml
   U /etc/security/audit_event
   U /etc/services
   U /etc/ssh/moduli
   U /etc/ssh/ssh_config
   C /etc/ssh/sshd_config
   M /etc/syslog.conf
   U /etc/ttys
   U /root/.profile
   A /etc/kyua/kyua.conf
   A /etc/motd.template
   A /etc/rc.d/growfs_fstab
   A /etc/rc.d/tlsclntd
   A /etc/rc.d/tlsservd
   A /etc/rc.d/var_run
   A /etc/rc.d/zfskeys
   A /etc/rc.d/zpool
   A /etc/rc.d/zpoolreguid
   A /root/.shrc
   A /usr/share/nls/en_US.US_ASCII
Warnings:
   Modified regular file remains: /etc/motd

Usr: 14.828s  Krnl: 7.174s  Totl: 0:58.53s  CPU: 37.5%  swppd: 0  I/O: 
28179+16114



root@rico ~/ # etcupdate resolve
Resolving conflict in '/etc/newsyslog.conf':
Select: (p) postpone, (df) diff-full, (e) edit,
         (h) help for more options: df

Select: (p) postpone, (df) diff-full, (e) edit,
         (h) help for more options: e

Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
         (h) help for more options: r

Resolving conflict in '/etc/ssh/sshd_config':
Select: (p) postpone, (df) diff-full, (e) edit,
         (h) help for more options: df

Select: (p) postpone, (df) diff-full, (e) edit,
         (h) help for more options: e

Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,
         (h) help for more options: r


root@rico ~/ # etcupdate status
Warnings:
   Modified regular file remains: /etc/motd



Also there was etcupdate -p before installworld.

Kind regards
Miroslav Lachman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19399711-4a71-7025-7ceb-8dd481ec0038>