I have an SSD that has Ubuntu installed, and a data HDD which used to be sdb
. The hard drive has lots of data in it already. Now, I see fdisk
doesn't show all partitions correctly and something has been changed. Below is the output from fdisk. First, the HDD is now shown as sda
, but without partition (e.g. sda1
). So I can't mount it.
$ sudo fdisk -l
Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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: gpt
Disk identifier: B50CD632-617E-47EA-A984-B0A6096801E3
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 1819488255 1818437632 867.1G Linux filesystem
/dev/sdb3 1819488256 1953523711 134035456 63.9G Linux swap
When I check /etc/fstab
, it shows
$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=65266004-ca77-48bc-97ce-28baa4002799 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=50B9-B0CF /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda3 during installation
UUID=ea9208b6-a4b1-4540-95ab-68fa7fe4d6bb none swap sw 0 0
What can I do to recover access to my HDD (/dev/sda
above, but mysteriously it used to be sdb1
)?
(Edit: below is the result from parted --list)
$ sudo parted --list
Model: ATA TOSHIBA HDWE140 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 4001GB 4001GB ext4
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 932GB 931GB ext4
3 932GB 1000GB 68.6GB linux-swap(v1)
sudo mkdir /mnt/4GB && sudo mount /dev/sda1 /mnt/4GB
? Is all your data available now in/mnt/4GB
? – Fabby Mar 18 '18 at 08:36fsck -C -r /dev/sda
give you? – Fabby Mar 20 '18 at 14:18