Bug 641513

Summary: mkinitrd does not create initrd after package uninstall
Product: [openSUSE] openSUSE 11.3 Reporter: Michal Svec <msvec>
Component: BasesystemAssignee: Forgotten User b5BnQSUi71 <forgotten_b5BnQSUi71>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: erwinl, samba-maintainers, toganm
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs

Description Michal Svec 2010-09-23 22:05:16 UTC
If I uninstall cifs-utils, it does not clean up /lib/mkinitrd/setup/
symlink which is causing mkinitrd to fail to create initrd which in
turn results in unbootable system after update.

This particular bug might be in cifs-utils.rpm (to not call mkinitrd
setup or so), but mkinitrd should survive dangling symlinks and create
the initrd anyways.

bash# rpm -e cifs-utils

bash# zypper patch

The following NEW patch is going to be installed:
  kernel 

The following package is going to be upgraded:
  kernel-default 

1 package to upgrade.
Overall download size: 31.9 MiB. After the operation, additional 1.0 KiB will be used.
Continue? [y/n/?] (y): 
Retrieving package kernel-default-2.6.34.7-0.3.1.x86_64 (1/1), 31.9 MiB (128.2 MiB unpacked)
Retrieving delta: ./rpm/x86_64/kernel-default-2.6.34.7-0.2.2_0.3.1.x86_64.delta.rpm, 8.7 MiB
Retrieving: kernel-default-2.6.34.7-0.2.2_0.3.1.x86_64.delta.rpm [done (1.1 MiB/s)]
Applying delta: ./kernel-default-2.6.34.7-0.2.2_0.3.1.x86_64.delta.rpm [done]
Installing: kernel-default-2.6.34.7-0.3.1 [done]
Additional rpm output:
egrep: /lib/mkinitrd/setup/81-cifs.sh: No such file or directory

Kernel image:   /boot/vmlinuz-2.6.34.7-0.3-default
Initrd image:   /boot/initrd-2.6.34.7-0.3-default
cp: cannot stat `/usr/lib64/libpng12.so.0': No such file or directory
Root device:    /dev/md1 (mounted on / as ext3)
/sbin/mkinitrd: line 477: /lib/mkinitrd/setup/81-cifs.sh: No such file or directory
Script /lib/mkinitrd/setup/81-cifs.sh failed!
There was an error generating the initrd (1)

Warning: One of installed patches requires reboot of your machine. Reboot as soon as possible.


Now, this is very wrong, /boot/initrd points to initrd-2.6.34.7-0.3-default
which does not exists and therefore rebooting renders the server unusable.
/lib/mkinitrd/setup/81-cifs.sh points to ../scripts/setup-cifs.sh, which
does not exists any more.

Surprisingly, running mkinitrd now creates the initrd just fine:

bash# mkinitrd
egrep: /lib/mkinitrd/setup/81-cifs.sh: No such file or directory
Scanning scripts ...
Resolve dependencies ...
Install symlinks in /lib/mkinitrd/setup ...
Install symlinks in /lib/mkinitrd/boot ...

Kernel image:   /boot/vmlinuz-2.6.34.7-0.3-default
Initrd image:   /boot/initrd-2.6.34.7-0.3-default
cp: cannot stat `/usr/lib64/libpng12.so.0': No such file or directory
Root device:    /dev/md1 (mounted on / as ext3)
Kernel Modules: scsi_mod libata ata_piix ata_generic thermal_sys processor thermal fan pata_piccolo pata_acpi pata_hpt366 pata_sch sata_inic162x pata_ns87415 pata_optidma pata_atiixp pata_netcell pata_atp867x pata_it821x ahci pata_rz1000 pata_rdc pata_hpt3x3 sata_promise sata_via pata_cs5530 pata_efar pata_cs5520 pata_sis pata_via sata_vsc pata_it8213 pata_ns87410 pata_opti pata_serverworks pata_cmd640 pata_ali pata_amd pata_jmicron sata_uli pata_radisys pata_oldpiix sata_qstor pata_mpiix pata_hpt3x2n pata_cmd64x sata_svw sata_sis pata_pdc202xx_old pata_triflex pata_sc1200 pata_ninja32 pata_sil680 sata_sx4 sata_mv sata_sil24 pata_sl82c105 sata_sil pdc_adma sata_nv pata_cypress pata_artop pcmcia_core pcmcia pata_pcmcia pata_pdc2027x pata_marvell pata_hpt37x sd_mod usbcore mmc_core ssb ohci-hcd ehci-hcd uhci-hcd usbhid raid0 raid1 raid10 async_tx async_memcpy xor async_xor raid6_pq async_pq async_raid6_recov raid456 
Features:       block usb md resume.userspace resume.kernel
Bootsplash:     openSUSE (1024x768)
33318 blocks

Now /boot/initrd-2.6.34.7-0.3-default is created just fine.
Comment 1 Michal Svec 2010-09-23 22:06:43 UTC
Created attachment 391327 [details]
y2logs
Comment 2 Michal Marek 2010-11-05 15:28:36 UTC
cifs-utils does not run /sbin/mkinitrd_setup in %postun.
Comment 3 Michal Marek 2010-12-07 13:04:45 UTC
*** Bug 627102 has been marked as a duplicate of this bug. ***
Comment 4 Togan Muftuoglu 2010-12-07 13:44:23 UTC
I have a corrected cifs-utils package at home:toganm:branches:network:samba:STABLE/cifs-utils and have submitted a request with #55019 to network:samba:STABLE
Comment 5 Forgotten User b5BnQSUi71 2010-12-08 05:48:29 UTC
Togan: Thanks for providing the fix. Your request has been reviewed and accepted. Please stick to the Changelog format communicated to you for further requests.

Your contribution to openSUSE is appreciated much!
Comment 6 Forgotten User b5BnQSUi71 2010-12-08 06:09:40 UTC
I have also updated openSUSE wiki with the preferred Changelog message format:

http://en.opensuse.org/openSUSE:Bugreport_Samba#Contributions_to_cifs-utils_package
Comment 7 Forgotten User b5BnQSUi71 2010-12-14 05:01:04 UTC
Marking this RESOLVED.