LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   SSD won't mount (https://www.linuxquestions.org/questions/linux-software-2/ssd-wont-mount-4175609173/)

Garrett85 07-04-2017 04:16 PM

SSD won't mount
 
I recently created a post thinking I had blown up my bootloader but I've actually narrowed the problem down to the SSD on which my home directory is mounted. The reason my computer has not been booting is because my system is not mounting my home directory's SSD. This started after I opened my box and installed a new SSD which is now unplugged and not being used. Every since I opened my box my computer wouldn't boot again. I edited /etc/fstab while booted in a live USB and commented out the line telling my computer to auto mount the SSD drive to /home/user/. After that my computer has booted up just fine, except that I'm given a generic home directory without all of my files.
When I try to mount the drive manually this is what I get.

Code:

    user@mothership ~ $ sudo mount /dev/sdd1 /home/user/
    mount: special device /dev/sdd1 does not exist
    user@mothership ~ $ dmesg | tail
    [ 1104.937031] sd 11:0:0:0: Attached scsi generic sg4 type 0
    [ 1104.938166] sd 11:0:0:0: [sdd] 488397168 512-byte logical blocks: (250 GB/233 GiB)
    [ 1104.939159] sd 11:0:0:0: [sdd] Write Protect is off
    [ 1104.939165] sd 11:0:0:0: [sdd] Mode Sense: 28 00 00 00
    [ 1104.940154] sd 11:0:0:0: [sdd] No Caching mode page found
    [ 1104.940158] sd 11:0:0:0: [sdd] Assuming drive cache: write through
    [ 1104.948053]  sdd:
    [ 1104.951038] sd 11:0:0:0: [sdd] Attached SCSI disk
    [ 1105.150165] EXT4-fs (sdd): no journal found
    [ 1124.237071] EXT4-fs (sdd): no journal found




And when I plug the device into my fron USB ports this is what I get



Code:

Error mounting /dev/sdd at /media/user/86e3838b-7c18-4870-8a7b-684255629264: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdd" "/media/user/86e3838b-7c18-4870-8a7b-684255629264"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdd,
          missing codepage or helper program, or other error
   
          In some cases useful info is found in syslog - try
          dmesg | tail or so.

Any ideas? Thanks.

hydrurga 07-04-2017 04:33 PM

Could you run a sudo fdisk -l with the SSD attached and post the output for that device here?

michaelk 07-04-2017 05:01 PM

Quote:

[ 1104.948053] sdd:
In addition it does not appear that drive is partitioned and the output of fdisk will show us all of the information. What distribution/version is running on your computer? Most distributions use UUIDs or other persistent names so that installing another disk will not confuse the operating system. Did you make sure that you did not disturb any existing connections when you installed the new drive?

Posting the contents of your /etc/fstab might help too.

Garrett85 07-04-2017 06:17 PM

fdisk -l output
 
Quote:

Originally Posted by hydrurga (Post 5730587)
Could you run a sudo fdisk -l with the SSD attached and post the output for that device here?

Code:

user@mothership ~ $ sudo fsck -l /dev/sdd
[sudo] password for user:
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: The ext2 superblock is corrupt
fsck.ext4: Superblock invalid, trying backup blocks...
Journal superblock has an unknown incompatible feature flag set.
Abort<y>? yes

/dev/sdd: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sdd: ********** WARNING: Filesystem still has errors **********

user@mothership ~ $
user@mothership ~ $ fdisk -l /dev/sdd
fdisk: cannot open /dev/sdd: Permission denied
user@mothership ~ $ sudo fdisk -l /dev/sdd
Disk /dev/sdd: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdcaeb3a0


Garrett85 07-04-2017 06:25 PM

fstab
 
Quote:

Originally Posted by michaelk (Post 5730594)
In addition it does not appear that drive is partitioned and the output of fdisk will show us all of the information. What distribution/version is running on your computer? Most distributions use UUIDs or other persistent names so that installing another disk will not confuse the operating system. Did you make sure that you did not disturb any existing connections when you installed the new drive?

Posting the contents of your /etc/fstab might help too.

Code:

# <file system> <mount point>  <type>  <options>      <dump>  <pass>
UUID=f5178e32-9bad-429b-bc71-bfe14233f3c3 /              ext4    errors=remount-ro 0      1
UUID=677895f7-4bdc-449e-a4c9-fb548262f684 /var            ext4    defaults        0      2
UUID=0cb24c63-25cd-46f1-9b2f-734edde0b0b3 none            swap    sw              0      0
#UUID=86e3838b-7c18-4870-8a7b-684255629264 /home/user/  ext4  defaults        0        2
#UUID=c2a25a2c-3881-481a-bc1b-5c4a5fafeda9 /home/user/media/ ext4 defaults 0 2
UUID=d6c45990-4eeb-4cc4-9e96-554015cca820 /media/user/Files ext4 defaults 0 2

It's the /home/user/ SSD that has apparently stopped working. This is really bad because I have some files on that desktop that are newer than my last backup. So I'm really worried that the device is dead. I remember unplugging one of the Sata cables to make room for my hand when I was installing the new SSD for /home/user/media/ but I plugged it back up and I don't think it was the sata cable that even went to my /home/user/ SSD. How in the world did opening the box and plugging in a new SSD cause all of this? Now the /home/user/ SSD can't even manually mount when connected via USB, or any other means that I have found.

