Linux MintThis forum is for the discussion of Linux Mint.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
$ fsck -n
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
Warning! /dev/sda5 is mounted.
fsck.ext4: Permission denied while trying to open /dev/sda5
You must have r/o access to the filesystem or be root
Did not try as root. How do I get it to only check sdb?
$ sudo fsck -n UUID=9983149b-3a05-462b-96a6-939625e6c7b6
[sudo] password for tom:
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
Superblock has an invalid journal (inode 8).
Clear? no
fsck.ext4: Illegal inode number while checking ext3 journal for /dev/sdb6
/dev/sdb6: ********** WARNING: Filesystem still has errors **********
Since you posted a reinstall I assume you have a decent backup or don't care about the date. You can try to see if running fsck for real will fix the problem but suspect it may work.
In post #9, you showed the command you tried to use to mount sdb6. You were missing a mount point so that will never work.
Quote:
When I connect the USB HDD /media/tom/6dee8358-96c7-47e2-9adc-9ad58609886f pops up in Nemo.
The output of the df -h command you posted earlier clearly shows that as sdb1. Do you have anything on sdb6, a filesystem or data of any sort.
Quote:
Did not try as root. How do I get it to only check sdb?
You need to run fsck as root, see the link below as this is very basic. You specify it in the command the same way you need to specify a mount point when trying to mount a partition. Since you failed to specify a partition/device, it tried to run on sda5 which is your root "/" filesystem partition and it failed because it was mounted.
The output of the df -h command you posted earlier clearly shows that as sdb1. Do you have anything on sdb6, a filesystem or data of any sort.
I have several hundred GB of files
Quote:
Originally Posted by yancek
You need to run fsck as root, see the link below as this is very basic. You specify it in the command the same way you need to specify a mount point when trying to mount a partition. Since you failed to specify a partition/device, it tried to run on sda5 which is your root "/" filesystem partition and it failed because it was mounted.
Ran fsck -n
$ sudo fsck -n UUID=9983149b-3a05-462b-96a6-939625e6c7b6
[sudo] password for tom:
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
Superblock has an invalid journal (inode 8).
Clear? no
fsck.ext4: Illegal inode number while checking ext3 journal for /dev/sdb6
/dev/sdb6: ********** WARNING: Filesystem still has errors **********
$ sudo umount /dev/sdb
umount: /dev/sdb: not mounted
~ $ sudo fsck /dev/sdb
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/sdb is in use.
e2fsck: Cannot continue, aborting.
How is sdb in use if it is unmounted?
$ sudo umount /dev/sdb1
tom@tom-Inspiron-1520120 ~ $ sudo fsck /dev/sdb1
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/sdb1 has unsupported feature(s): metadata_csum
e2fsck: Get a newer version of e2fsck!
~ $ sudo apt-get install e2fsck
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package e2fsck
$ sudo apt-get install e2fsck
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package e2fsck
According to some information I found e2fsck did not support metadata checksums until version 1.43. The simplest might be to boot from a live Mint 20 and try again.
mint@mint:~$ umount /dev/sdb
umount: /dev/sdb: not mounted.
mint@mint:~$
mint@mint:~$ sudo fsck -n /dev/sdb
fsck from util-linux 2.34
e2fsck 1.45.5 (07-Jan-2020)
Warning! /dev/sdb is in use.
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.