I have a disk that looks like this:
[root@alpha ~]# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 930.39 GiB, 998999326720 bytes, 1951170560 sectors
Disk model: VIRTUAL DISK
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: 0x0385371c
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 102402047 102400000 48.8G 83 Linux
/dev/sda2 102402048 1951170559 1848768512 881.6G 83 Linux
I want to expand sda2 to the beginning of the disk, without losing the
data on sda1 (and obviously on sda2 as well). Can that be done safely?
For instance, I'm thinking I can delete both partitions in fdisk and
create a single one for the entire disk. Then, don't format the new
partition. Would that pick up the existing filesystem?
Or, maybe gparted? I can delete sda1, then expand sda2 to the beginning
of the disk. Would that work?
Luckily, sda1 is fairly small so I can back it up somewhere, then gparted
should work, but does anyone have first hand experience with this?