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

Re: checksum/disk theories?

Tom Horsley wrote:
I have the f12 Beta dvd images run through "split -b 1G" on
a vfat usb stick. For both the i36 and the x86_64 images
when I do something like this:

cat Fedora-12-Beta-x86_64-DVD.isoa* > ~/Fedora-12-Beta-x86_64-DVD.iso

The sha256sum -c fails on the resulting file :-(. (The checksums
checked OK on the original files I downloaded).

Then I do this:

cat Fedora-12-Beta-x86_64-DVD.isoaa > ~/Fedora-12-Beta-x86_64-DVD.iso
cat Fedora-12-Beta-x86_64-DVD.isoab >> ~/Fedora-12-Beta-x86_64-DVD.iso
cat Fedora-12-Beta-x86_64-DVD.isoac >> ~/Fedora-12-Beta-x86_64-DVD.iso
cat Fedora-12-Beta-x86_64-DVD.isoad >> ~/Fedora-12-Beta-x86_64-DVD.iso

The resulting file is the same size as the one I got the 1st time,
but this file passes the sha256sum -c.

Has bash started randomly ordering wildcard expansion or something?

I don't think bash has ever ordered the files. Instead, they're listed in the order matched.

Where order matters, something modelled on this:
echo $(\ls Derf*)
or echo $(ls -1 Der* | sort)

ls supports ordering on other criteria than filename, even for short lists.

That said, my testing on RHEL6-clone just now doesn't support my contention, so maybe I misremember something.

btw FAT32 does support files larger than 1 Gb, and you can format them ext2 if you wish. I'd not bother with journals in the ordinary course of events.

<after further research>

The scandir() function scans the directory dir, calling filter() on each directory entry. Entries for which filter() returns non-zero are stored in strings allocated via malloc(), sorted using qsort() with the comparison function compar(), and collected in array namelist which is allocated via
       malloc().  If filter is NULL, all entries are selected.

Why you appeared to have the files concatenated in the wrong order, I'm running out of ideas.
This might help elucidate:

echo \
cat Fedora-12-Beta-x86_64-DVD.isoa* \> ~/Fedora-12-Beta-x86_64-DVD.iso

Note I escaped the ">" so as to prevent its interpretation by your shell. This command will show you what bash thinks it's doing.



-- spambait
1aaaaaaa coco merseine nu  Z1aaaaaaa coco merseine nu
-- Advice

You cannot reply off-list:-)

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