Fsck output does not match tutorials...
Keith
keith at caramail.com
Thu Apr 21 03:05:02 UTC 2022
On 3/22/22 3:21 PM, Bo Berglund wrote:
> I have an erroneous disk (it ran out of disk space during a sudo apt
> full-upgrade operation and Linux crashed).
> Linux won't boot now.
>
> I can put it into a USB carrier and examine it on another system:
>
> sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL
> UUID NAME FSTYPE SIZE MOUNTPOINT LABEL
> MODEL
> sda 7.4G
> UHSII_uSD_Reader
> 1591-0E10 +-sda1 vfat 256M
> c14f2d5f-b499-41df-b7ce-15bdf933cdff +-sda2 ext4 7.2G <== repair?
>
> It turned out that free space on sda2 is zero, that is why Linux crashed, I
> guess.
> But now I have freed up 40% by deleting a few very big files in the home dir.
> But there is more to do because Linux will not boot anyway.
>
> So I figured I could do as several on-line tutorials suggest:
>
> sudo fsck -N /dev/sda2
> fsck from util-linux 2.33.1
> [/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 /dev/sda2
>
> This response is not shown in any of the tutorials I found....
>
> What am I doing wrong?
> Can the disk be repaired?
-N is not going to anything and the output is exactly what you would
expect. If you want a non-destructive check then try:
sudo fsck.ext4 -n -v -f /dev/sda2
This performs a forced, verbose, read-only filesystem check.
this is what it looks like for my USB drive /dev/sdf1
sudo fsck.ext4 -n -v -f /dev/sdf1
e2fsck 1.45.5 (07-Jan-2020)
Warning! /dev/sdf1 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem
check.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
23532 inodes used (0.19%, out of 12189696)
779 non-contiguous files (3.3%)
19 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 23271/184
13375930 blocks used (27.44%, out of 48740328)
0 bad blocks
1 large file
20841 regular files
2613 directories
0 character device files
0 block device files
0 fifos
0 links
69 symbolic links (69 fast symbolic links)
0 sockets
------------
23523 files
If it finds problems, unmount the drive and rerun without the "-n"
option and with the "-p" option to autofix any filesystem errors that
doesn't require human intervention.
sudo fsck.ext4 -v -f -p /dev/sda2
--
Keith
More information about the ubuntu-users
mailing list