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

Re: Problem of space when generate image

Here is a patch for lh_binary_usb-hdd to solve the image size problem. I just add the option -L to follow symbolic links at the du.


Nicolas Turpault wrote:

I have a problem when I generate a hdd-usb image. The generate image is not enough big.

It fail at the cp line 210 of lh_binary_usb-hdd.

When the image is generate lh_binary_usb-hdd do a "du" on binary folder but there is symbolic links in this folder (in the doc folder) so the size is wrong. So sometimes it's fail when he copy the binary folder on the image.

The solution I think is to add option -L in the "du" at the line 105 of lh_binary_usb-hdd.

For the moment I just do a hook to remove doc folder and it's work.


diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd
index 8be8aed..6375347 100755
--- a/helpers/lh_binary_usb-hdd
+++ b/helpers/lh_binary_usb-hdd
@@ -102,7 +102,7 @@ then
 # Everything which comes here needs to be cleaned up,
-DU_DIM="$(du -ms binary | cut -f1)"
+DU_DIM="$(du -Lms binary | cut -f1)"
 REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LH_BINARY_FILESYSTEM})"
 dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM}

Reply to: