[Bug 825904] New: Kernel Packaging: Update Bootloader if&only if kernel installs OK
https://bugzilla.novell.com/show_bug.cgi?id=825904 https://bugzilla.novell.com/show_bug.cgi?id=825904#c0 Summary: Kernel Packaging: Update Bootloader if&only if kernel installs OK Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: joschibrauchle@gmx.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 On a system with very limited hard disk space, the following situation occured: 1) Kernel update is installed via zypper, but harddisk is full:
From /var/log/zypp/history:
# 2013-06-20 00:05:07 kernel-desktop-3.7.10-1.16.1.x86_64.rpm installed ok # Additional rpm output: # # Kernel image: /boot/vmlinuz-3.7.10-1.16-desktop # Initrd image: /boot/initrd-3.7.10-1.16-desktop # Root device: /dev/system/slash (mounted on / as ext4) # /usr device: /dev/system/usr (mounted on /usr as ext4) # Resume device: /dev/system/swap # Kernel Modules: thermal_sys thermal processor fan dm-mod dm-snapshot scsi_dh scsi_dh_hp_sw scsi_dh_rdac scsi_dh_alua scsi_dh_emc xhci-hcd hid-logitech-dj linear # Features: acpi dm plymouth block usb lvm2 resume.userspace resume.kernel # cp: writing '/boot/initrd-3.7.10-1.16-desktop': No space left on device # cp: failed to extend '/boot/initrd-3.7.10-1.16-desktop': No space left on device # Failed to install initrd # There was an error generating the initrd (8) # 2013-06-20 00:05:07|install|kernel-desktop|3.7.10-1.16.1|x86_64||LNT:OpenSUSE12.3 OSS Update LNT|f8ac7830bb425fbc79ac4b2b5760385c4fa6796d4b4b36dd3106bd78b6458672| ------------- Problem: Why does it say "kernel-desktop-3.7.10-1.16.1.x86_64.rpm installed ok" when clearly the initrd could not be created? 2) The bootloader is updated to default to the new kernel. See /boot/grub/menu.lst: ------------- default 0 timeout 2 ...<cropped options> ###Don't change this comment - YaST2 identifier: Original name: linux### title Desktop -- openSUSE 12.3 - 3.7.10-1.16 root (hd0,0) kernel /vmlinuz-3.7.10-1.16-desktop <cropped options> initrd /initrd-3.7.10-1.16-desktop ------------- Problem: System is unbootable (with this kernel) as initrd not working Reproducible: Always Steps to Reproduce: 1. Update kernel with not enough HD space available 2. Reboot Actual Results: System tries to boot new kernel although initrd missing Expected Results: RPM should notice that mkinitrd failed. Then, bootloader should not be updated and package installation should fail. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=825904 https://bugzilla.novell.com/show_bug.cgi?id=825904#c1 Joschi Brauchle <joschibrauchle@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kernel-maintainers@forge.pr |mmarek@suse.com |ovo.novell.com | --- Comment #1 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-06-20 05:43:45 UTC --- So it looks like 1) the RPM post-scriptlet: calls 2) /usr/lib/module-init-tools/weak-modules2 --add-kernel ...: which then in turn calls 3) /sbin/mkinitrd: which calls 4) /lib/mkinitrd/setup/93-done.sh: which fails to copy due to no space in device left. Unfortunately, 4) leaves the corrupted initrd lying around instead of removing it, but exits with 8, which 3) uses as an exit code as well, signaling an error. 2) does not check the exit code so installation of the RPM succeeds. 1) checks for the existance of an initrd file and finds the corrupted one, then adds the new kernel as default to the bootloader. => Voila, system does not boot :) Another note: inside the RPM prescript, there is a check if more than 20MB of free space is available on the device before installation. As the initrd of OS12.3 is rather large (see bnc #801883), this value should probably be raised to 40+ MB at least, which would be a (not really nice) workaround. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com