You are not logged in.
Hello,
my Arch Linux was running when suddenly evreything froze. I could do nothing (tried closing running applications, change into tty2 etc), so i pushed the restart button of my PC.
Then i got the message missing OS. I booted a live arch and started by trying to repair the disk with fsck /dev/sdb1:
root@kubuntu:/home/kubuntu# fsck /dev/sdb1
fsck from util-linux 2.36
e2fsck 1.45.6 (20-Mar-2020)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
Journal version not supported by this e2fsck.
Abort<y>? yes
/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: ********** WARNING: Filesystem still has errors **********Also lsblk -f lists sdb1 but it has no FS type, Label or UUID.
root@kubuntu:/home/kubuntu# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0 squashfs 4.0 0 100% /rofs
sda
└─sda1 ext4 1.0 Stroage 11555584-d17b-49ca-91bb-f616983d8716
sdb
├─sdb1
└─sdb2 swap 1 swap b773ec51-c35f-41b8-b63a-558f106f69e1 [SWAP]
sdc ext4 1.0 4adf0485-eac9-44d7-bd75-dabea46a1c71
└─sdc1 ext4 1.0 Music b45f5a42-d7c0-4c5a-8ce4-496b6ee995a5
sdd
└─sdd1 ext4 1.0 Film Storage 1 027fa5ba-806a-44c1-b05c-7db9941660b7
sde
└─sde1 ext4 1.0 hdd2_JBOD1 6b449f4c-435c-40ec-b08c-fc250ff4c12c
sdf
└─sdf1 ext4 1.0 JBOD1_HDD3 f9d05785-7911-4d0a-98d2-f4fd5c2cb44c
sdg
└─sdg1 ext4 1.0 JBOD1_HDD4 1b11c8d0-6827-450e-9908-c854f0f60f25 1.8T 80% /media/kubuntu/JBOD1_HDD4
sr0
sr1 iso9660 Joliet Extension Kubuntu 20.10 amd64 2020-10-22-14-48-03-00 0 100% /cdromIs there a way to repair this without having to reinstall the system?
Thanks
Last edited by dzld (2020-11-14 21:25:25)
Offline
What is your partition layout? Is /boot mounted on /dev/sdb1? UEFI or MBR?
Offline
As far as i remember (i installed the system years ago) /boot is on /dev/sdb1 and it should be MBR (not realy sure about this)
Offline
OK, i now run a kubuntu live system, so i could post the output of my console.
Offline
Please first check https://wiki.archlinux.org/index.php?title=SMART
Froze + damaged superblock + many disk errors doesn't inspire much confidence…
Online
I did a short test. There were no errors.Should i do the long one?
root@kubuntu:/home/kubuntu# smartctl -a /dev/sdb1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.8.0-25-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Samsung based SSDs
Device Model: Samsung SSD 850 EVO 250GB
Serial Number: S3R0NF0J800422K
LU WWN Device Id: 5 002538 d422272cc
Firmware Version: EMT03B6Q
User Capacity: 250,059,350,016 bytes [250 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Sat Nov 14 22:32:53 2020 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 133) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 097 097 000 Old_age Always - 11412
12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 1438
177 Wear_Leveling_Count 0x0013 097 097 000 Pre-fail Always - 43
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 099 010 Pre-fail Always - 0
187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 072 043 000 Old_age Always - 28
195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0
199 CRC_Error_Count 0x003e 099 099 000 Old_age Always - 202
235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 30
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 22525875243
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 11412 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
255 0 65535 Read_scanning was never started
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.Offline
Disk looks ok, try to select one of the backup superblocks, https://wiki.archlinux.org/index.php/Fi … ery#e2fsck
Do you mount the partition w/ te "discard" option?
https://wiki.archlinux.org/index.php/So … drive#TRIM - see the red warning.
Online
I tried all superblocks:
mke2fs -n /dev/sdb1
mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 52428800 4k blocks and 13107200 inodes
Filesystem UUID: c5b6accd-1cd0-4043-a87b-0a85704da2ba
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872It's always the same message:
e2fsck -b 7962624 /dev/sdb1
e2fsck 1.45.6 (20-Mar-2020)
Journal version not supported by this e2fsck.
Abort<y>? yes
/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: ********** WARNING: Filesystem still has errors **********I don't use the discard option
Last edited by dzld (2020-11-14 23:45:51)
Offline
You can try whether testdisk can restore the partition, but the journal seems lost - which is bad.
https://wiki.archlinux.org/index.php/File_recovery
Online
The strange thing is, testdisk can find the partitions without any problem but dosen't seem to be able to restore the journal. Is there a way to do this?
Getting the files back is not the problem. I just don't want to reinstall the operating system, that i tuned over a time of 3 years.
Here's a (probabaly naive and wrong) idea:
If i make an image with dd from sdb1, then reformate sdb and dump the image back on the disk, could the os work again?
Last edited by dzld (2020-11-15 18:20:49)
Offline
maybe this could give a hint? It's the output of debugfs stats
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 02070b94-dd57-418e-b4b2-8012ad823ad9
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: not clean with errors
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 13107200
Block count: 52428800
Reserved block count: 2621440
Free blocks: 51328874
Free inodes: 13107189
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1011
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Wed Oct 11 15:25:25 2017
Last mount time: n/a
Last write time: Sun Nov 15 00:09:17 2020
Mount count: 0
Maximum mount count: -1
Last checked: Wed Oct 11 15:25:25 2017
Check interval: 0 (<none>)
Lifetime writes: 1028 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 32
Desired extra isize: 32
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: f39feb4f-30ec-48f5-890d-626a20046567
Journal backup: inode blocks
Directories: 2
Group 0: block bitmap at 1025, inode bitmap at 1041, inode table at 1057
23513 free blocks, 8181 free inodes, 2 used directories, 0 unused inodes
[Checksum 0x9db3]
Group 1: block bitmap at 1026, inode bitmap at 1042, inode table at 1569
31743 free blocks, 8192 free inodes, 0 used directories, 0 unused inodes
[Checksum 0x6e90]
Group 2: block bitmap at 1027, inode bitmap at 1043, inode table at 2081
32768 free blocks, 8192 free inodes, 0 used directories, 0 unused inodes
[Checksum 0xbdb5]
Group 3: block bitmap at 1028, inode bitmap at 1044, inode table at 2593
31743 free blocks, 8192 free inodes, 0 used directories, 0 unused inodes
[Checksum 0x184e]
Group 4: block bitmap at 1029, inode bitmap at 1045, inode table at 3105
32768 free blocks, 8192 free inodes, 0 used directories, 0 unused inodesalso logdump finishes with those lines:
Found expected sequence 8094273, type 2 (commit block) at block 22849
Found expected sequence 8094274, type 1 (descriptor block) at block 22850
Found expected sequence 8094274, type 2 (commit block) at block 22864
Found expected sequence 8094275, type 1 (descriptor block) at block 22865
Found expected sequence 8094275, type 2 (commit block) at block 22880
Found expected sequence 8094276, type 2817 (unrecognised type) at block 22881
Unexpected block type 2817 at block 22881.Last edited by dzld (2020-11-15 19:55:16)
Offline
If i make an image with dd from sdb1, then reformate sdb and dump the image back on the disk, could the os work again?
No. You'd have an image of a broken filesystem and would apply that on the new parttion.
It really seems the journal is damaged.
You can have testdisk either reset it and hope for sufficient file recovery w/o it or format and re-install.
If you go for the latter, run badblocks on the partition before to ensure it's still trustworthy.
Manual approach to reset the journal (no guarantee for this to work, notably the fsck could still fail and there's no guarantee on the resulting file integrity, because there's no journal…):
tune2fs -O ^has_journal /dev/sdb1 #disable journal
fsck -Cf /dev/sdb1 # check the FS
tune2fs -j /dev/sdb1 # hopefully create a new journalOnline
Teted it. Didn't work.
I now reinstalled my system.
Offline