ubuntu18.04 LTS解决/boot空间不足
1. 查看磁盘占用情况
df -h Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p5 181M 141M 27M 85% /boot
/dev/nvme0n1p8 71G 26G 41G 39% /home
/dev/nvme0n1p1 96M 48M 49M 50% /boot/efi
tmpfs 1.6G 16K 1.6G 1% /run/user/121
tmpfs 1.6G 44K 1.6G 1% /run/user/1000
发现/boot确实占用率很高。
2. uname -a (查看当前使用的内核版本)
lenmom@M1701:~$ uname -a
Linux M1701 4.15.--generic #-Ubuntu SMP Thu Dec :: UTC x86_64
3.查看已安装的内核版本
lenmom@M1701:~$ dpkg --get-selections |grep linux
binutils-x86--linux-gnu install
console-setup-linux install
libselinux1:amd64 install
linux-base install
linux-firmware install
linux-generic install
linux-headers-4.15.- install
linux-headers-4.15.--generic install
linux-headers-4.15.- install
linux-headers-4.15.--generic install
linux-headers-generic install
linux-image-4.15.--generic deinstall
linux-image-4.15.--generic install
linux-image-4.15.--generic install
linux-image-generic install
linux-libc-dev:amd64 install
linux-modules-4.15.--generic deinstall
linux-modules-4.15.--generic install
linux-modules-4.15.--generic install
linux-modules-extra-4.15.--generic deinstall
linux-modules-extra-4.15.--generic install
linux-modules-extra-4.15.--generic install
linux-signed-generic install
linux-sound-base install
pptp-linux install
syslinux install
syslinux-common install
syslinux-legacy install
util-linux install
能看到已经安装的版本,其中带image的一般就是旧版本,其中
a)deinstall代表是已经删除的旧版本
b) install是还没有删除的旧版本内核
4. 删除多余的内核文件
通过uname -a可以查看到当前正在使用的内核版本,把不是当前版本的处于install状态的image-xxx-generic文件卸载掉,对于本例中linux-modules-extra-4.15.0-39-generic是多余的内核文件,正在使用的是linux-modules-extra-4.15.0-43-generic,开始卸载。
卸载命令为sudo apt-get remove linux-modules-xxx-generic,其中xxx为要卸载的内核版本号
lenmom@M1701:~$ sudo apt-get remove linux-modules-4.15.--generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.15.--generic linux-modules-4.15.--generic
upgraded, newly installed, to remove and not upgraded.
not fully installed or removed.
After this operation, 74.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... files and directories currently installed.)
Removing linux-image-4.15.--generic (4.15.-39.42) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.15.--generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.15.--generic
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.--generic
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.--generic
Found initrd image: /boot/initrd.img-4.15.--generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done
Removing linux-modules-4.15.--generic (4.15.-39.42) ...
Setting up initramfs-tools (.130ubuntu3.) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (.130ubuntu3.) ...
update-initramfs: Generating /boot/initrd.img-4.15.--generic
W: APT had planned for dpkg to do more than it reported back ( vs ).
Affected packages: initramfs-tools:amd64
u can execute the following command to ensure all useless files are deleted:
sudo dpkg -P linux-modules-4.15.0-46-generic -- the kernel name depend to your concret condition
5. 使用du -h再次查看/boot空间
lenmom@M1701:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p5 181M 75M 94M % /boot
/dev/nvme0n1p8 71G 26G 41G % /home
/dev/nvme0n1p1 96M 48M 49M % /boot/efi
tmpfs .6G 16K .6G % /run/user/
tmpfs .6G 44K .6G % /run/user/
我们发现,/boot空间的确已经释放出来了。
ubuntu18.04 LTS解决/boot空间不足的更多相关文章
- ubuntu18.04 lts重装VMware Tools实现主机文件共享等功能
ubuntu18.04 lts重装VMware Tools实现主机文件共享等功能 在VMWare 14.x上安装ubunuu18.04 lts后发现,可以实现全屏显示,但是没有与主机共享文件的功能,然 ...
- Ubuntu-18.04 LTS UEFI 安装U盘制作
要把U盘作为UEFI启动盘,第一个分区要为FAT32分区,EFI程序放在/EFI/Boot/bootx64.efi.为了制作Ubuntu-18.04 LTS安装U盘,可以把一个U盘格式化为FAT32格 ...
- Ubuntu18.04 LTS x64 构建ARM交叉编译环境(尝试,但失败了!!!估计是编译器没选对)
[测试而已,由于需要了解编译器和处理器体系,因此先放弃该方法] 动机 入门嵌入式开发,又需要 Windows 又需要 Linux,但资料给的竟然是 Ubuntu9,导致我不能使用 VSCode Rem ...
- linux系统解决boot空间不足
有时候更新Linux系统是会碰到boot空间不足的错误,原因基本上是安装时boot空间设置问题可以通过删除旧的内核来释放boot空间. ubuntu: 1.查看当前使用内核版本号 unam ...
- Ubuntu18.04 LTS 搭建Cassandra集群
环境需求 jdk8 root@node01:~# java -version java version "1.8.0_202" Java(TM) SE Runtime Enviro ...
- ubuntu16.04 解决boot空间不足
1. dpkg --get-selections |grep linux-image #查看已安装内核版本号 2. uname -a #查看现运行版本 3. sudo apt-get purge 版本 ...
- 解决boot空间不足问题
uname -a :查看现在系统信息,内核版本 dpkg --get-selections |grep linux-image : 查看内核列表 sudo apt-get remove linux-i ...
- Ubuntu18.04 LTS 安装部署golang最新版本1.10
1 步骤 //1 直接安装golang-go 目前最新版本是1.10 sudo apt-get install golang-go //2 向/etc/profile追加以下代码 sudo vim / ...
- ubuntu18.04+win10解决时钟不同步办法
安装ntpdate: 执行命令: sudo apt-get install ntpdate 设置校正服务器: sudo ntpdate time.windows.com 设置硬件时间为本地时间: 执行 ...
随机推荐
- 套接字选项——getsockopt和setsockopt
这两个函数仅用于套接字 #include <sys/socket.h> int getsockopt(int sock, int level, int optname, void *opt ...
- Distributed processing
Distributed processing Tool 好处 坏处 类型 支持序列化 支持根据负载动态调度任务 支持c 支持dependency的调度 有成熟的library Actor model ...
- [转]Java之JMX 详解
一.JMX简介 JMX是一种JAVA的正式规范,它主要目的是让程序有被管理的功能,那么怎么理解所谓的“被管理”呢?试想你开发了一个软件(如WEB网站),它是在24小时不间断运行的,那么你可能会想要“监 ...
- jdk动态代理在idea的debug模式下不断刷新tostring方法
在jdk的动态代理下,在使用idea进入动态代理的debug模式下,单步调试会刷新idea的tostring方法,让他自己重走了一遍代理 这个问题暂时无解
- Springboot技术点汇总
1. Springboot+MyBatis+druid 在启动类上面,添加注释@Configuration以及@ImportResource(location={"classpath:con ...
- Jenkins 配置用户权限错误导致无法登录解决方案
最初配置Jenkins的用户管理权限时,因为不熟悉很容易将用户角色配置错误,导致配置用户后无法登录系统: 登录系统时候提示"Access Denied": 解决办法: 进入Jenk ...
- MS DSVM、DLVM
DSVM(Data Science Virtual Machine 数据科学虚拟机) 是专为研究数据科学生成的 Microsoft Azure 云上的自定义 VM 映像.它预装并预配了许多热门数据科 ...
- 浅析Hyperledger Fabric共识算法 摘自http://www.cocoachina.com/blockchain/20180829/24728.html
Hyperledger Fabric共识算法 区块链系统是一个分布式架构,交易账本信息由各个节点管理,组成一个庞大的分布式账本.在分布式系统中,各个节点收到的交易信息的顺序可能存在差异(例如,网络延迟 ...
- 代码编辑器之notepad++
引用及下载地址:http://www.iplaysoft.com/notepad-plus.html NotePad++ 优秀的支持语法高亮的开源免费编辑器绿色版下载 EditPlus,它始终是一款收 ...
- [Android] Surface、SurfaceHolder与SurfaceView
其实相当于MVC结构的三者关系:M(Surface).V(SurfaceView).C(SurfaceHolder) 1.Surface Handle onto a raw buffer that i ...