openSUSE-12.2 mkinitrd

I think I got caught in a /bin to /usr/bin transition …

I cannot boot openSUSE-factory after upgrade. There where several outputs like
accessing `./usr/bin/sed’: Not a directory
when I have done a zypper dup - upgrade.
And now in a chroot I tried:

maci:/boot # mkinitrd
Kernel image:   /boot/vmlinuz-3.3.0-rc4-1-desktop
Initrd image:   /boot/initrd-3.3.0-rc4-1-desktop
Root device:    /dev/sda4 (mounted on / as ext4)
Kernel Modules: thermal_sys thermal processor fan pata_acpi scsi_dh scsi_dh_emc scsi_dh_rdac scsi_dh_hp_sw scsi_dh_alua pata_rz1000 ata_generic pata_hpt3x2n pata_netcell pata_serverworks pata_marvell pata_cs5530 pata_efar pcmcia_core pcmcia pata_pcmcia pata_pdc2027x pata_it8213 pata_radisys pata_sis sata_sis pata_opti pata_atiixp pata_optidma pata_pdc202xx_old pata_sil680 sata_qstor pata_ns87410 sata_sx4 pata_piccolo pata_jmicron pata_ninja32 sata_promise pata_via sata_svw pata_it821x acard-ahci pata_ali sata_via pata_rdc sata_sil pata_cmd640 pata_sc1200 pata_hpt37x pata_triflex ahci_platform pata_cs5520 pata_mpiix pata_amd sata_inic162x sata_vsc sata_uli pata_hpt3x3 pata_cmd64x pata_sl82c105 pata_atp867x pata_artop pata_arasan_cf pata_ns87415 sata_mv pata_sch pata_oldpiix pata_cypress pdc_adma sata_sil24 sata_nv pata_cs5536 pata_hpt366                      
mkdir: cannot create directory `./usr/bin': File exists
cp: accessing `./usr/bin/sed': Not a directory
mkdir: cannot create directory `./usr/bin': File exists
cp: accessing `./usr/bin/uname': Not a directory
Features:       acpi block usb resume.userspace resume.kernel
Bootsplash:     openSUSE (800x600)

I just remember having read on the systemd mailinglist that dracut as the new initrd tool is needed. I will try further using dracut, perhaps mkinitrd is an outdated tool …

[edit]zypper in dracut
Loading repository data…
Reading installed packages…
‘dracut’ not found in package names. Trying capabilities.
No provider of ‘dracut’ found.

Dracut is a Fedora-specific tool for now. What you need to do to fix your initrd is to edit /lib/mkinitrd/scripts/ Go to line 156 and you’ll see a list of paths. Add usr/bin and usr/sbin (notice the lack of preceding slash) to that list and rebuild your initrd.

Thank you luca_b,
this line seems to work:
mkdir -p $tmp_mnt/{usr/sbin,usr/bin,sbin,bin,etc,dev,proc,sys,root,config}

By the way, when I do a
grep sbin /lib/mkinitrd/scripts/*
I can see a lot of hard coded paths. Not that bad though if the softlinks in /bin do work…

Apropos dracut and openSUSE

As I understand - systemd will gonna be a much more systematical approach:
initrd as just a normal service will also have to provide a stop entry for system halt/reboot.

There also was a gentoo-dev discussion in january where the most top Gentoo maintainers hat favored a general upstream consolidation using the fedora approach of systemd, dracut, /usr

But in that discussion many didn’t want to understand that having the whole system read only possible under /usr is the original - decades old - Unix philosophy. I think this is what Red Hat wants to provide to their clients - the industry. That is the point when an extra partition of /usr makes real sense.

Is there a bug filed on this? We need to get mkinitrd fixed in Factory for this…

I just found

mkinitrd was updated today which resolved that bug.