Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Aug 2020 10:05:55 +0000
From:      "Thomas Mueller" <mueller6722@twc.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: UFS alternate super block error
References:  <CAKAYmM%2B%2Bs_uiXTZhZi%2BXBy1MFJHppYRkfAq1GRAF-o=4mb%2BM7Q@mail.gmail.com>

| previous in thread | raw e-mail | index | archive | help
First, I think I may have sent a message about possible bugs with FreeBSD lists, due to sloppiness with my fingers and not being sufficiently watchful.

Now for the main message:

> Recently, I enlarged the file used to back a FreeBSD 12.1-RELEASE-p7
> virtual machine and thought I did all of the normal steps to grow the
> file system. Something must not have gone quite right as the boot
> stops with:
...     
> Trying to mount root from ufs:/dev/gpt/rootfs [rw]...
> Setting hostuuid: 5defeee9-d2e2-46e2-b2bb-203dd6e46f1f.
> Setting hostid: 0x4a7a75f3.
> Starting file system checks:
> Warning! Some of the devices might not be available; retrying 
> Waiting 30s for the root mount holders: usbus3 usbus2 usbus1
> usbus0uhub1: 2 ports with 2 removable, self powered
> uhub2: 2 ports with 2 removable, self powered
> uhub3: 2 ports with 2 removable, self powered
> ..uhub0: 6 ports with 6 removable, self powered
> Restarting file system checks:
> Unknown error 3; help!
> ERROR: ABORTING BOOT (sending SIGTERM to parent)!
> 2020-08-22T13:32:36.786266+00:00  init 1 - - /bin/sh on /etc/rc
> terminated abnormally, going to single user mode
> Enter full pathname of shell or RETURN for /bin/sh:

> entering the shell and then immediately exiting allows the boot to
> continue successfully. Running fsck from shell indicates there is an  
> error with the alternate super block:
        
> # fsck_ffs -d /dev/gpt/rootfs
> ** /dev/gpt/rootfs
> SUPER BLOCK VS ALTERNATE MISMATCH fs_sblkno: 24 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_cblkno: 32 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_iblkno: 40 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_dblkno: 5056 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_ncg: 162 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_bsize: 32768 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_fsize: 4096 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_frag: 8 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_bmask: 0xffffffffffff8000 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_fmask: 0xfffffffffffff000 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_bshift: 15 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_fshift: 12 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_fragshift: 3 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_fsbtodb: 3 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_sbsize: 4096 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_nindir: 4096 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_inopb: 128 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_cssize: 4096 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_ipg: 80256 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_fpg: 160280 vs 0
> SUPER BLOCK VS ALTERNATE MISMATCH fs_magic: 0x19540119 vs 0
VALUES IN SUPER BLOCK LSB=128 DISAGREE WITH THOSE IN
LAST ALTERNATE LSB=206440832
        
> IGNORE ALTERNATE SUPER BLOCK? [yn]

> I've tried running fsck a few times, but this issue persists. Is there
> any way to fix this?

>-chuck

I get abnormal endings where FreeBSD crashes and leaves file systems not cleanly dismounted.

I have generally not been able to fix with FreeBSD fsck_ffs.  If I run "fsck_ffs -y", I may lose data; that has happened at least once.

What works for me is booting into NetBSD and running that fsck_ffs.  But I realize, or assume, that most FreeBSD users do not also have NetBSD installed.

Tom




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?>