Sample Header Ad - 728x90

How to create partitions on a volume with the root filesystem mounted on the enitre disk

5 votes
1 answer
266 views
I have a server with the root filesystem / mounted on /dev/sda, i.e., the entire disk, which has no partitions. This situation makes me uncomfortable, and I would like to partition the disk and put the root filesystem on /dev/sda1. I'm not sure if this is possible though, without losing my entire server, since this is the root filesystem. If I run fdisk /dev/sda, it lets me create the partition /dev/sda1 over the entire disk, but I'm afraid that this will wipe the disk, so I haven't proceeded with that. Is there a way to move / from /dev/sda to /dev/sda1 without losing everything? Here's fdisk -l, edited to remove loop devices:
Disk /dev/sda: 117.19 GiB, 125829120000 bytes, 245760000 sectors
Disk model: QEMU HARDDISK   

Disk /dev/sdb: 1000 MiB, 1048576000 bytes, 2048000 sectors
Disk model: QEMU HARDDISK   

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        2048 2047999 2045952  999M 82 Linux swap / Solaris

Disk /dev/sdc: 160 GiB, 171798691840 bytes, 335544320 sectors
Disk model: Volume          

Device     Boot Start       End   Sectors  Size Id Type
/dev/sdc1        2048 335544319 335542272  160G 83 Linux
Asked by Dave_G (61 rep)
Aug 3, 2025, 10:17 PM
Last activity: Aug 4, 2025, 02:33 AM