Ask Your Question
1

Fedora28 Boot partition out of space

asked 2018-07-27 02:03:46 -0600

Orriginal gravatar image

updated 2018-07-27 06:12:02 -0600

genodeftest gravatar image

While doing a recent dnf update, it failed with the following Error

You can remove cached packages by executing 'dnf clean packages'. Error: Transaction check error: installing package kernel-core-4.17.7-200.fc28.x86_64 needs 3MB on the /boot filesystem

Error Summary

Disk Requirements: At least 3MB more space needed on the /boot filesystem.

So I ran df -h

Filesystem                               Size  Used Avail Use% Mounted on
devtmpfs                                 1.6G     0  1.6G   0% /dev
tmpfs                                    1.6G   33M  1.6G   3% /dev/shm
tmpfs                                    1.6G  1.8M  1.6G   1% /run
tmpfs                                    1.6G     0  1.6G   0% /sys/fs/cgroup
/dev/mapper/fedora_localhost--live-root   30G  6.7G   22G  24% /
tmpfs                                    1.6G  144K  1.6G   1% /tmp
/dev/sdb1                                733G   53G  643G   8% /mnt/DATA
/dev/sda1                                269M  220M   31M  88% /boot
/dev/mapper/fedora_localhost--live-home   23G  524M   22G   3% /home
/dev/mapper/fedora_localhost--live-var    46G  2.0G   42G   5% /var
tmpfs                                    326M   16K  326M   1% /run/user/42
tmpfs                                    326M   40K  326M   1% /run/user/1000

I have 2.3GB of free space on the Hard disk..How can I allocate that to /boot please ? And I have always had a boot of this size.Why do you think it is running out now ?

out out from ls -al /boot

total 188106
dr-xr-xr-x.  7 root root     1024 Jul 18 09:17 .
dr-xr-xr-x. 18 root root     4096 Apr 25 08:33 ..
-rw-r--r--.  1 root root   196376 Apr 24 00:17 config-4.16.3-301.fc28.x86_64
-rw-r--r--.  1 root root   196181 Jul 10 15:54 config-4.17.5-200.fc28.x86_64
-rw-r--r--.  1 root root   196181 Jul 11 22:55 config-4.17.6-200.fc28.x86_64
drwx------.  4 root root     1024 Apr 30 20:41 efi
-rw-r--r--.  1 root root   184380 Jun 28 16:55 elf-memtest86+-5.01
drwxr-xr-x.  2 root root     3072 Apr 25 08:33 extlinux
drwx------.  6 root root     1024 Jul 18 09:17 grub2
-rw-------.  1 root root 73443963 Jul 17 17:34 initramfs-0-rescue-96a0978b628541b5a5eac546e886bbbf.img
-rw-------.  1 root root 24568432 Jul 17 17:35 initramfs-4.16.3-301.fc28.x86_64.img
-rw-------.  1 root root 23912693 Jul 17 19:53 initramfs-4.17.5-200.fc28.x86_64.img
-rw-------.  1 root root 23928800 Jul 18 09:17 initramfs-4.17.6-200.fc28.x86_64.img
drwxr-xr-x.  3 root root     1024 Apr 25 08:36 loader
drwx------.  2 root root    12288 Jul 17 17:23 lost+found
-rw-r--r--.  1 root root   182704 Jun 28 16:55 memtest86+-5.01
-rw-------.  1 root root  3888620 Apr 24 00:17 System.map-4.16.3-301.fc28.x86_64
-rw-------.  1 root root  4102839 Jul 10 15:54 System.map-4.17.5-200.fc28.x86_64
-rw-------.  1 root root  4103107 Jul 11 22:55 System.map-4.17.6-200.fc28.x86_64
-rwxr-xr-x.  1 root root  8286392 Jul 17 17:34 vmlinuz-0-rescue-96a0978b628541b5a5eac546e886bbbf
-rwxr-xr-x.  1 root root  8286392 Apr 24 00:18 vmlinuz-4.16.3-301.fc28.x86_64
-rw-r--r--.  1 root root      167 Apr 24 00:11 .vmlinuz-4.16.3-301.fc28.x86_64.hmac
-rwxr-xr-x.  1 root root  8540440 Jul 10 15:55 vmlinuz-4.17.5-200.fc28.x86_64 ...
(more)
edit retag flag offensive close merge delete

