Discussion:
Updating to FreeBSD-current, can't mount -uw / : update: seemingly solved
Thomas Mueller
2021-06-07 00:15:12 UTC
Permalink
I updated a FreeBSD-current to the newest FreeBSD-current/14, buildworld took 11:15 (hours:minutes), buildkernel was also successful, I even appeared to be successful with "dhclient re0".

UPDATING file says to boot single-user after buildkernel and installkernel, but then mount -u / or mount -uw / does not work as it did in previous times.

Results were

mount -uw / or mount -u / produces
fstab: /etc/fstab:2: Inappropriate file type or format
fstab: /etc/fstab:2: Inappropriate file type or format

/etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/gpt/Sea1-08 none swap 0 0
/dev/gpt/Sea1-18 / ufs rw 1 1
#/dev/gpt/Sea1-06 /home ufs rw 1 1

fsck -p produces

fstab: /etc/fstab:2: Inappropriate file type or format
/dev/gpt/Sea1-18: NO WRITE ACCESS
/dev/gpt/Sea1-18: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

I tried fsck /dev/gpt/Sea1-18 and fsck / but did no better.

Now what do I do? I also ran fsck_ffs instead of just fsck.

Do I need to boot NetBSD and run fsck_ffs or fsck_ffs -f from there?

Now I seem to have solved the problem. Either rebooting or fixing /etc/fstab did it.

I may have had one too few fields on the /dev/gpt/Sea1-08 line, maybe that caused the system to misinterpret the next line.

I added sw between swap and 0, thus the corrected fstab is

# Device Mountpoint FStype Options Dump Pass#
/dev/gpt/Sea1-08 none swap sw 0 0
/dev/gpt/Sea1-18 / ufs rw 1 1
#/dev/gpt/Sea1-06 /home ufs rw 1 1

Now I see from the emailing lists that etcupdate is replacing mergemaster, but UPDATING file still says to use mergemaster without mentioning etcupdate.

Developers, please update!

There are differences between NetBSD's etcupdate and FreeBSD's etcupdate. I don't want to do the wrong thing in FreeBSD.

Tom
Juraj Lutter
2021-06-07 06:10:22 UTC
Permalink
Post by Thomas Mueller
I updated a FreeBSD-current to the newest FreeBSD-current/14, buildworld took 11:15 (hours:minutes), buildkernel was also successful, I even appeared to be successful with "dhclient re0".
UPDATING file says to boot single-user after buildkernel and installkernel, but then mount -u / or mount -uw / does not work as it did in previous times.
Results were
mount -uw / or mount -u / produces
fstab: /etc/fstab:2: Inappropriate file type or format
fstab: /etc/fstab:2: Inappropriate file type or format
Bacause swap entry is in inapropriate format.

The line should read:

/dev/gpt/Sea1-18 none swap sw 0 0

otis


Juraj Lutter
***@FreeBSD.org
Graham Perrin
2021-06-07 06:49:57 UTC
Permalink
Post by Juraj Lutter
Bacause swap entry is in inapropriate format.
/dev/gpt/Sea1-18 none swap sw 0 0
Very well spotted, Juraj, but maybe a typo in your correction.

A clearer view of the original <https://bsd.to/De4n/raw> where the
device given to swap is:

/dev/gpt/Sea1-08
Chris
2021-06-07 15:17:53 UTC
Permalink
Post by Graham Perrin
Post by Juraj Lutter
Bacause swap entry is in inapropriate format.
/dev/gpt/Sea1-18 none swap sw 0 0
Very well spotted, Juraj, but maybe a typo in your correction.
A clearer view of the original <https://bsd.to/De4n/raw> where the device
/dev/gpt/Sea1-08
In both cases, the entry is INcorrect. Juraj is correct. The swap entry is
missing sw
IOW the line MUST read as:

/dev/gpt/Sea1-18 none swap sw 0 0

or

/dev/gpt/Sea1-18 none swap sw,trimonce 0 0

as appropriate for the media referenced.

--Chris
Thomas Mueller
2021-06-07 22:11:09 UTC
Permalink
Post by Chris
In both cases, the entry is INcorrect. Juraj is correct. The swap entry is
missing sw
/dev/gpt/Sea1-18 none swap sw 0 0
or
/dev/gpt/Sea1-18 none swap sw,trimonce 0 0
as appropriate for the media referenced.
-Chris
As my last message stated, I found the missing field in /etc/fstab and corrected it.

Then "mount -u /" worked smoothly.

Perhaps one field too few makes the system look to the next line, so the whole /etc/fstab is misinterpreted.

I also pointed out that, from previous messages on this list, that etcupdate was replacing mergemaster.

But UPDATING at the top of the src tree still specifies mergemaster, so that would need to be updated.

There needs to be better documentation on the newer etcupdate.

Parameters for etcupdate are somewhat different in FreeBSD than in NetBSD, so the documentation needs to be updated.

I don't want to mess up by doing the wrong thing in NetBSD or FreeBSD.

Tom

Loading...