Categories
Linux Mastering Development

Debian Extending Primary (root) partition without data loss

I have a VM with Debian installed on it. I want to extend the primary partition without losing data.

Here is output of sudo fdisk -l:

Disk /dev/sda: 34.2 GiB, 36700160000 bytes, 71680000 sectors
Disk model: VBOX HARDDISK
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: 0x0eacd5f2

Device     Boot    Start      End  Sectors Size Id Type
/dev/sda1  *        2048 46139391 46137344  22G 83 Linux
/dev/sda2       46141438 52426751  6285314   3G  5 Extended
/dev/sda5       46141440 52426751  6285312   3G 82 Linux swap / Solaris

Or is ther

Leave a Reply

Your email address will not be published. Required fields are marked *