error: unknown filesystem on Leap 42.3 / winwos 7 dual boot system

Dear all,

after accidental power off when copying a file on a usb drive I started getting the error

error: unknown filesystem.  
grub rescue>

I checked with ls and got that (hd0,msdos6)is ext2. All other options yielded Filesystem is unknown. I have only one physical HDD on the computer.
The output of parted (executed while everything was running fine) is:

sudo parted -l
Model: ATA ST320LT007-9ZV14 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  106MB  105MB   primary   ntfs            boot, type=07
 2      106MB   126GB  126GB   primary   ntfs            type=07
 3      126GB   320GB  194GB   extended                  lba, type=0f
 5      126GB   174GB  48.3GB  logical   ext4            type=83
 6      174GB   314GB  140GB   logical   ext4            type=83
 7      314GB   320GB  6225MB  logical   linux-swap(v1)  type=82

Since I can no fix this issue by myself, I decided to ask the experts here.

I would appreciate your help.
Thank you in advance

It’s hard to know what the problem is, with so little information.

I would suggest booting from CD/DVD or USB, and running “fsck” on all file systems.


fsck /dev/sda5
fsck /dev/sda6

For the NTFS file systems, it is best to allow Windows to fix that.

First of all, I would like to thank you for your reply.
Unfortunately, I have no live USB or CD to boot from. I will get one tomorrow.

In the meantime, I am not sure whether this will help, but I had unknown file system error before and the solution can be found here: https://forums.opensuse.org/showthread.php/534675-GRUB-problem-after-updating-to-Leap-42-3-(dual-boot-system)?highlight=john_snow

Please stay tuned :wink:

Just to add some thoughts.

When it is already Grub that complains, I would suggest it is the root file system (probably sda5 guessing from the size) is the culprit.

I wonder how an unexpected power down can damage a file system in such a way that it is unrecognisable as an ext2/3/4 file system (or any other) The very first block(s) must have been overwritten…

BTW, you realy have no CD/DVD/USBstick to boot from. Where then did you install from?

Thank you for your reply.
I don’t have the live USB with me. I will be back home on Saturday and will use the live USB from Leap 42.3, I used for fixing grub last time.
The current grub problem is really strange indeed. I was copying to a usb, then the system shut down and all hell broke loose.

Here is what i did
From the boot options of the USB i chose Other “Rescue system”
Then as root I run I run the following two commands


fsck /dev/sda5
#the outut is
e2fsck 1.42.11 (09-Jul-2014)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda5
Could this be a zero-lenght partition?

On the contrary lsblk says that /dev/sda5 is 45G in size.

Subsequently for sda6


fsck /dev/sda6
e2fsck 1.42.11 (09-Jul-2014)
/dev/sda6: clan, 125582/8519680 files, 31147946/34077696 blocks

As feared. The file system on /devsda5 is completely broken.

Reading the error message I would even say that there is something rotten on the disk itself. Because it says that it can not read a (low level) block at all (let alone that the contents is wrong). And that is something more in ine with an unexpected power down then just overwriting.

To confirm, you could try a disk check program from the rescue system

smartctl -a /dev/sda

oe

badblocks -s /dev/sda

I am not very fluent with these, thus others may come with better/more precise advice.

/dev/sda5 is the windows partition :’(. I am also not able to mount it.
/dev/sdb6 is Leap 42.3 and that one works fine. I was able to mount it and look tat the files

The requested output is:

badblocks -s /dev/sda | less

Checking for bad blocks (read-only test): 122984460one, 19:08 elapsed. (0/0/0 errors)
122984461one, 19:13 elapsed (1/0/0 errors)
122984462one, 19:17 elapsed (2/0/0 errors)
122984463one, 19:22 elapsed (3/0/0 errors)
done

I also run smartcl -a /dev/sda the output is much larger.


smartcl -a /dev/sda
smartctl 6.2 2013-11-07 r3856 [x86_64-linux-4.4.76-1-default] (SUSE RPM)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Momentus Thin
Device Model:     ST320LT007-9ZV142
Serial Number:    W0Q54QA6
LU WWN Device Id: 5 000c50 052c57048
Firmware Version: 0005DEM1
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sun Jan  5 14:47:43 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:              (0x73) 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.
                    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:      (  62) minutes.
Conveyance self-test routine
recommended polling time:      (   3) minutes.
SCT capabilities:            (0x303f)    SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   118   097   006    Pre-fail  Always       -       179599896
  3 Spin_Up_Time            0x0003   099   098   085    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   098   098   020    Old_age   Always       -       2545
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   082   060   030    Pre-fail  Always       -       4489753184
  9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       7941
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   098   098   020    Old_age   Always       -       2537
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   020   020   000    Old_age   Always       -       80
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       48
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   066   048   045    Old_age   Always       -       34 (Min/Max 22/40)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       88
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       157
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       226886
194 Temperature_Celsius     0x0022   034   052   000    Old_age   Always       -       34 (0 12 0 0 0)
195 Hardware_ECC_Recovered  0x001a   053   038   000    Old_age   Always       -       179599896
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       8
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       8
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       7606387088679
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       298066018
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       3952008830
250 Read_Error_Retry_Rate   0x0000   100   001   000    Old_age   Offline      -       184
251 Unknown_Attribute       0x0000   100   001   000    Old_age   Offline      -       2094
252 Unknown_Attribute       0x0000   100   001   000    Old_age   Offline      -       0
254 Free_Fall_Sensor        0x0032   001   001   000    Old_age   Always       -       3

SMART Error Log Version: 1
ATA Error Count: 80 (device log contains only the most recent five errors)
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 80 occurred at disk power-on lifetime: 7940 hours (330 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 18 30 a9 0e  Error: UNC at LBA = 0x0ea93018 = 245968920

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 08 18 30 a9 4e 00      01:03:03.340  READ FPDMA QUEUED
  27 00 00 00 00 00 e0 00      01:03:03.338  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      01:03:03.336  IDENTIFY DEVICE
  ef 03 46 00 00 00 a0 00      01:03:03.291  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 e0 00      01:03:03.291  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 79 occurred at disk power-on lifetime: 7940 hours (330 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 18 30 a9 0e  Error: UNC at LBA = 0x0ea93018 = 245968920

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 08 18 30 a9 4e 00      01:02:58.579  READ FPDMA QUEUED
  27 00 00 00 00 00 e0 00      01:02:58.578  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      01:02:58.576  IDENTIFY DEVICE
  ef 03 46 00 00 00 a0 00      01:02:58.575  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 e0 00      01:02:58.531  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 78 occurred at disk power-on lifetime: 7940 hours (330 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 18 30 a9 0e  Error: UNC at LBA = 0x0ea93018 = 245968920

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 08 18 30 a9 4e 00      01:02:53.803  READ FPDMA QUEUED
  27 00 00 00 00 00 e0 00      01:02:53.801  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      01:02:53.799  IDENTIFY DEVICE
  ef 03 46 00 00 00 a0 00      01:02:53.798  SET FEATURES [Set transfer mode]
  27 00 00 00 00 00 e0 00      01:02:53.754  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 77 occurred at disk power-on lifetime: 7940 hours (330 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 18 30 a9 0e  Error: UNC at LBA = 0x0ea93018 = 245968920

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 08 18 30 a9 4e 00      01:02:49.033  READ FPDMA QUEUED
  60 00 08 10 30 a9 4e 00      01:02:49.032  READ FPDMA QUEUED
  60 00 80 28 30 a9 4e 00      01:02:49.031  READ FPDMA QUEUED
  60 00 08 08 30 a9 4e 00      01:02:49.005  READ FPDMA QUEUED
  27 00 00 00 00 00 e0 00      01:02:48.960  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 76 occurred at disk power-on lifetime: 7940 hours (330 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 00 18 30 a9 0e  Error: UNC at LBA = 0x0ea93018 = 245968920

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 20 08 30 a9 4e 00      01:02:44.237  READ FPDMA QUEUED
  60 00 08 00 30 a9 4e 00      01:02:44.216  READ FPDMA QUEUED
  27 00 00 00 00 00 e0 00      01:02:44.215  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      01:02:44.212  IDENTIFY DEVICE
  ef 03 46 00 00 00 a0 00      01:02:44.211  SET FEATURES [Set transfer mode]

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Vendor (0x50)       Fatal or unknown error        90%      7147         0
# 2  Short offline       Completed without error       00%      7147         -
# 3  Vendor (0x50)       Fatal or unknown error        90%      6877         0
# 4  Short offline       Completed without error       00%      6877         -
# 5  Vendor (0x50)       Fatal or unknown error        90%      6558         0
# 6  Short offline       Completed without error       00%      6558         -
# 7  Vendor (0x50)       Fatal or unknown error        90%      6382         0
# 8  Short offline       Completed without error       00%      6382         -
# 9  Vendor (0x50)       Fatal or unknown error        90%      6018         0
#10  Short offline       Completed without error       00%      6018         -
#11  Vendor (0x50)       Fatal or unknown error        90%      5746         0
#12  Short offline       Completed without error       00%      5746         -
#13  Short offline       Aborted by host               90%      5461         -
#14  Vendor (0x50)       Fatal or unknown error        90%      5422         0
#15  Short offline       Completed without error       00%      5422         -
#16  Vendor (0x50)       Fatal or unknown error        90%      5324         0
#17  Short offline       Completed without error       00%      5324         -
#18  Vendor (0x50)       Fatal or unknown error        90%      5267         0
#19  Short offline       Completed without error       00%      5267         -
#20  Vendor (0x50)       Fatal or unknown error        90%      5071         0
#21  Short offline       Completed without error       00%      5071         -

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
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.

Are you sure? Your earlier information said

5      126GB   174GB  48.3GB  logical   ext4            type=83

Which is definitely a Linux partition with ext4. And my earlier conclusion was that it is the / file system.

Please check what is what so that we all have the same correct information.

I am sorry, the windows partition is sda2. sda5 is the root partition of linux and sda6 is where linux home is located.
Both linux home and windows are fine. I can mount them and look at the files. The broken one is linux root - sda5
I am sorry for the mistake.

OK then. IMHO at the start of sda5 there is a hardware problem of the disk.

That would be my best guess, too.

Originally Posted by hcvv

             OK then. IMHO at the start of sda5 there is a hardware problem of the disk.
                        That would be my best guess, too.

Is it possible to solve this by software means? Shrink and/or reinstall only the root, to avoid the bad sectors.

Alternatively if the above won’t work:
I was thinking about moving from hdd to msata. In this case I could fresh install the latest version 15.1.
I can imagine how to copy the data from the old user home. However I would like to somehow keep the old windows install.
I presume, that it is possible, while installing Suse 15.1, to create one partition of the same size as the windows partition on the broken hard drive and use dd to copy the contents of the old /dev/sda2 to it (the size of the windows partition now is about 118 GB). However, is it possible to make grub from 15.1 see this copy and boot windows from it?

I would try using ddrescue or dd_rescue from live media boot to clone the whole HDD to the SSD, disconnect the HDD, make sure Windows boots from it, then if successful, install 15.1 to a freshly formatted sda5 on the SSD.

I have not done this before, so I would need some guidance. I would like also to understand why cloning only the windows partition won’t work. My confusion is caused by the fact that the msata ssd will have twice the capacity of the old hdd. What will happen with the extra volume?

They are basically dd augmented to try to recover data from bad sectors. This summarizes the difference between the two. Anything more you need would be in the man page for the one you choose to use, and in ample search hits. I use one so infrequently I don’t remember which I chose to use last, so usually have to search to decide which to use. ATM I have both installed, packages dd_rescue and gnu_ddrescue.

I would like also to understand why cloning only the windows partition won’t work.
It might. The difference is reduced change in context that could make Windows object to the new surroundings, and the extra work involved to make a second try if it does. I do a lot of cloning, both whole disks and individual partitions, but it rarely involves Windows.

My confusion is caused by the fact that the msata ssd will have twice the capacity of the old hdd. What will happen with the extra volume?
You get to choose. You could move the existing sda6 and/or sda7 into it, allowing to expand sda5 and/or sda6 before installing 15.1. You could create one or more new partitions. You could leave it unallocated for use to be determined in the future. Or you could delete sda7, move sda6 into it and expand it, then create a new swap in the newly created space in front of it, optionally also expanding sda5.

Isn’t there any chance I can repair the existing hard drive with these tools

The first step is to recover whatever data you can. And that is what mrmazda was suggesting.

Whether or not you can repair the drive depends on its condition. Start thinking about that after you have recovered whatever data you can.

You can not repair a broken disk (not functioning sectors). You can only try to save what is still readable, but that needs a lot of understanding how the file system is organised, etc. Normaly not worth the effort when compared to simply restore from the backup.