hydrurga 07-04-2017 06:36 PM

Your SSD filesystem appears to be corrupted. Not only that but the disk appears to not have any partition info (unless you cut that info off the end). Was the connection to the new SSD solid? Did anything happen to your knowledge that could have caused this?

Do you have any backups of your home directory from which you can restore?

If so, you need to repartition your SSD and create a fresh filesystem in that partition, before restoring your home directory to it.

If not, and your data is important to you, you're going to have to use forensic techniques to try and get as much of the data back off your SSD as possible, after cloning it to another device so that you can revert to that if those recovery techniques cause further damage.

In any case, you need to check the health of the SSD.

Garrett85 07-04-2017 06:53 PM

recovering my data
 
Quote:

Originally Posted by hydrurga (Post 5730621)
Your SSD filesystem appears to be corrupted. Not only that but the disk appears to not have any partition info (unless you cut that info off the end). Was the connection to the new SSD solid? Did anything happen to your knowledge that could have caused this?

Do you have any backups of your home directory from which you can restore?

If so, you need to repartition your SSD and create a fresh filesystem in that partition, before restoring your home directory to it.

If not, and your data is important to you, you're going to have to use forensic techniques to try and get as much of the data back off your SSD as possible, after cloning it to another device so that you can revert to that if those recovery techniques cause further damage.

In any case, you need to check the health of the SSD.

The only thing I can remember that might have caused this is that after putting in the new SSD I had plugged the monitor screen up to the wrong DVI port. While I was trying to figure out why the image wouldn't display I remember holding the power button and shutting the machine down while it was still booting several times while trying to figure out my display problem. If that caused the problem I would have expected that to have corrupted the OS's file system rather than my home directories file system SSD, all it has on it is everything under /home/user/, I would have expected the drive where / is mounted to be the one that gets corrupted?
Any idea one how I could go about recovering this data? I've already googled data recovery commercial options but I'm betting they're going to be really expensive. Thanks.

hydrurga 07-04-2017 07:26 PM

Quote:

Originally Posted by Garrett85 (Post 5730626)
I remember holding the power button and shutting the machine down while it was still booting several times...

Never a good idea. That could well have caused the problem.

Quote:

Originally Posted by Garrett85 (Post 5730626)
Any idea one how I could go about recovering this data? I've already googled data recovery commercial options but I'm betting they're going to be really expensive.

Yes, that doesn't normally come cheap. As I mentioned, you should first clone the disk to another device as a backup (or do your data recovery on the backup). For the data recovery, search on the web for linux data recovery. Note that as well as free tools, you also have paid applications.

AwesomeMachine 07-05-2017 06:33 PM

If you have an entry in /etc/fstab that uses the option "auto" the drive must be attached during boot or the system won't boot. If you comment out the entry in /etc/fstab, the system should boot with or without the SSD attached.

So, the entry for /home in /etc/fstab is probably incorrect (wrong UUID perhaps). Also, SSDs are usually used for system data, because that's where the increased speed is useful, and because system data changes less than user data, so the SSD doesn't get written to as much.

You have made the SSD for your user data, which is perplexing.

Garrett85 07-05-2017 07:14 PM

Cloning a corrupt drive
 
Quote:

Originally Posted by hydrurga (Post 5730640)
Never a good idea. That could well have caused the problem.



Yes, that doesn't normally come cheap. As I mentioned, you should first clone the disk to another device as a backup (or do your data recovery on the backup). For the data recovery, search on the web for linux data recovery. Note that as well as free tools, you also have paid applications.

I can clone a corrupted SSD that I can't even mount. How can I pull that off? Thanks.

Garrett85 07-05-2017 07:21 PM

fstab
 
Quote:

Originally Posted by AwesomeMachine (Post 5731133)
If you have an entry in /etc/fstab that uses the option "auto" the drive must be attached during boot or the system won't boot. If you comment out the entry in /etc/fstab, the system should boot with or without the SSD attached.

So, the entry for /home in /etc/fstab is probably incorrect (wrong UUID perhaps). Also, SSDs are usually used for system data, because that's where the increased speed is useful, and because system data changes less than user data, so the SSD doesn't get written to as much.

You have made the SSD for your user data, which is perplexing.

It's not the fstab file. I did comment out the line in fstab for booting that drive and it did boot fine except without all my files, I just got a generic home directory. But that's not because there's an error in fstab, I haven't recently edited that file, it's because something is wrong with the drive. I took it completely out of my box and plugged it in via USB and I got an error when the desktop tried to auto mount it. I got the same errors when I tried to manually mount it.

I've never heard of someone only using SSD for system files, as prices have been coming down on SSD I thought it was pretty common place for people to use them more and more altogether. I would think they are safer because are less susceptible to errors caused by movement and vibrations, don't wear out due to constant spinning, and are less power hunger.

hydrurga 07-05-2017 07:27 PM

Quote:

Originally Posted by Garrett85 (Post 5731142)
I can clone a corrupted SSD that I can't even mount. How can I pull that off? Thanks.

Essentially a cloning procedure will copy the underlying data from the disk, ignoring any partitioning or filesystems.

You can use, for example, ddrescue or an offline GUI program such as CloneZilla or Macrium Reflect.


All times are GMT -5. The time now is 05:00 AM.