Recovering with fsck

Tried this, but do not know about kali Live?

zorin@zorin:~$ root@zorin
root@zorin: command not found
zorin@zorin:~$ root
Command 'root' not found, but can be installed with:
sudo snap install root-framework
zorin@zorin:~$ sudo snap install root-framework
2025-05-28T00:54:40Z INFO Waiting for automatic snapd restart...
root-framework v6-34-02 from James Carroll✪ installed
zorin@zorin:~$ root@zorin
root@zorin: command not found
zorin@zorin:~$ root

| Welcome to ROOT 6.34.02 https://root.cern |
| (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Dec 28 2024, 08:39:22 |
| From tags/v6-34-02@v6-34-02 |
| With c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 |

Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'

root [0] e2fsck -b 8193
ROOT_prompt_0:1:10: error: expected ';' after expression
e2fsck -b 8193
^
;
root [1] e2fsck -b 32768
ROOT_prompt_1:1:10: error: expected ';' after expression
e2fsck -b 32768
^
;
root [2] e2fsck -b '32768'
ROOT_prompt_2:1:10: error: expected ';' after expression
e2fsck -b '32768'
^
;
ROOT_prompt_2:1:11: warning: multi-character character constant [-Wmultichar]
e2fsck -b '32768'
^
ROOT_prompt_2:1:11: warning: character constant too long for its type
root [3] e2fsck -y /dev/sdaX
IncrementalExecutor::executeFunction: symbol '_ZN5cling7runtime8internal9EvaluateTIvEET_PNS1_15DynamicExprInfoEPN5clang11DeclContextE' unresolved while linking [cling interface function]!
You are probably missing the definition of void cling::runtime::internal::EvaluateT(cling::runtime::internal::DynamicExprInfo*, clang::DeclContext*)
Maybe you need to load the corresponding shared library?
root [4] e2fsck -y /dev/sda
cling JIT session error: Failed to materialize symbols: { (main, { _ZN5cling7runtime8internal15DynamicExprInfoC1EPKcPPvb }) }
root [5]

You really need to use Kali live version to attempt this. Do you have access to another machine to download Kali?

Yes, but I have to go shopping to buy a usb drive yet. I am used to doing bootable USB drives. I'll come back when I have it done. Thank you.

OK, bought another USB drive yesterday and I have put Kali Live on it and tested that it boots up.

1 Like

I have Kali Live running on the errant tower at present. Unfortunately, it wants a user and a password. I have entered 'root' and 'toor' as per the suggestions for the archive file, but it doesn't recognise the PW?

OK, I restarted and got to be a live user (no user/PW?) again. I tried fsck but might have to find out 'extX?' as /dev/sda did not work. Tried e2fsck -b with both numbers suggested separately with no success. I could send the root terminal text across to here? Out of my depth somewhat.

I have activated Firefox within Kali Live and logged in. I will try and copy paste what I end up with.
(root㉿kali)-[~]
└─# sudo fsck -f /dev/sdaX
fsck from util-linux 2.40.4
e2fsck 1.47.2 (1-Jan-2025)
fsck.ext2: No such file or directory while trying to open /dev/sdaX
Possibly non-existent device?

┌──(root㉿kali)-[~]
└─#

Firstly, sdaX will bring back nothing as the X is just a place marker where you replace the X with the number of the partition, and this should be sda1 if it is the root partition of the drive. When you enter the user name of root you don't include the single quote marks either side, the same for the password. If you are unsure how the problem is afffecting your drive, i.e., which partition label you should be entering, run GParted within Kali and if possible take a screenshot and post back.

Update. Kali has changed user and password to kali for both user and password;
user: kali
password: kali

Will update tutorial to reflect this change.

[@moderators I got my wires crossed yesterday thinking this was a General Help thread and it is the Tutorial thread I posted. I wanted to add at the bottom of the first post "As of 2025, Kali Linux Live now uses kali as user and password." Can @Lucidoobe's and my posts on helping them be split from here to their original thread on this problem they are having? Thanks.]

Thank you, I am doing more work on this today and will report back.

──(root㉿kali)-[~]
└─# fsck -f /dev/sda1
fsck from util-linux 2.40.4
e2fsck 1.47.2 (1-Jan-2025)
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/sda1

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
or
e2fsck -b 32768

┌──(root㉿kali)-[~]
└─# e2fsck -b 8193 /dev/sda1
e2fsck 1.47.2 (1-Jan-2025)
e2fsck: Invalid argument while trying to open /dev/sda1

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
or
e2fsck -b 32768

┌──(root㉿kali)-[~]
└─# e2fsck -b 32768 /dev/sda1
e2fsck 1.47.2 (1-Jan-2025)
e2fsck: Invalid argument while trying to open /dev/sda1

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
or
e2fsck -b 32768

┌──(root㉿kali)-[~]
└─#

I have logged into Kali with Persistence. If wrong please let me know?

My method used a DVD. I never tried with say Ventoy. There is no need for persistence, all that is needed is Kali in live mode. However the fact that you have a superblock issue might indicate potential hardware failure, but I need to check and post back.

Invalid Superblock Indication

An "invalid superblock" error when running e2fsck can indicate a failing hard drive, but it does not necessarily mean that the drive is failing. The error could be due to corruption of the superblock, which is a critical part of the file system that contains important metadata about the file system itself. If the superblock is corrupt, it can prevent the file system from being properly read or written to.

However, if the superblock corruption is consistent and cannot be resolved by using backup superblocks, it might suggest underlying hardware issues with the drive. Backup superblocks can be used to recover from superblock corruption, as shown in the following example:

sudo e2fsck -b 32768 /dev/sda1

If the drive continues to show errors even after attempting to use backup superblocks, it may be indicative of a failing drive.23

It is advisable to back up any important data from the drive as soon as possible and consider running additional diagnostics to assess the health of the drive. Tools like smartctl from the smartmontools package can provide detailed information about the drive's health status.23

AI-generated answer. Please verify critical facts.

can’t read superblock linux

ssd partition alignment in gparted

parted alignment check


🌐
linuxexpresso.wordpress.com
HOWTO: Repair a broken Ext4 Superblock in Ubuntu | Linux Expresso

🌐
askubuntu.com
Fixing bad superblock on SSD drive: Is e2fsck safe to run? - Ask Ubuntu

🌐
linuxbabe.com
How to Fix "can't read superblock"

That should be 'sda1' if that is the correct drive/partition label. Did you check with GPsrted? I have learned something myself today, I did not know that you can create a backup of a working superblock!

I can confirm that the SSD that is sda is relatively new and purchased installed from the local PC repair shop here in the town where I live. Currently trying to copy GParted readout of sda here in the chat.

I don't know if it is pertinent to your issue but did you setup TRIM for your SSD?

I do not know TRIM sorry.

No luck with getting a copy of GParted into the chat. Anyway, I have /dev/sda1 - grub core.img (boot, grub)
/dev/sda2 - EFI System Partition, boot, esp
/dev/sda3 ext4
unallocated 1.02MB

I will read what you have put in above and try to action, be back when I have news.

https://www.baeldung.com/linux/trim-ssd