Running fsck with encrypted drive [SOLVED]

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jhanarato
Level 2
Level 2
Posts: 88
Joined: Tue Nov 24, 2015 8:43 pm

Running fsck with encrypted drive [SOLVED]

Post by jhanarato »

G'day,

I'm running LM 19.3 and I'd like to run a file system check. During installation I went with the fully encrypted root partition and I'm not sure how to run fsck in this situation.

Any help is appreciated.

J.R.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Running fsck with encrypted drive

Post by mikeflan »

jhanarato
Level 2
Level 2
Posts: 88
Joined: Tue Nov 24, 2015 8:43 pm

Re: Running fsck with encrypted drive

Post by jhanarato »

Thanks Mike!

I put a 20.3 ISO on a USB stick, logged in and muddled my way through:

Code: Select all

mint@mint:~$ sudo su
]root@mint:/home/mint# cryptsetup luksOpen /dev/sda3
Command requires device and mapped name as arguments.
root@mint:/home/mint# cryptsetup luksOpen /dev/sda3 maindisk
Enter passphrase for /dev/sda3: 
root@mint:/home/mint# vgchange -aly
  2 logical volume(s) in volume group "mint-vg" now active
root@mint:/home/mint# ls /dev/mapper
control  maindisk  mint--vg-root  mint--vg-swap_1
root@mint:/home/mint# fsck.ext4 -nf /dev/mapper/mint--vg-root 
e2fsck 1.45.5 (07-Jan-2020)
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
/dev/mapper/mint--vg-root: 1186810/30384128 files (1.2% non-contiguous), 29989453/121525248 blocks
The fsck check was pretty quick, I have a 500GB SSD. Looks pretty good eh?
Locked

Return to “Other topics”