LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   "No space left on device" - rootfs image build error (https://www.linuxquestions.org/questions/linux-software-2/no-space-left-on-device-rootfs-image-build-error-828593/)

sjremya 08-26-2010 06:59 AM

"No space left on device" - rootfs image build error
 
Hi all

With mkimage tool, I have created an Root FileSystem image from an RFS source of size 174MB. The Image I got has a size of 10 MB approximately. I have used the mentioned script file, to make use of mkimage tool

This root FS is for ARM architecture, not for a general PC. So for cross compile purpose, I am using Suse host machine.


But it is throwing me an error while doing cp, " No space left on device". So I have come to one colclusion that the 10MB is not the actual size of the image.

error:-
cp: writing `rfs_image_v.4_mount/bin/cp': No space left on device


Please give me advice ..

Regards
SJR

I could create the image, using the following script
/*************************
RD_DIR=$1
RD_FILE=$2

RD_TEMP_FILE=$RD_FILE"_temp"
RD_TEMP_DIR=$RD_FILE"_mount"

GZ_FILE=$RD_TEMP_FILE".gz"
mkdir $RD_TEMP_DIR

dd if=/dev/zero of=$RD_TEMP_FILE bs=1024k count=20
/sbin/mke2fs -F -m0 $RD_TEMP_FILE
/sbin/tune2fs -c 0 $RD_TEMP_FILE
mount $RD_TEMP_FILE $RD_TEMP_DIR -o loop
cp -r -d $RD_DIR/* $RD_TEMP_DIR

umount $RD_TEMP_DIR
gzip $RD_TEMP_FILE

mkimage -A arm -T ramdisk -C gzip -n "Ramdisk" -d $GZ_FILE $RD_FILE


******************************/

Elv13 08-27-2010 05:29 PM

You could replace /dev/zero with /dev/urandom to prevent delayed allocation from being used, but it is probably not your problem. When is the total size of the files you are trying to copy to the image? You have to take the FS journal size, superblock, root reserved space size, inode overhead and so on into account.

sjremya 08-30-2010 12:16 AM

@Elv13 :

thanks for the reply....

My RFS source is of size of 174 MB.

I have modifies "dd if=/dev/zero of=$RD_TEMP_FILE bs=1024k count=20" with count=180 , so space problem during copying got solved.

Is it the correct way to solve this issue.?

Please help me out

Regards
SJR


All times are GMT -5. The time now is 08:15 PM.