0

Somehow I managed to install a server with misaligned partitions.
fdisk says:

Device     Boot      Start        End    Sectors  Size Id Type
/dev/xvda1               2 2095151103 2095149056  999G 83 Linux
/dev/xvda2      2095153150 2097149951    1996802  975M  5 Extended
/dev/xvda5      2095153152 2097149951    1996800  975M 82 Linux swap / Solaris

Consequences:

  • my partitions are misaligned so I fear the performance penalties
  • grub has no place to be installed (I realized this problem on the last update, where I saw the error message)

My question:
Can I somehow repair this without loosing data?
(my system is installed and configured and some software installed, I would loose like 3 days of work if I had to reinstall)

My system:

  • Debian 11
  • running as a vServer at my hosting provider
  • no LVM or raid

I already searched for solutions. Basically I would have to move the whole partition to the right, correct?? (with a 1TB disk, I have more than enough disk space for such experiments). Looks like fdisk cant do that. Some people say gparted, but I have no GUI on the system, some say parted, but others say the 'move' option was removed from newer parted versions. Maybe sfdisk?

Any help would be appreciated, or just say I must reinstall, so I dont waste even more time. Thanks

archygriswald
  • 143
  • 1
  • 11
  • sfdisk has the --move-data option, looks like this will do what I need [sfdisk manpage](https://man7.org/linux/man-pages/man8/sfdisk.8.html) – archygriswald Dec 20 '22 at 22:06

0 Answers0