Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I suspect you have a FAT or FAT32 filesystem. If I execute your command on my external USB drive with vfat filesystem (I think that's equivalent to FAT32), the transfer fails when the file size reaches 4GB-1byte. According to Wikipedia, that is the limit of FAT32. I get exit code 1, and more informative messages; I guess that depends on the version of Linux.
Code:
tony> dd if=/dev/zero of=out4Gplus bs=4M count=1100
dd: writing ‘out4Gplus’: File too large
1024+0 records in
1023+0 records out
4294967295 bytes (4.3 GB) copied, 156.61 s, 27.4 MB/s
tony> echo $?
1
If I try it in a ext4 filesystem (here I use my /home partition), it fails upon filling the partition:
Code:
tony> dd if=/dev/zero of=out1T bs=1M count=1M
dd: writing ‘out1T’: No space left on device
13731+0 records in
13730+0 records out
14397227008 bytes (14 GB) copied, 282.76 s, 50.9 MB/s
tony> echo $?
1
I also tried it on a ext3 file system , and the return message is the same with that. I think it is the kernel configuration limitation for creating files with size larger than specific value, for example 2G.
I attached the usb driver to my PC, and found that the size of the file created is 2G. this is router with embedded linux. can any one tell me how to get the kernel configuration of the linux? I try to figure it out.
For what it's worth, this is a bash subroutine I use when creating a copy of compact flash root file systems. Reason being is that I've found that the compact flashes that you buy all have different maximum sizes. So as a result if I copy the entire disk using dd, and copy it to a larger disk for storage, then later try to copy it to another compact flash same sized as the original; for example production copying, you run into size problems if the original one the file was created from happened to be larger sized than the target one. My point here is that not all 4G or 8G flash drives, or thumbsticks have EXACTLY the same number of bytes, therefore it caused problems.
The result was a script, this part copies the root file system (because that's the intent) into a file system large enough to store it, then resizes that file system to the minimum required. Thus removing the unused disk space from the file and reducing the size of the file. The $1 argument is the original /dev/sd<letter> compact flash and the $2 argument is the target file for the RFS, in this case we pretty much always use rfs.ext2 because we do an ext2 file system.
Code:
# Function to copy the root file system
copy_rfs()
{
sudo /usr/local/bin/genext2fs -b 1024 $2
# Resize to 8 Gigabytes to perform the copy
sudo /sbin/resize2fs -f $2 8000000
sudo mkdir -p copy
sudo mount -o loop $2 copy
cd copy
sudo cp -a $1/* .
cd ..
sudo umount copy
sudo rm -rf copy
# Check the file system
sudo /sbin/e2fsck -f $2
# Resize it to the minimum number of blocks required
sudo /sbin/resize2fs -M $2
return $?
}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.