Merge partitions ubuntu 22.04


After the update menager offered I upgraded 20.04 to 22.04.1 by update menager Here on the screenshot how it was completed it. My question is how can I merge the sdb5 partition with the sdb7 Is that possible to do it with gparted or only from the terminal . in case terminal option what is the whole command line process avoiding any boot failure ? Thanks for your help in advance

First

Create a reliable backup of everything.

Second

Ideally, check if the backup works properly.

Third

You can now move the boot FAT32 formatted partition in front of /dev/sdb5 and then you could delete the /dev/sdb5 partition, so it becomes free space, which may be merged into /dev/sdb7.
The problem with this approach is, that /dev/sdb5 will be deleted, including its contents. So, first you need to take care of the data on it. Depending on what it is, you need to supplement it after the merge operation.

The fundament of all these operations are backups. So, take backups first, before thinking about anything else, yet.

3 Likes

In addition to everything my esteemed colleague @Akito has suggested - you will probably have to do all this work using a live boot CD system, e.g. a rescue CD, I think there’s a gparted rescue CD ISO out there - but - you could proably just do it from the Ubuntu LIVE boot CD / USB drive.

i.e. you proably CANNOT move, delete, those partitions, while your desktop OS is running :smiley:

4 Likes

Thanks for helping me Merging the partition was successful from live boot USB drive using gparted. After reorganizing the partitions I run the boot repair app and reboot again from the comp SSD drive it was smooth boot and no any data loss. I d like to share the command lines to get the boot repair , maybe it would be useful for others who will face the same problem :
1, sudo add-apt-repository ppa:yannubuntu/boot-repair
2,sudo apt-get update
3,sudo apt-get install boot -repair

3 Likes