No partition data, but can mount disk manualy

Happylinixer

New Member
Joined
Jun 10, 2021
Messages
4
Reaction score
0
Credits
31
Reinstalled laptop, and for a 2 TB disk, the partition data are gone. I can mount the disk manually from Dolphin (KDE) however and even access the files on it.
It has been formatted with one XFS partition covering the full disk.

DF gives me the following output:
/dev/sdb 1.9T 697G 1.2T 38% /run/media/xyz/91bd77cb-ffa6-4f01-b8f7-842c6d19b4a1

And sfdisk does the following:
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Which leave me puzzled. Can mount it from Dolphin, data are there but no partition data anymore.
Any suggestions is much appreciated.
 


df only shows mounted partitions.

fdisk /dev/sdb
then "p" (for print) will show the partitions
Also if you like GUIs, gparted will show the partitions.

sdb would be the disk.
sdb1
sdb2
etc...
would be the partitions.
 
ok, the output from fdisk /dev/sdb [with " p" applied is
The old xfs signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xabb05d23.

Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
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: 0xabb05d23

Command (m for help):
Which confimrs my guess: no partion data. How to proceed?
 
i'm confused by the sentence "Reinstalled laptop, and for a 2 TB disk" since that implies the 2TB is an internal disk, but drives are usually labelled starting /dev/sda /dev/sdb ..etc
and run/media is definately i think not mounted as an internal drive via fstab but as an external drive.
 
If you can mount anything from Dolphin than a partition has to exist; otherwise the os wouldn't be up and running.

What is the output of:

sudo fdisk -l
 
df only shows mounted partitions.

fdisk /dev/sdb
then "p" (for print) will show the partitions
Also if you like GUIs, gparted will show the partitions.

sdb would be the disk.
sdb1
sdb2
etc...
would be the partitions.
Or just use fdisk and the disk.
Code:
fdisk -l /dev/sdb
 
Which confimrs my guess: no partion data. How to proceed?

So it looks like this disk is formatted as a DOS disk.
Since it is 2T, I would recommend that you redo the partition table as GPT.
NOTE** - I only recommend this if you have a UEFI type BIOS.

fdisk /dev/sdb
g (for gpt partition table)
w (to write new partition table to disk)
This will kick you out of fdisk.

fdisk /dev/sdb (again)
n (for new partition)

You can go with the defaults and just press enter of everything,
or you can make the partitions smaller and have two or three of them (as many as you want really)

w (to write new partitions to the disk)
This will kick you out of fdisk.

mkfs.ext4 /dev/sdb1 or mkfs.xfs /dev/sdb1 depending what filesystem format you like.

mount /dev/sdb1 /mnt

To make this permanent\

umount /mnt

mkdir /2tdisk (you can name this anything - no spaces)

edit /etc/fstab
add this to the bottom.

/2tdisk xfs defaults 0 0

(rename 2tdisk to whatever you named the mount point above)

mount /2tdisk

Now when you reboot, the disk should always be mounted.
 
If you can mount anything from Dolphin than a partition has to exist; otherwise the os wouldn't be up and running.

What is the output of:

sudo fdisk -l
the output of fdisk -l is:
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

running op Opensuse 15.2 with KDE 5
 
the output of fdisk -l is:


running op Opensuse 15.2 with KDE 5
Is that Tumbleweed?

Opensuse Leap is 15.3 now.

The partition or partitions didn't show from the output.
Try running the below cmd like f33dm3bits suggested.

sudo fdisk -l /dev/sdb
 
Is that Tumbleweed?

Opensuse Leap is 15.3 now.

The partition or partitions didn't show from the output.
Try running the below cmd like f33dm3bits suggested.

sudo fdisk -l /dev/sdb
No it's not tumbleweed, 15.2 Leap And the output of fdisk -l /dev/sdb is:

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 870
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
martin@localhost:~>
 
When I run sudo fdisk -l on my laptop running Debian I can see my partitions.
Look at my output here:

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Hitachi HTS54755
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: 0x0d39ac65

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 974772223 974770176 464.8G 83 Linux
/dev/sda2 974774270 976771071 1996802 975M 5 Extended
/dev/sda5 974774272 976771071 1996800 975M 82 Linux swap / Solaris


Your partitions are not showing at all.

Do you have gparted installed?
If you do please post a screenshot of those partitions.

Also, is your BIOS UEFI?
 


Top