Comments

Please use code formatting in the future. Without it the output of df and other command line tools is unreadable. I've fixed your question for now.

genodeftest gravatar imagegenodeftest ( 2018-07-27 02:09:03 -0600 )edit

Can you please add the output of du -d 1 /boot ran as root and also of ls -al /boot? I guess there are some wrong files residing in /boot.

genodeftest gravatar imagegenodeftest ( 2018-07-27 02:13:11 -0600 )edit

Will do and Thanks for fixing....but how do I do "Code Formatting ?"

Orriginal gravatar imageOrriginal ( 2018-07-27 03:01:23 -0600 )edit
du -d 1 /boot
16139   /boot/grub2
4   /boot/loader
13  /boot/lost+found
18006   /boot/efi
1067    /boot/extlinux
223308  /boot
Orriginal gravatar imageOrriginal ( 2018-07-27 03:06:45 -0600 )edit

ls -al /boot
total 188106
dr-xr-xr-x.  7 root root     1024 Jul 18 09:17 .
dr-xr-xr-x. 18 root root     4096 Apr 25 08:33 ..
-rw-r--r--.  1 root root   196376 Apr 24 00:17 config-4.16.3-301.fc28.x8664
-rw-r--r--.  1 root root   196181 Jul 10 15:54 config-4.17.5-200.fc28.x8664
-rw-r--r--.  1 root root   196181 Jul 11 22:55 config-4.17.6-200.fc28.x86_64
drwx------.  4 root root     1024 Apr 30 20:41 efi
-rw-r--r--.  1 root root   184380 Jun 28 16:55 elf-memtest86+-5.01
drwxr-xr-x.  2 root root     3072

Orriginal gravatar imageOrriginal ( 2018-07-27 03:08:02 -0600 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2018-07-27 05:06:42 -0600

genodeftest gravatar image

Another option includes removing the rescue kernel.

You may also try removing one of the spare kernels by editing /etc/dnf/dnf.conf and adding or editing the line

installonly_limit=2

which will make dnf keep only two kernels.

edit flag offensive delete link more

Comments

Thank you so much for your Help - very grateful - have a good weekend

Orriginal gravatar imageOrriginal ( 2018-07-27 05:47:04 -0600 )edit

dnf update worked fine and rebooted with no errors..Thanks again

Orriginal gravatar imageOrriginal ( 2018-07-27 06:12:41 -0600 )edit
1

answered 2018-07-27 02:27:00 -0600

genodeftest gravatar image

updated 2018-07-27 02:28:12 -0600

If your /boot partition is really full (and not just containing some junk files, see my comment to your question), you may prefer removing unused kernel modules instead of resizing partitions.

For example if you do not need any network access in your initramfs (because your kernel does not boot from network and you don't mount network shares on boot, judging from your filesystem list), I'd rather remove network support from your initramfs. You can do that by adding

omit_dracutmodules+=" network kernel-network-modules ifcfg "

to a (new) file in /etc/dracut.conf.d. You may name that file omit-network.conf or similar. You will need to run dracut as root, maybe with option -f if you want to override an existing initramfs. lsinitrd /boot/initramfs-[…] | less will help you tell which files are included in the initramfs.

I also removed sound support from the initramfs like this:

omit_drivers+=" usb-storage uas ums-* snd soundcore snd-* "

and if you are sure you know what you are doing, you may also specify

hostonly=yes

which will omit any drivers from initramfs that don't exist on your system. This will break boot if you ever change hardware like your GPU!

Read man dracut and man dracut.conf for details.

edit flag offensive delete link more
0

answered 2018-07-27 02:15:13 -0600

genodeftest gravatar image

updated 2018-07-27 02:30:26 -0600

You may want to reboot your system from a live disk (such as the Fedora install medium on USB thumb drive). Then you can use tools like parted or gparted to resize the partitions. It may require downsizing your LVM volume so I would avoid doing that as it will take very long and may fail. If you insist in doing so, I highly recommend a full-disk backup like # dd if=/dev/sda of=/mnt/someDisk/someFolder/backup.img to make sure you can tolerate any errors in (g)parted.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-07-27 02:03:46 -0600

Seen: 503 times

Last updated: Jul 27 '18