Merging two linux partitions
Ralf Mardorf
silver.bullet at zoho.com
Tue May 14 05:12:23 UTC 2019
On Mon, 13 May 2019 22:12:00 -0400, Ken D'Ambrosio wrote:
>On 2019-05-13 21:51, Phil wrote:
>> I'm asking for advice so that I don't create additional problems for
>> myself.
>
>Heh. Glad you asked! Because you're overthinking this, and making it
>w-a-y harder than it really is. What you want to do:
>* Delete your new, empty partition
>* Resize your partition with data on it
>Done! Gparted will happily help you with the resize.
Hi,
in theory this is how it should work(, too). IMO it would be better to
do it different in the first place.
FWIW resizing the partition might require to reinstall the bootloader,
a link is provided at the end of this email.
>> I've cloned my 120GB SSD to a 1TB SSD and now I want to extend the
>> Linux partition so that it uses all of the extra space of the drive.
I'm puzzled about what "cloned" is for.
If the old partition was cloned via "dd", the partition table could be
broken.
If I would migrate from a 120 GB SSD to a 1 TB SSD, I would simply
format the new partition/s to the wanted size/s and from an Ubuntu live
DVD I would run
sudo -i
cp -ai /mount_point_of_old_SSD_linux_partition_1/* /mount_point_of_new_SSD_linux_partition_1/
When using a simple copy command (or by restoring from a tar archive backup
or by rsync etc., too), it doesn't matter if the old partition should be
smaller than the new partition.
If the install does use more than one partition, I would repeat it for
each partition.
cp -ai /mount_point_of_old_SSD_linux_partition_n/* /mount_point_of_new_SSD_linux_partition_n/
Note, globbing is tricky, the asterisk ignores hidden items. If there
should be a hidden item inside the parent directory (it doesn't matter
for hidden items inside of sub directories) of a Linux partition, those
items need to be copied by additional steps.
cp -ai /mount_point_of_old_SSD_linux_partition_n/.hidden_item /mount_point_of_new_SSD_linux_partition_n/
After copying, I would install the bootloader. How to do this, depends
on the used bootloader. I'm using syslinux. Since the default for
Ubuntu is Grub 2, here is a link on how to install Grub 2 via a live
media:
https://help.ubuntu.com/community/Grub2/Installing#via_the_LiveCD_terminal
Perhaps you need to consider something else, if you should use UEFI.
I've never used it.
Regards,
Ralf
More information about the ubuntu-users
mailing list