Cannot view disk in Files - KDE Partition Manager reports that partition is not properly aligned

ozfbu

Member
Joined
Sep 2, 2025
Messages
60
Reaction score
15
Credits
513
I have an SSD, which I'd unplugged from my computer due to misunderstanding something. Before I unplugged it, I could happily mount the thing and browse it with Fedora Dolphin

However, on plugging it back in, Files cannot see the thing. Checking KDE Partition Manager, it reports that
Partition /dev/sdb1 is not properly aligned (first sector: [two-digit number], modulo: [the same two-digit number])

sudo smartctl /dev/sdb tells me that it has successfully opened the device

Logical and physical sector sizes are 512 bytes

fdisk gives the partition table as
DeviceStartEndSectorsSizeType
/dev/sdb1[that same two digit number from above]3276732768 - (the same two-digit number)16MMicrosoft reserved
/dev/sdb232768[very big number][another very big number][untold billions or trillions of bytes]Microsoft basic data

If the SSD did not have some data that I'd prefer not to lose, I'd reformat it and call it a day. However, I'd rather not lose this data

How can I recover it please? Internet searches are not returning anything relevant for "Partition...is not properly aligned"
 


If partition is not properly aligned there is nothing you can do other than reformat with correct alignment which will erase all data.
You can't resize it because partition alignment is done at the beginning of a partition table not at the end, but resize can be done from the end only.

Thank MS installer for not aligning your partition properly.

first sector: [two-digit number]
It has to start at sector 1024 or 2048 or 4096 corresponding to 1 MiB (1024 bytes) boundary.
If each sector size is 512 bytes (physical) and 4096 bytes (logical).
 
Thank you for your response CaffeineAddict

Mercifully, Dolphin started registering it again (or maybe I'd blanked it and it was there all along), so I've been able to retrieve my data thank you Jesus

The sector started at 34. I'm going to reformat the thing now, having copied everything off, but I'm wondering how my SSD could have gotten out-of-alignment in the first place (and if there's anything that I can do to avoid it in the future!)
 
having copied everything off, but I'm wondering how my SSD could have gotten out-of-alignment in the first place (and if there's anything that I can do to avoid it in the future!)
It depends on formatter that's included in OS installer, I can't speak for other OS's but when I'm installing Debian I setup LVM and manually set partition layout in expert install menu.
From what I recall alignment is automatic, although I haven't modified the layout for long time, I just reuse existing layout that's already set and format partitions only.
Only thing needing modifications is setting FS's.

Your problem seems to be with Windows drive, nothing you can do from Linux installer, this needs to be done from Windows installer and it should be automatic.

Here is partitioning schema from my notes I use:
  • Free space for alignment Prior VG = 1 MiB (1048,57 KB)
  • PARTLABEL=ESP MOUNTPOINT=/boot/efi 512 MiB (536,87 MB)
  • PARTLABEL=Boot LABEL=Boot MOUNTPOINT=/boot 1 GiB (1073,74 MB)
  • LABEL=System MOUNTPOINT=/ The rest of space = 465,76 - 23,8 - 0,5 = 441,46 GiB (474,01 GB)
  • swap 1.5 x RAM = 1.5 x 15.88 GiB = 23,8 GiB (25,56 GB)
  • Free space for e2scrub 512 MiB (536,87 MB)
  • Free space for alignment After VG = 1 MiB (1048,57 KB)

This can be all fine tuned in expert install, but whether your distro gives you that control IDK.

You can fire up Debian live and use partitioner from expert install to fine tune partitions, when done shut down and continue with distro you'll be installing, starting with windows.

For windows there is separate partitioning schema:

If you're dual booting none of this is simple, you'll need diskpart and you'll need diskpart script (adapt it) it's on the link above.
 


Follow Linux.org

Members online


Top