You are not logged in.

#1 2009-04-26 13:40:53

chancho
Member
From: Hong Kong
Registered: 2006-07-14
Posts: 114

copy files from iso9660 to usb (vfat)

i am trying to copy files from a iso image (700mb) to a usb stick (1g). however, i got a not enough space error in the middle of copying. i copy the files to my hd and found them occupy about 3g!. is there anything wrong ?

Offline

#2 2009-04-26 14:12:55

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: copy files from iso9660 to usb (vfat)

What method are you using to copy?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2009-04-26 14:18:10

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: copy files from iso9660 to usb (vfat)

Sounds like something on the iso was compressed, and got decompressed. We'd need more details.

Offline

#4 2009-04-26 14:20:45

chancho
Member
From: Hong Kong
Registered: 2006-07-14
Posts: 114

Re: copy files from iso9660 to usb (vfat)

i use "cp -aR" to copy.
can files inside iso9660 be compressed and released by itself when moounted ?

Offline

#5 2009-04-26 14:42:51

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: copy files from iso9660 to usb (vfat)

Perhaps the dd command would be more advantageoud.

Try .............

dd if=(iso9660 /dev/ID) of=(usb /dev/ID)

Important that the format for this command is of the following type: (example only!)

            dd if=/dev/sda of=/dev/sdb

The output file (of) must be the entire USB device(not a partition).


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#6 2009-04-26 19:21:22

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: copy files from iso9660 to usb (vfat)

What does df -h show as available space on the USB drive? There could be hidden files taking up space, such as files you have moved to the trash. Depending on your file manager, it may ignore these when calculating space available.

Offline

#7 2009-04-26 21:52:02

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: copy files from iso9660 to usb (vfat)

I think I know what your problem is but I can't think of an easy solution.
Mos probably that image was "optimized", this of course if that is a normal data cd and not a protected cd. Some protection schemes used that sort of trick to keep people from copying the files to hd and then burning them to cd again.

Back to our normal unprotected cd, the process of optimization is done when creating the image, all files that are intended to be on the image are scanned to find duplicates, then the actual file is burned only once. Then on the file table you have two or more entries that point to the same physical location on the cd, so when you copy the cd to hd you will be copying the same file more than once, hence the extra space usage.

In your case, 700MB to 3GB, that sounds a lot like a protected cd. I have created cd images using this kind of optimization and usually I got something like 5% to 10% saving of space never a reduction from 3G to 700M.

Also as far as I know, none of the rainbow books or iso9660 define on the fly compression/decompression, files are always burned as they are.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2009-04-27 01:03:46

chancho
Member
From: Hong Kong
Registered: 2006-07-14
Posts: 114

Re: copy files from iso9660 to usb (vfat)

i found some files with the same name and appear under different directory. however, i do not find links under the mounted dir (the whole mounted dir still keep about 700m). so, vfat does not support links (i think), how can i reduce the total size ?

Offline

#9 2009-04-27 13:39:36

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: copy files from iso9660 to usb (vfat)

With fat you can't, at least if you want to maintain the same directory structure and functionality.
I don't know if what lilsirecho said will work but sounds like a nice idea, although I guess it would steal you some space. My suggestion is to copy the iso to the pen drive and mount it when needed.
Make backups before you try anything.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2009-04-27 13:48:37

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: copy files from iso9660 to usb (vfat)

I wouldn't try to use the dd command unless there's nothing on the USB drive and you don't mind reformatting it as FAT32 later. You'd basically be dumping an iso9660 file system on to the drive, overwriting the fat file system. I guess it might work if you don't need the drive for anything else. Remember though, that iso9660 is a read only file system so you won't be able to add anything else to the USB drive. It might make more sense to just make a copy of the CD or put the image on the drive and mount it when needed like Rookie said.

Offline

Board footer

Powered by FluxBB