FS#8448 - mkinitcpio & pacman generate empty images

Attached to Project: Arch Linux
Opened by Gianluca Romanin (J_Zar) - Monday, 29 October 2007, 08:33 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 14 December 2007, 22:53 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Architecture All
Severity Critical
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

"sudo pacman -Syu" upgrade packages ok. Upgrading kernel mcinitcpio generates empty images. I have this issue after a fresh and new install.

"ls -lah /boot" after the problem with "sudo pacman -Syu":

drwxr-xr-x 3 root root 4,0K 29 ott 08:22 .
drwxr-xr-x 22 root root 4,0K 29 ott 08:22 ..
-rw-r--r-- 1 root root 1001K 27 ott 10:53 System.map26
-rw-r--r-- 1 root root 5,0K 1 mar 2007 diag1.img
drwxr-xr-x 2 root root 4,0K 24 ott 21:37 grub
-rw-r--r-- 1 root root 68K 29 ott 08:22 kconfig26
-rw-r--r-- 1 root root 20 29 ott 08:22 kernel26-fallback.img
-rw-r--r-- 1 root root 20 29 ott 08:22 kernel26.img
-rw-r--r-- 1 root root 1,9M 27 ott 10:53 vmlinuz26





Additional info:

kernel: 26.23.1-5
Pacman v3.0.6 - libalpm v1.0.0


Steps to reproduce:



---------------------------
pacman output:

(21/26) aggiornamento in corso di kernel26 [###################################] 100%
>>>
>>> If you use the LILO bootloader, you should run 'lilo' before rebooting.
>>>
>>> Updating module dependencies. Please wait ...
>>> MKINITCPIO SETUP
>>> ----------------
>>> If you use LVM2, Encrypted root or software RAID,
>>> Ensure you enable support in /etc/mkinitcpio.conf .
>>> More information about mkinitcpio setup can be found here:
>>> http://wiki.archlinux.org/index.php/Mkinitcpio

>>> Generating initial ramdisk, using mkinitcpio. Please wait...
==> Building image "default"
==> Running command: /sbin/mkinitcpio -k 2.6.23-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
/lib/initcpio/install/autodetect: line 14: mdadm: command not found
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usbinput]
:: Parsing hook [keymap]
:: Parsing hook [filesystems]
:: Generating module dependencies
/sbin/mkinitcpio: line 226: depmod: command not found
ERROR: file '/tmp/lib/modules/2.6.23-ARCH/modules.dep' does not exist
ERROR: file '/tmp/lib/modules/2.6.23-ARCH/modules.alias' does not exist
ERROR: file '/tmp/lib/modules/2.6.23-ARCH/modules.symbols' does not exist
/sbin/mkinitcpio: line 235: gen_init_cpio: command not found
:: Generating image '/boot/kernel26.img'...SUCCESS
==> SUCCESS
==> Building image "fallback"
==> Running command: /sbin/mkinitcpio -k 2.6.23-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [ide]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usbinput]
:: Parsing hook [raid]
:: Parsing hook [filesystems]
:: Generating module dependencies
/sbin/mkinitcpio: line 226: depmod: command not found
ERROR: file '/tmp/lib/modules/2.6.23-ARCH/modules.dep' does not exist
ERROR: file '/tmp/lib/modules/2.6.23-ARCH/modules.alias' does not exist
ERROR: file '/tmp/lib/modules/2.6.23-ARCH/modules.symbols' does not exist
/sbin/mkinitcpio: line 235: gen_init_cpio: command not found
:: Generating image '/boot/kernel26-fallback.img'...SUCCESS
==> SUCCESS
(22/26) aggiornamento in corso di libldap [###################################] 100%
(23/26) aggiornamento in corso di lm_sensors [###################################] 100%
(24/26) aggiornamento in corso di neon [###################################] 100%
(25/26) aggiornamento in corso di spamassassin [###################################] 100%
=> If you are upgrading from SpamAssassin 2.x, 3.0.x or 3.1.x, please see
=> http://svn.apache.org/repos/asf/spamassassin/tags/spamassassin_current_release_3.2.x/UPGRADE
(26/26) aggiornamento in corso di syslog-ng [###################################] 100%
--------------------------------------------------

after "sudo su -":

[root@Surprise ~]# /sbin/mkinitcpio -k 2.6.23-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usbinput]
:: Parsing hook [keymap]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26.img'...SUCCESS
[root@Surprise ~]# /sbin/mkinitcpio -k 2.6.23-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [ide]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usbinput]
:: Parsing hook [raid]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26-fallback.img'...SUCCESS


This task depends upon

Closed by  Aaron Griffin (phrakture)
Friday, 14 December 2007, 22:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed. No response to request for confirmation.
Comment by Jan de Groot (JGC) - Monday, 29 October 2007, 09:32 GMT
Scripts should use full paths to (/usr)/sbin, they're not always in the path as shown in this bugreport.
Comment by Gianluca Romanin (J_Zar) - Monday, 29 October 2007, 10:02 GMT
So this is a problem of the PKGBUILD???
I always did the upgrade with "sudo" in the past. From 6 months or so I am not able to upgrade correctly the kernel.
Comment by Roman Kyrylych (Romashka) - Monday, 29 October 2007, 16:06 GMT
hm, probably the same issue was in this case:  FS#7841 
Comment by Gianluca Romanin (J_Zar) - Monday, 29 October 2007, 18:52 GMT
yep. The same.
Comment by Thomas Bächler (brain0) - Monday, 29 October 2007, 21:20 GMT
This is an issue with sudo and unclean mkinitcpio. As a workaround, run pacman from a full shell (run sudo su - or su -, then pacman). Then /sbin and /usr/sbin are in the path.

I should get this fixed this week, but right now I would create more bugs than I could fix (tired, you know).
Comment by Thomas Bächler (brain0) - Wednesday, 31 October 2007, 11:02 GMT
Bug should be fixed in the testing repository, please confirm.

Loading...