Closed bocekm closed 7 years ago
@pirat89 The message you reported is not the one I was updating. The "insufficient disk space: /boot needs 16M more free space"
is actually a message from yum when "testing upgrade transaction". I can't influence this message.
To test my message, leave just enough space to let the tool download the images without problem. Then if the available space is less than 50MB, my message pops up.
Refrain from using --cleanup-post option to be able to see what has been downloaded and what not.
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
...
tmpfs 939M 0 939M 0% /dev/shm
/dev/vda1 477M 367M 85M 82% /boot
[root@localhost ~]# redhat-upgrade-tool-cli --cleanup-post --addrepo --instrepo=http://example.com/RHEL-7/7.3/Server/x86_64/os --network 7.3
...
Not enough space. /boot/ needs additional 18 MiB.
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/vda1 477M 420M 32M 94% /boot
In the second df listing, you can see the effect of downloading initramfs-redhat-upgrade-tool.img (~50M) and vmlinuz-redhat-upgrade-tool kernel (~5M). The minimum of 50 MiB we require is for the RHEL 7 kernel package. Installation of this package in the initramdisk phase copies ~42MB worth of data to /boot.
Installation of kernel and grub during the upgrade requires certain amount of space in /boot. If that space is not available during the upgrade stage after the reboot, the upgrade fails. This update adds a check of the available space left after the initramfs and kernel are downloaded. 50 MB should be enough even with reserve.
Related: