FS#29420 - chroot: failed to run command `/sbin/mkinitcpio': No such file or directory"

Attached to Project: Release Engineering
Opened by Catalin (acan) - Friday, 13 April 2012, 05:29 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:53 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To Dieter Plaetinck (Dieter_be)
Architecture All
Severity High
Priority Normal
Reported Version testbuild (specify!)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: Arch fails to install.

It is not possible to finish the "Configure system" step because it gives the following error:

"MKINITCPIO FAILED - SYSTEM MAY NOT BOOT
STARTING mkinitcpio . Executing chroot /mnt /sbin/mkinitcpio -p linux >>/var/log/aif/mkinitcpio.log 2>&1\n
chroot: failed to run command `/sbin/mkinitcpio': No such file or directory"

I think it is having something with the fresh mkinitcpio update (0.8.7-1).
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:53 GMT
Reason for closing:  Deferred
Comment by Pierre Schmitz (Pierre) - Friday, 13 April 2012, 06:37 GMT
It is /usr/bin/mkinitcpio not /sbin/mkinitcpio
Comment by Daniel Wallace (gtmanfred) - Friday, 13 April 2012, 07:13 GMT
Apparently the install should continue? and if it makes it to the end you should be able to boot
Comment by Catalin (acan) - Friday, 13 April 2012, 07:33 GMT
@Daniel

It says that I can continue on my own risk and I can install the grub, so yes, I can boot.

It seems that the installation from the cd goes fine, and this make me think that the newer related packages, from remote repos, have some problems.
Comment by Massimo Zaniboni (massimo.zaniboni) - Friday, 13 April 2012, 09:29 GMT
I resolved in this way:

* I followed /arch/setup until the error.

* I opened a separated virtual shell, without closing the installation program

* I created a sane environment for chroot.

cd /mnt
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/

as described in Chroot ArchWiki.

* I entered as chroot

chroot /mnt /bin/bash

* I performed

/sbin/mkinitcpio -p linux

without any error. In my initial tests this command complainted about missing /dev, so I suspect this is the reason of the problem.

I open again the virtual shell with the installer (ctrl-alt-f1). I says that it is all ok also if its mkinitcpio command was failed, and I execute the last step of the installation.

Comment by Dieter Plaetinck (Dieter_be) - Friday, 13 April 2012, 09:31 GMT
the fix is easy i think, just in /usr/lib/aif/core/libs/lib-software.sh "/sbin/mkinitcpio" should become "mkinitcpio", i'll submit a patch later.
Comment by Catalin (acan) - Friday, 13 April 2012, 09:47 GMT
Looking on Arch Wiki I found "mkinitcpio -p linux" very useful, my modules are loaded now, and I hope that I will not get any further problems with that.
Comment by Eric (zebulon) - Friday, 13 April 2012, 19:29 GMT
Actually, this is because the new mkinitcpio package does not create the symlink in /sbin.

See this changelog:
https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/mkinitcpio&id=8431419a99d509c4d7fd4b00f9536aa972450169

- ln -s /usr/bin/mkinitcpio "$pkgdir/sbin/mkinitcpio"

Is that normal? If not, this should be assigned to Dave Reisner.

PS: Massimo, are you sure you used "/sbin/mkinitcpio" ? This is surprising, since the symlink is not created anymore.
Comment by Dave Reisner (falconindy) - Friday, 13 April 2012, 23:13 GMT
mkinitcpio is fixed in core. We should still get an AIF/ISO release out so I can get rid of this stupid symlink...
Comment by Eric (zebulon) - Saturday, 14 April 2012, 10:42 GMT
Thanks Dave. Do you know if the symlink is required by other programs/scripts?
Comment by Dieter Plaetinck (Dieter_be) - Tuesday, 17 April 2012, 21:22 GMT
https://github.com/Dieterbe/aif/commit/07aacb72d27e12521025ec346b978a079d4ee05e this needs testing! will be available on a testbuild from apr. 18 and onwards.

Loading...