You are not logged in.

#1 2011-07-26 22:25:32

rusma
Member
From: Ås, Norway
Registered: 2009-11-01
Posts: 110

[Solved] Strange errors when going to testing/linux and back again

Hello.

I tried installing testing/linux today and it seems mkinitcpio will not compile the kernel correctly. I get these messages when installing testing/linux first time:

( 7/13) installing linux                                                                                     [################################################################] 100%
>>> Updating module dependencies. Please wait ...
>>> Generating initial ramdisk, using mkinitcpio.  Please wait...
==> Building image from preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 3.0.0-ARCH
cp: target `/tmp/mkinitcpio.JooYHJ/root' is not a directory
==> Generating module dependencies
WARNING: Couldn't open directory /tmp/mkinitcpio.JooYHJ/root/lib/modules/3.0.0-ARCH: No such file or directory
FATAL: Could not open /tmp/mkinitcpio.JooYHJ/root/lib/modules/3.0.0-ARCH/modules.dep.temp for writing: No such file or directory
rm: cannot remove `/tmp/mkinitcpio.JooYHJ/root/lib/modules/3.0.0-ARCH/modules.!(dep.bin|alias.bin|symbols.bin)': No such file or directory
==> Creating gzip initcpio image: /boot/initramfs-linux.img
/sbin/mkinitcpio: line 343: pushd: /tmp/mkinitcpio.JooYHJ/root: No such file or directory

gzip: stdout: No space left on device
/sbin/mkinitcpio: line 346: popd: directory stack empty
==> ERROR: Image generation FAILED: find reported an error

==> Building image from preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 3.0.0-ARCH
cp: target `/tmp/mkinitcpio.ukWthA/root' is not a directory
==> Generating module dependencies
WARNING: Couldn't open directory /tmp/mkinitcpio.ukWthA/root/lib/modules/3.0.0-ARCH: No such file or directory
FATAL: Could not open /tmp/mkinitcpio.ukWthA/root/lib/modules/3.0.0-ARCH/modules.dep.temp for writing: No such file or directory
rm: cannot remove `/tmp/mkinitcpio.ukWthA/root/lib/modules/3.0.0-ARCH/modules.!(dep.bin|alias.bin|symbols.bin)': No such file or directory
==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
/sbin/mkinitcpio: line 343: pushd: /tmp/mkinitcpio.ukWthA/root: No such file or directory

gzip: stdout: No space left on device
/sbin/mkinitcpio: line 346: popd: directory stack empty
==> ERROR: Image generation FAILED: find reported an error

Optional dependencies for linux
    crda: to set the correct wireless channels of your country
( 8/13) installing linux-headers                                                                             [################################################################] 100%

Then I tried to go back to kernel26, but the mkinitcpio process seemed to hang for a very long time, so I interrupted it. Then realized I should have installed the old kernel headers. Did that. Edited the mkinitcpio.conf to use xz compression. Then tried installing again the good 'ol kernel26. Here is the ouput of that:

root@rskolepc /home/rasmus # pacman -S kernel26                                                                                                                           [658/1039]
warning: kernel26-2.6.39.3-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): kernel26-2.6.39.3-1 [36.87 MB]

Total Download Size:    0.00 MB
Total Installed Size:   55.94 MB

Proceed with installation? [Y/n] 
(1/1) checking package integrity                                                                             [################################################################] 100%
(1/1) checking for file conflicts                                                                            [################################################################] 100%
(1/1) upgrading kernel26                                                                                     [################################################################] 100%
>>> 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:
>>> [url]http://wiki.archlinux.org/index.php/Mkinitcpio[/url]

>>> Generating initial ramdisk, using mkinitcpio.  Please wait...
==> Building image from preset: 'default'
  -> -k 2.6.39-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
==> Starting build: 2.6.39-ARCH
cp: target `/tmp/mkinitcpio.quMa8p/root' is not a directory
==> Generating module dependencies
WARNING: Couldn't open directory /tmp/mkinitcpio.quMa8p/root/lib/modules/2.6.39-ARCH: No such file or directory
FATAL: Could not open /tmp/mkinitcpio.quMa8p/root/lib/modules/2.6.39-ARCH/modules.dep.temp for writing: No such file or directory
rm: cannot remove `/tmp/mkinitcpio.quMa8p/root/lib/modules/2.6.39-ARCH/modules.!(dep.bin|alias.bin|symbols.bin)': No such file or directory
==> Creating gzip initcpio image: /boot/kernel26.img
/sbin/mkinitcpio: line 343: pushd: /tmp/mkinitcpio.quMa8p/root: No such file or directory

gzip: stdout: No space left on device
/sbin/mkinitcpio: line 346: popd: directory stack empty
==> ERROR: Image generation FAILED: find reported an error

==> Building image from preset: 'fallback'
  -> -k 2.6.39-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
==> Starting build: 2.6.39-ARCH
cp: target `/tmp/mkinitcpio.givPBr/root' is not a directory
==> Generating module dependencies
WARNING: Couldn't open directory /tmp/mkinitcpio.givPBr/root/lib/modules/2.6.39-ARCH: No such file or directory
FATAL: Could not open /tmp/mkinitcpio.givPBr/root/lib/modules/2.6.39-ARCH/modules.dep.temp for writing: No such file or directory
rm: cannot remove `/tmp/mkinitcpio.givPBr/root/lib/modules/2.6.39-ARCH/modules.!(dep.bin|alias.bin|symbols.bin)': No such file or directory
==> Creating gzip initcpio image: /boot/kernel26-fallback.img
/sbin/mkinitcpio: line 343: pushd: /tmp/mkinitcpio.givPBr/root: No such file or directory

gzip: stdout: No space left on device
/sbin/mkinitcpio: line 346: popd: directory stack empty
==> ERROR: Image generation FAILED: find reported an error

/boot partition seems to be full:

# df -h /boot
Filesystem                                              Size  Used Avail Use% Mounted on
/dev/sda3                                                23M   23M     0 100% /boot

This is what is immediately inside /boot

# ls -la /boot
total 5327
drwxr-xr-x  4 root root    1024 Jul 27 00:20 ./
drwxr-xr-x 23 root root    4096 Jul 26 23:22 ../
drwxr-xr-x  2 root root    1024 Nov 25  2010 grub/
-rw-r--r--  1 root root 1425408 Jul 27 00:21 kernel26.img
drwx------  2 root root   12288 Apr 14  2010 lost+found/
-rw-r--r--  1 root root 1704703 Jul  9 15:00 System.map26
-rw-r--r--  1 root root 2305152 Jul  9 15:00 vmlinuz26
# du -sh /boot/*
384K    /boot/grub
5.3M    /boot/kernel26.img
12K     /boot/lost+found
1.7M    /boot/System.map26
2.2M    /boot/vmlinuz26

Seems to be something bad lurking around. It seems nothing of value to the boot is inside /boot. I am reluctant to reboot until this is solved. I've got a tummy ache thinking of this ...

Last edited by rusma (2011-07-27 16:15:39)

Offline

#2 2011-07-27 01:41:34

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,109
Website

Re: [Solved] Strange errors when going to testing/linux and back again

It appears that not only are you out of room on /boot, but in /tmp as well.

Can you post your /etc/mkinitcpio.conf? Something is not right here... your build contains zero hooks.

Last edited by falconindy (2011-07-27 01:56:44)

Offline

#3 2011-07-27 15:59:40

rusma
Member
From: Ås, Norway
Registered: 2009-11-01
Posts: 110

Re: [Solved] Strange errors when going to testing/linux and back again

falconindy wrote:

It appears that not only are you out of room on /boot, but in /tmp as well.

Can you post your /etc/mkinitcpio.conf? Something is not right here... your build contains zero hooks.

Thanks for giving some hints. This is /tmp:

# du -sh /tmp
1.4M    /tmp
# df -h /tmp 
Filesystem                                              Size  Used Avail Use% Mounted on
/dev/disk/by-uuid/15a03474-1ef7-4270-804b-44844311ab0d   12G  6.3G  5.1G  56% /

And this is my /etc/mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="intel_agp i915"

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run first, so it may be used to
# override the actual binaries used in a given hook.
# (Existing files are NOT overwritten if already added)
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
#    FILES="/etc/modprobe.d/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
##   This is identical to the above, except the old ide subsystem is
##   used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev pata mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
#HOOKS="base udev autodetect pata scsi sata filesystems usbinput"

# COMPRESSION
# Use this to compress the initramfs image. With kernels earlier than
# 2.6.30, only gzip is supported, which is also the default. Newer kernels
# support gzip, bzip2 and lzma. Kernels 2.6.38 and later support xz
# compression.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

I turned off xz compression yesterday — no difference. I haven't edited mkinitcpio.conf for ages therefore the intel modules may not be needed anymore. Plus, my /boot partition is only 25M large as recommended more than sufficent from the official Arch install guide.

Offline

#4 2011-07-27 16:03:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Strange errors when going to testing/linux and back again

#HOOKS="base udev autodetect pata scsi sata filesystems usbinput"

No hooks indeed. Why did you disable them?

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.

Last edited by karol (2011-07-27 16:04:38)

Offline

#5 2011-07-27 16:14:25

rusma
Member
From: Ås, Norway
Registered: 2009-11-01
Posts: 110

Re: [Solved] Strange errors when going to testing/linux and back again

karol wrote:
#HOOKS="base udev autodetect pata scsi sata filesystems usbinput"

No hooks indeed. Why did you disable them?

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.

Hey, thanks man smile HOOKS are really important. Can't remember ever uncommenting it, but it seems I did. Deleted the scsi and pata tags since I use a sata drive. compiled with no errors. Best ever. Went back to kernel26 and moved testing beneath core in my pacman.conf. Marking this as solved.

Offline

#6 2011-07-27 17:38:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,109
Website

Re: [Solved] Strange errors when going to testing/linux and back again

Still, I don't like that mkinitcpio explodes like this without giving you any real feedback. The underlying problem is that $TMPDIR/root is never explicitly created. Running just about any will cause it to be created. I'll put this on my todo list.

Offline

#7 2011-07-28 11:33:20

rusma
Member
From: Ås, Norway
Registered: 2009-11-01
Posts: 110

Re: [Solved] Strange errors when going to testing/linux and back again

falconindy wrote:

I'll put this on my todo list.

Good thing smile

Offline

Board footer

Powered by FluxBB