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

Re: Some of the parameters used in my genisoimage command don't produce a bootable ISO image



On Sat 22 Oct 2022 at 01:46:05 (+0200), Mario Marietto wrote:
> 
> Below you can see what's the real problem : inside the archive there are
> two files with the same name. They seem to be different because their kb
> are different,but I have opened both files with "engrampa" and I saw that
> they are the same picture. I really don't understand this bizarre behavior

I think you've missed the fact that cpio's lineage is a /tape/ archive,
not a random access device. Demonstration using some small well-known
files that have been copied into /tmp/:

$ find /tmp/resolv.conf /tmp/papersize /tmp/networks -print | cpio -ov > arc.cpio
/tmp/resolv.conf
/tmp/papersize
/tmp/networks
1 block
$ 

# Overwrite papersize with new contents:

$ cp -ip /etc/host.conf /tmp/papersize 
cp: overwrite '/tmp/papersize'? y
$ 

# Now add the papersize file again, but with its new contents:

$ find /tmp/papersize -print | cpio -ov -A -F arc.cpio
/tmp/papersize
1 block
$ 

# Listing:

$ cpio -t < arc.cpio
/tmp/resolv.conf
/tmp/papersize
/tmp/networks
/tmp/papersize
1 block
$ 

# Extract papersize:

$ cpio -iv --to-stdout /tmp/papersize < arc.cpio
letter
/tmp/papersize
multi on
/tmp/papersize
1 block
$ 

# Both copies are there. Dump the entire "tape":

$ hex arc.cpio 
00000000  c7 71 05 08 ba ff a4 81  e8 03 e8 03 01 00 00 00  |.q..............|
00000010  53 63 e7 41 11 00 00 00  17 00 2f 74 6d 70 2f 72  |Sc.A....../tmp/r|
00000020  65 73 6f 6c 76 2e 63 6f  6e 66 00 00 6e 61 6d 65  |esolv.conf..name|
00000030  73 65 72 76 65 72 20 31  39 32 2e 31 36 38 2e 31  |server 192.168.1|
00000040  2e 31 0a 00 c7 71 05 08  bb ff a4 81 e8 03 e8 03  |.1...q..........|
00000050  01 00 00 00 5b 62 c6 75  0f 00 00 00 07 00 2f 74  |....[b.u....../t|
00000060  6d 70 2f 70 61 70 65 72  73 69 7a 65 00 00 6c 65  |mp/papersize..le|
00000070  74 74 65 72 0a 00 c7 71  05 08 bc ff a4 81 e8 03  |tter...q........|
00000080  e8 03 01 00 00 00 5b 62  60 6d 0e 00 00 00 3c 00  |......[b`m....<.|
00000090  2f 74 6d 70 2f 6e 65 74  77 6f 72 6b 73 00 64 65  |/tmp/networks.de|
000000a0  66 61 75 6c 74 09 09 30  2e 30 2e 30 2e 30 0a 6c  |fault..0.0.0.0.l|
000000b0  6f 6f 70 62 61 63 6b 09  31 32 37 2e 30 2e 30 2e  |oopback.127.0.0.|
000000c0  30 0a 6c 69 6e 6b 2d 6c  6f 63 61 6c 09 31 36 39  |0.link-local.169|
000000d0  2e 32 35 34 2e 30 2e 30  0a 0a c7 71 05 08 bb ff  |.254.0.0...q....|
000000e0  a4 81 e8 03 e8 03 01 00  00 00 d7 44 e1 74 0f 00  |...........D.t..|
000000f0  00 00 09 00 2f 74 6d 70  2f 70 61 70 65 72 73 69  |..../tmp/papersi|
00000100  7a 65 00 00 6d 75 6c 74  69 20 6f 6e 0a 00 c7 71  |ze..multi on...q|
00000110  00 00 00 00 00 00 00 00  00 00 01 00 00 00 00 00  |................|
00000120  00 00 0b 00 00 00 00 00  54 52 41 49 4c 45 52 21  |........TRAILER!|
00000130  21 21 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |!!..............|
00000140  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200
$ 

Cheers,
David.


Reply to: