Solved dirty drive being left dirty how to fix that?

I was doing incremental upgrades so I would not have issues going from 13.1 13.2 When I got it to only RC2 the system rebooted by itself and I ended ip with dirty drive, go figure.

I ran fsck and got this and bottom it is kept marked dirty this ** /dev/nvd0p2 (NO WRITE) is the EFI partition ..

what damage control is needed to fix this? because now it is no longer allowing anything to be written to drives no more upgrades etc.

Code:
userx@FreeBeSD:~$ sudo freebsd-update -r 13.2-RC3 upgrade
userx@FreeBeSD:~$ sudo fsck
** /dev/nvd0p5 (NO WRITE)
** SU+J Recovering /dev/nvd0p5

USE JOURNAL? no

** Skipping journal, falling through to full fsck

** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
DIRECTORY CORRUPTED  I=11858972  OWNER=root MODE=40700
SIZE=1024 MTIME=Apr  3 07:42 2023 
DIR=/var/db/freebsd-update

UNEXPECTED SOFT UPDATE INCONSISTENCY

SALVAGE? no

** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE  I=12019252  OWNER=root MODE=100644
SIZE=720 MTIME=Apr  3 07:47 2023 

RECONNECT? no


CLEAR? no

UNREF FILE I=12019324  OWNER=lightdm MODE=100600
SIZE=2 MTIME=Apr  3 07:46 2023 

CLEAR? no

UNREF FILE I=12019326  OWNER=lightdm MODE=140777
SIZE=0 MTIME=Apr  3 07:46 2023 

CLEAR? no

** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? no

SUMMARY INFORMATION BAD
SALVAGE? no

BLK(S) MISSING IN BIT MAPS
SALVAGE? no

681644 files, 6798197 used, 22142202 free (62394 frags, 2759976 blocks, 0.2% fragmentation)
** /dev/nvd0p2 (NO WRITE)
** Phase 1 - Read FAT and checking connectivity
** Phase 2 - Checking Directories
** Phase 3 - Checking for Lost Files
442 files, 44 MiB free (45301 clusters)
MARK FILE SYSTEM CLEAN? no

***** FILE SYSTEM IS LEFT MARKED AS DIRTY *****

[
 
fsck(8) cannot fix certain issues if the filesystem is mounted read/write. Boot to single user mode and run fsck(8) there.
yeah my slackware linux syslog says
Code:
$ sudo cat /var/log/syslog | grep fsck
Feb 21 06:38:22 slack-curr kernel: FAT-fs (nvme0n1p2): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Mar 27 10:20:45 slack-curr kernel: FAT-fs (nvme0n1p2): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Mar 28 08:58:12 slack-curr kernel: FAT-fs (nvme0n1p2): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Mar 28 15:42:05 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 29 06:07:03 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 30 06:39:31 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 30 08:15:26 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 30 08:46:33 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 30 08:55:21 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 30 09:10:55 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Mar 30 10:50:38 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
Apr  3 08:05:02 slack-curr kernel: EXT4-fs (nvme0n1p12): warning: mounting unchecked fs, running e2fsck is recommended
booting into single user mood and do that
 
fsck(8) cannot fix certain issues if the filesystem is mounted read/write. Boot to single user mode and run fsck(8) there.
didn't work, it did the thing said mared clean then rebooted then get dirty drive again.

Recovering /dev/nvd0p5 I don't know what one that is off the top of my head but it is #5 now ?I was just doing a simple upgrade ... :rolleyes:

back to single user mode



Code:
$ sudo fsck

** /dev/nvd0p5 (NO WRITE)
** SU+J Recovering /dev/nvd0p5

USE JOURNAL? no

** Skipping journal, falling through to full fsck

** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
INCORRECT BLOCK COUNT I=11886651 (80 should be 72)
CORRECT? no

** Phase 2 - Check Pathnames
DIRECTORY CORRUPTED  I=11858972  OWNER=root MODE=40700
SIZE=1024 MTIME=Apr  3 07:42 2023
DIR=/var/db/freebsd-update

UNEXPECTED SOFT UPDATE INCONSISTENCY

SALVAGE? no

** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE  I=5773591  OWNER=userx MODE=100644
SIZE=0 MTIME=Apr  3 08:19 2023

RECONNECT? no


CLEAR? no

UNREF FILE I=5853118  OWNER=userx MODE=100600
SIZE=4 MTIME=Apr  3 08:19 2023

CLEAR? no

UNREF FILE I=12019313  OWNER=lightdm MODE=100600
SIZE=2 MTIME=Apr  3 08:19 2023

CLEAR? no

UNREF FILE I=12019315  OWNER=lightdm MODE=140777
SIZE=0 MTIME=Apr  3 08:19 2023

CLEAR? no

** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? no

SUMMARY INFORMATION BAD
SALVAGE? no

BLK(S) MISSING IN BIT MAPS
SALVAGE? no

681675 files, 6798357 used, 22142038 free (62470 frags, 2759946 blocks, 0.2% fragmentation)
** /dev/nvd0p2 (NO WRITE)
** Phase 1 - Read FAT and checking connectivity
** Phase 2 - Checking Directories
** Phase 3 - Checking for Lost Files
442 files, 44 MiB free (45301 clusters)
MARK FILE SYSTEM CLEAN? no

***** FILE SYSTEM IS LEFT MARKED AS DIRTY *****
 
OKAY p5 is the entire FreeBSD OS Partition. it got totally hosed. F'in upgrades

I don't think Linux fsck can fix uts or whatever format it is called, and how to not mount the enter system then run fsck for fbsd when it is all installed on the same partition?

Code:
userx@slack-curr.org:~
$ sudo fsck /dev/nvme0n1p5
fsck from util-linux 2.38.1
e2fsck 1.47.0 (5-Feb-2023)
Superblock has an invalid journal (inode 8).
Clear<y>? yes
*** journal has been deleted ***

Superblock has_journal flag is clear, but a journal is present.
Clear<y>? yes
The filesystem size (according to the superblock) is 30976000 blocks
The physical size of the device is 29884416 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

/dev/nvme0n1p5: ***** FILE SYSTEM WAS MODIFIED *****
 
Recovering /dev/nvd0p5 I don't know what one that is off the top of my head but it is #5 now ?
Depends on your installation. I assume you have another partition with some other OS on it? With only FreeBSD and a CSM boot p1 is freebsd-boot, then p2 swap and p3 is the OS. If you only opted for EFI boot p1 is the efi partition. If you have both EFI and CSM boot everything would shift a number, p1 is efi, p2 freebsd-boot, p3 swap and p4 the OS. So if you have FreeBSD on p5 I assume you have another partition with some other OS on it on p4.

I was doing incremental upgrades so I would not have issues going from 13.1 13.2

F'in upgrades
Doing the incremental upgrades was a bad idea to begin with. There's a reason why there's a RC4, RC5 and even an RC6. It's because the previous release candidates had issues.
 
Doing the incremental upgrades was a bad idea to begin with. There's a reason why there's a RC4, RC5 and even an RC6. It's because the previous release candidates had issues.
the last time I did a complete jump from 12.x to 13 it totally crapped out the system and I had to reinstall it from scratch now I try doing it in steps and it totally craps out the system looks like it does not matter either way., and it is said that FreeBSD is better because it is a complete OS .. haha
 
the last time I did a complete jump from 12.x to 13 it totally crapped out the system
You must be doing something wrong. I've upgraded dozens of systems from 12.x to 13.x without any issue.
 
You must be doing something wrong. I've upgraded dozens of systems from 12.x to 13.x without any issue.
it was a big jump because I had not upgraded since covid because I could not get to the net to do so and when I could they had upgrade a few times from wherever I left off at on 12.x something missing a few increments and I already knew something was going to go wrong because it was missing a few upgrades so that is why I decied to slowly move it up the line one upgraded at a time and it was the sudden reboot by itself that did it not the actual upgrading RC1 to RC6 that I believe was caused by e16 and not the actually upgrading process ..

it is the inability to fix the partition that has the entire system on it that is holding me up, as I am on it right now writing this. I even installed rsync and backed up my home dir before posting this.

perpahs booting a usb stick and using that system to run fsck might work


edit
1 of 3
FreeBSD system recovery
Code:
2. Using the "Fixit" CD
An alternative approach to repairing systems is to run from the Fixit or Live Filesystem CD, which is disc 2 in the boxed
set. This is a complete installed FreeBSD system in its own right

 
it was a big jump because I had not upgraded since covid because I could not get to the net to do so and when I could they had upgrade a few times from wherever I left off at on 12.x something missing a few increments
You don't need to install any of the intermediate versions. I would actually advise against that. Mainly because 13.0 is older than 12.3 for example. You can jump directly from 12.x to 13.1 (or 13.2). Heck, you can jump from 10.x or 11.x to 13.1 if you want.
 
You don't need to install any of the intermediate versions. I would actually advise against that. Mainly because 13.0 is older than 12.3 for example. You can jump directly from 12.x to 13.1 (or 13.2). Heck, you can jump from 10.x or 11.x to 13.1 if you want.
well that did not work so you're wrong and I followed the instructions and I might even have a post on it too somewhere in here to substaiate it; then a blow off steam too post to as a result of what happened.
 
On boot go to single user mode then perform "fsck /".
run freebsd-upgrade two times.
What is the output of "freebsd-version -kru"
 
On boot go to single user mode then perform "fsck /".
run freebsd-upgrade two times.
What is the output of "freebsd-version -kru"
yeah, I booted into my other fbsd fsck fixed it, but that script freebsd-upgrade got screwed up and it was empty so I copied over the one from the other system ran it it rebooted the system crapped the partition again , fix it, and it just kept getting dirty and I just gave up trying to fix it again and again so I reinstalled it. just got finished
 
I have literally done hundreds of minor and major version upgrades with freebsd-update(8) since it was introduced. Sure, I'm the one that's wrong.
not saying you're wrong just lucky, I even seen another post or more then one on the same thing that happened to me. it slipped a gear and the patches or something got screwed up and it could no longer continue or some such thing like that it was a long while back I don't remember all of the particulars.
 
Back
Top