Sunday, May 5, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 386  / 1 Year ago, sat, december 10, 2022, 9:37:15

Hi i want to upgrade my main system from Ubuntu 20.04.4 to 20.04.1 LTS.
But when i open gparted i get an error message. In spanish but i think very self explanatory:


enter image description here


Error from libparted: can't have a partition outside the disk


But i failed the upgrade because lack of free space in /boot, ubuntu told me that i had to free at least 350 mb on /boot....But i dont have such free space, and deleting one kernel could not be enough.
So i need to resize partitions, adding for example 500 mb to /boot and ideally take it from / . But i have /swap partition in the middle...So whats the best option to get more space in boot, perhaps deleting swap partition ?


I add the screenshot.
enter image description here


For sure i need all the information and i cant format the partitions and loose the information, software, configs in them.


Id like to have some kind of tutorial of what to do. Perhaps this could be a bug in upgrading process, because it should delete old kernels and install the new one.


More From » partitioning

 Answers
7

First, make sure that you have a tested backup of your data. Never touch your partitions without a backup of it. Or you may regret it !!!


Then you can turn off your swap



  1. disable swap


    sudo swapoff -a



  2. keeps the swap off during reboot (Just in case you reboot your system before the end of this procedure)


    sudo sed -i.bak '/ swap / s/^(.*)$/#1/g' /etc/fstab



  3. Remove the swap partition using gparted



  4. Extend your /boot partition using gparted



  5. Recreate the swap partition with the size left and set it as swap using gparted



  6. Restore your old fstab


    sudo mv /etc/fstab.bak /etc/fstab




PS: I didn't test the solution, but this is what I would do.


[#267] Monday, December 12, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atelti

Total Points: 194
Total Questions: 129
Total Answers: 110

Location: North Korea
Member since Tue, Jun 16, 2020
4 Years ago
atelti questions
Fri, Aug 26, 22, 02:44, 2 Years ago
Sat, Apr 9, 22, 13:57, 2 Years ago
;