ECEn Help Wiki

Log In
Home Sitemap Recent Changes Media Manager

Trace:

wiki:student:how_to_clear_a_full_boot_partition

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:student:how_to_clear_a_full_boot_partition [2019/03/15 15:45]
cwday
wiki:student:how_to_clear_a_full_boot_partition [2019/03/21 14:56] (current)
mchamber
Line 1: Line 1:
-======How to Clear a Full Boot Partition======+<​title>​How to Clear a Full Boot Partition</​title>​
 ​​​Ubuntu usually creates a separate /boot partition for storing Linux kernels. This isolates the kernels from the rest of the operating system, which helps make the system more stable. However, as it is usually a small partition (> 200 MB), it can fill up with old kernels. While keeping a couple old kernels around can be advisable, so as to be able to roll back to old kernels if a new one proves unstable (an unusual occurrence),​ it is not necessary to keep more than one or two. ​​​Ubuntu usually creates a separate /boot partition for storing Linux kernels. This isolates the kernels from the rest of the operating system, which helps make the system more stable. However, as it is usually a small partition (> 200 MB), it can fill up with old kernels. While keeping a couple old kernels around can be advisable, so as to be able to roll back to old kernels if a new one proves unstable (an unusual occurrence),​ it is not necessary to keep more than one or two.
  
-A user will usually notice they are out of space in /boot only after it is causing problems. If a new kernel tries to install without enough space, the installation will fail. If the system is then rebooted and it tries to use the new kernel, it will have a kernel panic. Sometimes it will be more graceful and simply cause dependency problems, which cripples the functionality of apt-get.+A user will usually notice they are out of space in **/boot** only after it is causing problems. If a new kernel tries to install without enough space, the installation will fail. If the system is then rebooted and it tries to use the new kernel, it will have a kernel panic. Sometimes it will be more graceful and simply cause dependency problems, which cripples the functionality of apt-get.
  
 ​Here are some tricks to solve this problem: ​Here are some tricks to solve this problem:
   -​​ If you've run into a kernel panic at boot time, select the //Advanced Boot// option from the Grub menu and select an older kernel version to boot from (do not use recovery mode). You may have to try a few before you find one that works.   -​​ If you've run into a kernel panic at boot time, select the //Advanced Boot// option from the Grub menu and select an older kernel version to boot from (do not use recovery mode). You may have to try a few before you find one that works.
-  - When you have a functioning terminal to use, check the Linux kernel version you are currently running ​with the **''​uname -r''​** command. DO NOT remove this kernel. +  - When you have a functioning terminal to use, check the Linux kernel version you are currently running**DO NOT REMOVE THIS KERNEL**. 
-  - Check which old kernels you have with **''​ls /boot''​**. +    * <​code>​uname -r</​code> ​ 
-  - Force the removal of one or two old kernels with **''​sudo dpkg --force-all -P linux-image-3.13.0-32-generic''​​** (//update with the version of the kernel you wish to remove//). +  - Check which old kernels you have 
-    ​​You will probably need to use the same command to delete the ''​linux-image-extra''​ version of the corresponding kernels to fix dependency problems. +    ​ <​code>​ls /boot</​code>​ 
-  - ​Once you are certain you have enough free space, use **''​sudo apt-get install -f''​** to fix any existing dependency problems. ​Make sure this command does not try to reinstall the kernels you just removed. If it does, you need to remove the ''​linux-image-extra''​ packages for those kernels (there may be other such dependencies,​ check online).+  - Force the removal of one or two old kernels ​(//​update ​with the version of the kernel you wish to remove//) 
 +    ​<​code>​sudo dpkg --force-all -P linux-image-3.13.0-32-generic</code> ​ 
 +    ​​You will probably need to use the same command to delete the ''​linux-image-extra''​ version of the corresponding kernels to fix dependency problems. 
 +  - ​Once you are certain you have enough free space fix any existing dependency problems.  
 +    ​<​code>​sudo apt-get install -f</​code>​ 
 +    ​//Make sure this command does not try to reinstall the kernels you just removed.// If it does, you need to remove the ''​linux-image-extra''​ packages for those kernels (there may be other such dependencies,​ check online).
   - Once you've got any dependency issues resolved, run **''​sudo apt-get autoremove''​** to remove the other old kernels.   - Once you've got any dependency issues resolved, run **''​sudo apt-get autoremove''​** to remove the other old kernels.
-    ​As an alternative to ''​autoremove'',​ you try the following command, though using a low-level utility such as dpkg is not necessarily recommended. It will remove all kernels except the one currently running. +    ​As an alternative to ''​autoremove'',​ you try the following command, though using a low-level utility such as dpkg is not necessarily recommended. It will remove all kernels except the one currently running. 
-      ​**''​ADD COMMAND HERE''**+      * <WRAP prewrap><​code>​sudo apt-get purge $(dpkg -l linux-{image,​headers}-"​[0-9]*" | awk '/ii/{print $2}' ​| grep -ve "​$(uname -r | sed -r 's/​-[a-z]+//​)"​)</​code></​WRAP>​
   - Odds are, there'​s a new kernel waiting to be installed. Once you've done all this to clear out your ''/​boot''​ partition, run **''​apt-get update''​** and **''​apt-get upgrade''​** to update your system (including any new kernels).   - Odds are, there'​s a new kernel waiting to be installed. Once you've done all this to clear out your ''/​boot''​ partition, run **''​apt-get update''​** and **''​apt-get upgrade''​** to update your system (including any new kernels).
wiki/student/how_to_clear_a_full_boot_partition.1552686359.txt.gz · Last modified: 2019/03/15 15:45 by cwday