Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#28937 - [mkinitcpio-busybox] mount applet not compiled into busybox

Attached to Project: Arch Linux
Opened by Ted Pavlic (tpavlic) - Friday, 16 March 2012, 02:20 GMT
Last edited by Dave Reisner (falconindy) - Friday, 16 March 2012, 04:05 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: After mkinitcpio-busybox was updated on March 14, I ran a mkinitcpio -p linux and rebooted. I was shocked to find that my system would not boot. In particular, the /init script generated several "command not found" errors every time it tried to mount. After further investigation, I found that busybox did not provide a mount. Doing a "strings busybox|grep mount" reveals only umount.

Consequently, filesystems cannot be mounted with this version of busybox.


Additional info:
* mkinitcpio-busybox 1.19.4-2


Steps to reproduce:

mkinitcpio -p linux
reboot

On reboot, file systems will fail to mount because "mount" will not be in the init file system. Moreover, if you try to symlink mount to busybox, you won't get mount functionality ("applet not found"). Doing a "strings busybox" reveals that no mount is present inside busybox.
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 16 March 2012, 04:05 GMT
Reason for closing:  Not a bug
Comment by Dave Reisner (falconindy) - Friday, 16 March 2012, 02:24 GMT
Expected? The base hook includes mount from util-linux.
Comment by Ted Pavlic (tpavlic) - Friday, 16 March 2012, 02:39 GMT
That may be what is intended, but the initfs that I have has no mount anywhere to be found. I'm stuck at a root shell with nothing mounted. If I run ./init manually, I get "command not found" errors for each line of /init that calls out to mount.

Something changed on March 14 that removed mount from the initfs. Maybe the problem is in mkinitcpio and not mkinitcpio-busybox?
Comment by Dave Reisner (falconindy) - Friday, 16 March 2012, 02:49 GMT
I really can't see how that's possible given a _normal_ upgrade path. mkinitcpio-busybox is a dep of mkinitcpio, which is a dep of the kernel package. Under no reasonable circumstances should pacman have left you in a situation where mount does not exist. mkinitcpio has been including mount from util-linux since 0.8.0 (released 11/25/11) -- and included in such a way that it's been overriding busybox's mount.

Feel free to post your /var/log/pacman.log.
Comment by Ted Pavlic (tpavlic) - Friday, 16 March 2012, 02:59 GMT
At the moment, I cannot get to my /var/log/pacman.log because I have no mount binary to get to it. I'm downloading a rescue image now.

I was able to shell into a remote machine running Arch Linux ARM. I can verify that mkinitcpio-busybox 1.19.2-1 on that system has mount included within it (that is "strings /lib/initcpio/busybox|grep mount" shows me that both mount and umount are included, whereas "strings busybox" on my dead system only shows me umount).

All I know is that last night, I did a

pacman -Syu

and I noticed that a new mkinitcpio was downloaded. I also noticed new hooks were added because mkinitcpio.conf was updated. I merged the changes in from mkinitcpio.conf.pacnew and ran

mkinitcpio -p linux

which completed without any errors. I shut the machine down last night. When I turned it back on tonight, I found myself stuck in the middle of the /init script because mount wasn't found.
Comment by Ted Pavlic (tpavlic) - Friday, 16 March 2012, 03:30 GMT
After booting the rescue image, chrooting to the system, and re-running

mkinitcpio -p linux

I was able to verify (with lsinitcpio) that mount was included in the new initramfs. I then rebooted and the system came up.

Could mkinitcpio -p linux have had an error copying files last night but not report it during the base hook?
Comment by Dave Reisner (falconindy) - Friday, 16 March 2012, 03:34 GMT
If there was a problem locating the binary, you would have seen an error (file not found, line 304 of /usr/lib/initcpio/functions). If there was a problem copying it to the staging area, you would have seen an error (line 93 of /usr/lib/initcpio/functions). It's possible that if there was a problem with bsdcpio writing the file to the archive, there'd be an error for that as well (line 394 of /usr/bin/mkinitcpio). The whole process is quite transparent. I would have been interested to see the bad image, but I don't suppose you've kept it...

Loading...