Debian Bug report logs - #627592
/usr/sbin/mkinitramfs: copying all files requires too big /tmp - fails on e.g low memory systems using tmpfs

version graph

Package: initramfs-tools; Maintainer for initramfs-tools is Debian kernel team <debian-kernel@lists.debian.org>; Source for initramfs-tools is src:initramfs-tools.

Reported by: Bjørn Mork <bjorn@mork.no>

Date: Sun, 22 May 2011 11:06:16 UTC

Severity: normal

Found in version initramfs-tools/0.99

Fixed in version 0.100

Done: maximilian attems <max@stro.at>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#627592; Package initramfs-tools. (Sun, 22 May 2011 11:06:19 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bjørn Mork <bjorn@mork.no>:
New Bug report received and forwarded. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Sun, 22 May 2011 11:06:22 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Bjørn Mork <bjorn@mork.no>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/sbin/mkinitramfs: copying all files requires too big /tmp - fails on e.g low memory systems using tmpfs
Date: Sun, 22 May 2011 13:02:35 +0200
Package: initramfs-tools
Version: 0.99
Severity: important
File: /usr/sbin/mkinitramfs

The new "copy all files" policy makes update-initramfs fail on my virtual machines
with 128MB RAM and /tmp on a default (20%) tmpfs:

cp: writing `/tmp/mkinitramfs_G8WN9F/bin/sh.shared': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/bin/sleep': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/bin/sync': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/bin/true': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/bin/umount': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/bin/uname': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/bin/zcat': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F/lib/klibc-r1_A6R6EwMsdze5h5xz93JiNuoM.so': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F//lib/modules/2.6.39-1-amd64/kernel/drivers/thermal/thermal_sys.ko': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F//lib/modules/2.6.39-1-amd64/kernel/drivers/acpi/fan.ko': No space left on device
cp: writing `/tmp/mkinitramfs_G8WN9F//lib/modules/2.6.39-1-amd64/kernel/drivers/acpi/thermal.ko': No space left on device
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-2.6.39-1-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.39-1-amd64.postinst line 771.
dpkg: error processing linux-image-2.6.39-1-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1


So my /tmp filesystem isn't very big, but this is the first time that has been
a problem:

frtest4:~# mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=20%,mode=1777)
frtest4:~# df -h /tmp/
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                  24M     -     -   -  /tmp
frtest4:~# du -s /tmp/*
0       /tmp/mkinitramfs_6QnkFf
24444   /tmp/mkinitramfs_G8WN9F
0       /tmp/mkinitramfs-OL_6YFwE3
0       /tmp/mkinitramfs-OL_OLlr3h
0       /tmp/PajnAm


I don't know if there are exact requirements for the size of /tmp, but until someone
shows me documentation stating otherwise I will claim that any script or binary 
requiring more than 10MB free space on /tmp, without any sane fallback mechanism, is
seriously buggy.

I see the advantage of the new "copy all files" policy wrt including symlinks in the
generated initramfs, but I believe this means it has to be generated somewhere with 
more available space - at least as a fallback on failure.  Using /tmp by default is
probably OK as long as there is an automatic fallback to something safer.  

I suggest using /var/spool/initramfs


Bjørn



-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 9.3M May 14 07:39 /boot/initrd.img-2.6.38-2-amd64
-- /proc/cmdline
initrd=/initrd.img root=UUID=0d3e856e-8f99-4b3e-8d4f-37a65486930b ro console=tty0 console=ttyS0,9600n8 BOOT_IMAGE=/vmlinuz 

-- resume
# RESUME=/dev/hda5
RESUME='UUID=70ab49d2-2ac0-47ee-b17a-2fb7258db37f'
-- /proc/filesystems
	ext3

-- lsmod
Module                  Size  Used by
nfsd                  258504  2 
exportfs               12591  1 nfsd
nfs                   250037  0 
lockd                  70844  2 nfsd,nfs
fscache                36071  1 nfs
nfs_acl                12511  2 nfsd,nfs
auth_rpcgss            36692  2 nfsd,nfs
sunrpc                162075  6 nfsd,nfs,lockd,nfs_acl,auth_rpcgss
loop                   22515  0 
snd_pcm                67327  0 
snd_timer              22658  1 snd_pcm
snd                    52280  2 snd_pcm,snd_timer
soundcore              13014  1 snd
snd_page_alloc         12969  1 snd_pcm
parport_pc             22191  0 
psmouse                55199  0 
pcspkr                 12579  0 
parport                31650  1 parport_pc
evdev                  17475  2 
i2c_piix4              12536  0 
processor              27431  0 
button                 12994  0 
serio_raw              12878  0 
i2c_core               23725  1 i2c_piix4
thermal_sys            17939  1 processor
ext3                  112218  1 
jbd                    41698  1 ext3
mbcache                12930  1 ext3
sg                     25769  0 
sr_mod                 21824  0 
sd_mod                 35501  3 
crc_t10dif             12348  1 sd_mod
cdrom                  35134  1 sr_mod
ata_generic            12479  0 
ata_piix               25319  2 
uhci_hcd               26290  0 
floppy                 56861  0 
ehci_hcd               39529  0 
libata                147240  2 ata_generic,ata_piix
usbcore               122908  3 uhci_hcd,ehci_hcd
scsi_mod              161457  4 sg,sr_mod,sd_mod,libata
e1000                  89591  0 
nls_base               12753  1 usbcore

-- /etc/initramfs-tools/modules

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=local
DEVICE=
NFSROOT=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:

/usr/share/initramfs-tools/hooks:
busybox
dmsetup
keymap
klibc
thermal
udev
uswsusp


-- System Information:
Debian Release: wheezy/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii  cpio                          2.11-7     GNU cpio -- a program to manage ar
ii  findutils                     4.4.2-1+b1 utilities for finding files--find,
ii  klibc-utils                   1.5.22-1   small utilities built with klibc f
ii  module-init-tools             3.12-1     tools for managing Linux kernel mo
ii  udev                          169-1      /dev/ and hotplug management daemo

Versions of packages initramfs-tools recommends:
ii  busybox                       1:1.18.4-2 Tiny utilities for small and embed

Versions of packages initramfs-tools suggests:
ii  bash-completion               1:1.3-1    programmable completion for the ba

-- no debconf information




Severity set to 'normal' from 'important' Request was from Ben Hutchings <ben@decadent.org.uk> to control@bugs.debian.org. (Mon, 23 May 2011 04:57:08 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Mon, 23 May 2011 21:51:07 GMT) Full text and rfc822 format available.

Reply sent to maximilian attems <max@stro.at>:
You have taken responsibility. (Mon, 04 Jun 2012 21:00:11 GMT) Full text and rfc822 format available.

Notification sent to Bjørn Mork <bjorn@mork.no>:
Bug acknowledged by developer. (Mon, 04 Jun 2012 21:00:11 GMT) Full text and rfc822 format available.

Message #14 received at 627592-done@bugs.debian.org (full text, mbox):

From: maximilian attems <max@stro.at>
To: 627592-done@bugs.debian.org
Subject: Re: /usr/sbin/mkinitramfs: copying all files requires too big /tmp - fails on e.g low memory systems using tmpfs
Date: Mon, 4 Jun 2012 20:50:44 +0000
Version: 0.100


contains this change, without the corresponding close:
 * [b9ff58c] mkinitramfs: Use /var/tmp rather then /tmp for space reasons


thus closing now, thank you for your report.

-- 
maks





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 03 Jul 2012 07:43:49 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 07:49:30 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.