I have this MBR partition layout on two disks, internal and external:
-sda1 /boot
-sda2 /
-sda3 swap
-sda4 extended
sda5 encrypted
sda6 encrypted
The external disk is the same except it is obviously 'sdb.'
I needed to restore something from backup, but couldn't do it with the system running, so I booted from a bootable usb stick. I connected the external hard disk and copied what I wanted from two partitions: sdb2 and sdb5. I used pcmanfm to mount and umount the two partitions. Everything worked as expected.
I rebooted from the internal disk and then I remembered I wanted to copy something else. The additional file didn't require the system to go offline so I didn't use the usb stick. I connected the external disk again and... sdb5 and sdb6 popped up in pcmanfm as usual, but sdb1 and sdb2 didn't.
I tried to mount sdb2 manually on command line and mount didntt recognize it, claiming that I must specify the file system type. I did it as 'mount -t ext4' and it still won't work.
I thought maybe something else was broken on my system so I booted from the usb stick again and confirmed the problem. I booted into the regular system (internal disk) again, and the problem persists.
I tried opening sdb5 and it decrypts, but won't mount for the same reason: unindentified file system. sdb6 still opens.
The two disks look exactly the same on 'fdisk -l' but not on 'lsblk -f'. All partitions except sdb6 have no file system identification on the external disk.
# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext2 boot [uuid]
├─sda2 ext4 root [uuid] /
├─sda3
│ └─swap swap [uuid] [SWAP]
├─sda4
├─sda5 crypto_LUKS [uuid]
│ └─cxx xfs cr1 [uuid] /crypt1
└─sda6 crypto_LUKS [uuid]
└─czz xfs cr2 [uuid] /crypt2
sdb
├─sdb1
├─sdb2
├─sdb3
├─sdb4
├─sdb5 crypto_LUKS [uuid]
│ └─luks-[uuid]
└─sdb6 crypto_LUKS [uuid]
└─luks-[uuid] xfs cr2b [uuid] /media/root/cr2b
I can't see or understand how that happened. I have other copy of the data, but now I am very suspicious of the external disk. Can I still trust it? Is there any way I can fix that partition table so I don't have to copy everything again? I thought about opening it and re-saving it on cfdisk or fdisk, but since one of the encrypted partitions also has lost its FS label, I am not quite sure of how to do it.