Red Hat Bugzilla – Bug 220687
nash-command losetup with a file; size(file) > 2,147,483,647 returns error# 27: File too large
Last modified: 2007-11-30 17:11:52 EST
Description of problem:
Version-Release number of selected component (if applicable):
* tested with nash ver. 3.4.42,
* but compared with nash of mkinitrd ver. 5.1.19, the (according to my opinion)
significant code for this problem has not yet been changed.
How reproducible: in every case the following steps are performed.
Steps to Reproduce:
* you have an ntfs on sda1 .
* in a nash-script you load the necessary modules to access sda1 and to mount
* in the initrd-disk you have a folder named /mnt/nCC .
* you mount in the nash-script with
"mount -o defaults -t ntfs /dev/sda1 /mnt/nCC" sda1 on /mnt/nCC .
* in /mnt/nCC/ you have a folder VirtualDisks, in this folder there is an file
Linux.img with a size of 4 * 1024 * 1024 * 1024 (about 4GB); whole file-path
to Linux.img: "/mnt/nCC/VirtualDisks/Linux.img" .
* then in the nash-script:
"losetup /dev/loop0 "/mnt/nCC/VirtualDisks/Linux.img" .
you get the error: error # 27 (means File too large).
a valid /dev/loop0 for .../Linux.img
see my attachment of nash.c from mkinitrd ver. 5.1.19:
I beg the problem will be solved if you change in the lines 811 and 813 of
my attachment and nash.c the function calls "open" to "open64" .
at least changing the corresponding function calls in nash 3.4.42 has helped.
I apologize in advance if I should have bothered you in vain with this problem,
because of a wrong choosing of the used library-version or some inappropriate
c-flags or missing #define-statements in the c-flags.
Created attachment 144328 [details]
nash.c from mkinitrd ver. 5.1.19, with line-numbers.
seem to be identical to bug# 177776 .