Apologies for a basic question about Ubuntu from a novice. My laptop has one SSD, where Ubuntu 16.04LTS is installed, and one HDD. They both have several partitions. Yesterday, I tried to recover files from my old corrupt flash drive mounted as sdc1. I used several tools, but I suspect that the crucial thing was the following command:

ddrescue -f -r3 /dev/sdc1 /dev/sdb4 logfile

After I ran it, one of the HDD partitions appeared to be repartitioned and nautilus started showing boxes with arrows near my HDD partition labels. Now, when I reboot, my HDD partitions do not mount automatically. I only see the empty desktop and can launch only one terminal at a time, as they all flock in the upper-left corner of the desktop and can't be moved from there.

lsblk gives the following:

sda    8:0      0 119.2G  0 disk 
sda1   8:1      0   600M  0 part /boot/efi
sda2   8:2      0     3G  0 part 
sda3   8:3      0  83.9G  0 part 
sda4   8:4      0  31.8G  0 part [SWAP]
sdb    8:16     0 931.5G  0 disk 
sdb1   8:17     0   200G  0 part 
sdb2   8:18     0   500G  0 part 
sdb3   8:19     0   200G  0 part 
sdb4   8:20     0  31.5G  0 part 
sdc    8:32     1  29.1G  0 disk 
sdc1   8:33     1  29.1G  0 part /media/me/TOSHIBA
loop0  7:0      0  81.7M  1 loop /snap/core/4017
loop1  7:1      0  81.6M  1 loop /snap/core/4110
loop2  7:2      0  81.3M  1 loop /snap/core/3887

Here sda is my SSD and sdb is my HDD. As you see, the HDD partitions are not mounted.

Here is blkid:

/dev/sda1: LABEL="ESP" UUID="0AEC-8283" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="3ae1181e-c506-4254-be93-f8ebb7487763"
/dev/sda2: LABEL="OS" UUID="6810-7989" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="6aefe6a8-9e57-4f58-8fed-e4c87cb0890e"
/dev/sda3: LABEL="UBUNTU" UUID="64ef968d-8488-49b1-8dde-a0829168b76f" TYPE="ext4" PARTUUID="b61d10c6-e5a8-456b-bf9c-19bff4b97c66"
/dev/sda4: UUID="181a3feb-93f6-4e98-8583-52a683f658bc" TYPE="swap" PARTUUID="e0c61132-4bc0-4089-be6f-e035b89e404a"
/dev/sdb1: LABEL="C" UUID="16D1E84B6E1AEFF3" TYPE="ntfs" PARTUUID="e1d5874f-01"
/dev/sdb2: LABEL="D" UUID="329D74C657FEB321" TYPE="ntfs" PARTUUID="e1d5874f-02"
/dev/sdb3: LABEL="F" UUID="4E0068F541357DFD" TYPE="ntfs" PARTUUID="e1d5874f-03"
/dev/sdb4: UUID="64A7-9503" TYPE="vfat" PARTUUID="e1d5874f-04"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"

/dev/sdb4 appears to be repartitioned by ddrescue.

Here is fstab:

<file system> <mount point>   <type>  <options>       <dump>  <pass>  
/ was on /dev/sda3 during installation  
UUID=64ef968d-8488-49b1-8dde-a0829168b76f /               ext4    errors=remount-ro 0       1
/boot/efi was on /dev/sda1 during installation  
UUID=0AEC-8283  /boot/efi       vfat    umask=0077      0       1  
swap was on /dev/sda4 during installation  
UUID=181a3feb-93f6-4e98-8583-52a683f658bc none            swap    sw              0       0  

It is easy to fix each time as nautilus still sees my partitions and they mount after I click on their icons.

The only abnormal thing which I see in gparted is the warning mark at /dev/sdb4 saying

30.55 GiB of unallocated space within the partition. To grow the file system to fill the partition, select the partition and choose the menu item: Partition->Check"

Besides, this partition is fat32 while the other HDD partitions are ntfs. I don't remember if they were these originally or changed by ddrescue.

Now, I think that I can easily fix all this in the sense that I can repartition /dev/sdb4 and edit fstab. However, being a novice and not fully understanding what's going on, I would rather prefer to roll all this back to where it was before the corruption.

The ddrescue logfile follows:

Rescue Logfile. Created by GNU ddrescue version 1.19
Command line: ddrescue -f -r3 /dev/sdc1 /dev/sdb4 logfile
Start time:   2018-03-04 01:39:04
Current time: 2018-03-04 01:41:40
current_pos  current_status
0x102FBE00     +
      pos        size  status
0x00000000  0x102BC000  +
0x102BC000  0x00040000  -
0x102FC000  0x2D100000  +

dmesg says EXT4-fs (sda3): re-mounted. Opts: errors=remount-ro

What exactly could have happened? I think it was more than just repartitioning of /dev/sdb4. Why are the partitions not auto-mounting now? How can I roll this back? Will everything restore to normal if I do Partition->Check on /dev/sdb4 as gparted suggests?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.