[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#447937: live-initramfs: scripts/live does not allocate enough memory for .tgz images



Package: live-initramfs
Version: 1.110.2-1
Severity: important

Hi,

I'm using compressed .tgz images with the 'fetch' option, my image is
140MB long when compressed and 405MB when uncompressed. The script
/usr/share/initramfs-tools/scripts/live fails booting because it only
allocates 150MB of memory for the image instead of 405MB.

Here's what happens exactly :

Begin: Copying live media to ram ...
+ copy_live_to /live/image ram
+ copyfrom=/live/image
+ copytodev=ram
+ copyto=/live/image_swap
+ [ -z  ]
+ fs_size  /live/image used
+ dev=
+ mountp=/live/image
+ used=used
+ [ -z /live/image ]
+ [ used = used ]
+ du -ks /live/image
+ cut -f1
+ size=142856
+ expr 142856 + 142856 / 20
+ size=149998
+ [ -n  ]
+ echo 149998
+ size=149998
  ^^^^^^^^^^^

+ [ ram = ram ]
+ awk /MemFree/{print $2} /proc/meminfo
+ cat /proc/meminfo
+ grep Cached
+ awk /Cached/{print $2} -
+ head -n 1
+ expr 12018460 + 164728
+ freespace=12183188
+ mount_options=-o size=149998k
+ free_string=memory
+ fstype=tmpfs
+ dev=/dev/shm
+ [ 12183188 -lt 149998 ]
+ mkdir /live/image_swap
+ echo mount -t tmpfs -o size=149998k /dev/shm /live/image_swap
mount -t tmpfs -o size=149998k /dev/shm /live/image_swap
+ mount -t tmpfs -o size=149998k /dev/shm /live/image_swap
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

+ [ tgz = tgz ]
+ cd /live/image_swap
+ basename http://10.0.0.42/tmp/filesystem.tgz
+ tar zxf /live/image/live/filesystem.tgz
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tar: Write Error: No space left on device
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tar: Write Error: No space left on device
tar: Write Error: No space left on device
tar: Write Error: No space left on device
tar: Write Error: No space left on device
tar: Write Error: No space left on device
tar: Write Error: No space left on device
tar: Invalid tar magic

I've hackily fixed this by locally commenting the line 564 of
scripts/live, which is:

                mount_options="-o size=${size}k"

but we need a better fix :)

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-2-vserver-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages live-initramfs depends on:
ii  busybox                       1:1.1.3-5  Tiny utilities for small and embed
ii  file                          4.21-3     Determines file type using "magic"
ii  initramfs-tools               0.91a      tools for generating an initramfs
ii  sudo                          1.6.8p12-6 Provide limited super user privile
ii  user-setup                    1.16       Set up initial user and password

Versions of packages live-initramfs recommends:
ii  eject                         2.1.5-5    ejects CDs and operates CD-Changer
pn  live-initscripts              <none>     (no description available)
ii  wget                          1.10.2-3   retrieves files from the web

-- no debconf information






Reply to: