START ADD THIS I copied into a partition, which is currently mounted: miro@g0n ~ $ ls -l /mnt/vgO-C/MyVideos/H_All/Oth_1/DEL/ total 17944780 -rw-r--r-- 1 miro miro 1192106932 2015-05-03 19:26 Compo_F0503_1834.avi -rw-r--r-- 1 miro miro 2220945754 2015-05-04 16:08 Compo_F0504_1434.avi -rw-r--r-- 1 miro miro 785712202 2015-05-04 19:27 Compo_F0504_1900.avi -rw-r--r-- 1 miro miro 1663967618 2015-05-04 21:06 Compo_F0504_1953.avi -rw-r--r-- 1 miro miro 2330182840 2015-05-05 16:00 Compo_F0505_1430.avi -rw-r--r-- 1 miro miro 1709801154 2015-05-05 19:27 Compo_F0505_1821.avi -rw-r--r-- 1 miro miro 1542862600 2015-05-05 21:01 Compo_F0505_2004.avi -rw-r--r-- 1 miro miro 2442363890 2015-05-06 16:01 Compo_F0506_1429.avi -rw-r--r-- 1 miro miro 817439906 2015-05-06 19:29 Compo_F0506_1902.avi -rw-r--r-- 1 miro miro 1354300990 2015-05-06 21:00 Compo_F0506_2006.avi -rw-r--r-- 1 miro miro 708881772 2015-05-07 18:59 Compo_F0507_1828.avi -rw-r--r-- 1 miro miro 742218864 2015-05-08 19:26 Compo_F0508_1901.avi -rw-r--r-- 1 miro miro 864591328 2015-05-09 19:30 Compo_F0509_1901.avi miro@g0n ~ $ And I took the filefrag check on all of them with this one-liner: for i in $(ls -1 Compo_F050*.avi) ; do ls -l $i ; filefrag -s -v $i ; read FAKE ; done ; And if to `filefrag -s -v $i' I add ` >> $THIS_FILE', then all of the checks into this text file you're reading. [code] Filesystem type is: ef53 File size of Compo_F0503_1834.avi is 1192106932 (291042 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 3039232.. 3071999: 32768: 1: 32768.. 65535: 3072000.. 3104767: 32768: 2: 65536.. 98303: 3104768.. 3137535: 32768: 3: 98304.. 106495: 3137536.. 3145727: 8192: 4: 106496.. 139263: 3178496.. 3211263: 32768: 3145728: 5: 139264.. 172031: 3211264.. 3244031: 32768: 6: 172032.. 204799: 3244032.. 3276799: 32768: 7: 204800.. 237567: 3276800.. 3309567: 32768: 8: 237568.. 270335: 3309568.. 3342335: 32768: 9: 270336.. 291041: 3342336.. 3363041: 20706: last,eof Compo_F0503_1834.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0504_1434.avi is 2220945754 (542224 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 3364864.. 3397631: 32768: 1: 32768.. 65535: 3397632.. 3430399: 32768: 2: 65536.. 98303: 3430400.. 3463167: 32768: 3: 98304.. 131071: 3463168.. 3495935: 32768: 4: 131072.. 163839: 3495936.. 3528703: 32768: 5: 163840.. 196607: 3528704.. 3561471: 32768: 6: 196608.. 229375: 3561472.. 3594239: 32768: 7: 229376.. 262143: 3594240.. 3627007: 32768: 8: 262144.. 294911: 3627008.. 3659775: 32768: 9: 294912.. 305151: 3659776.. 3670015: 10240: 10: 305152.. 337919: 3702784.. 3735551: 32768: 3670016: 11: 337920.. 370687: 3735552.. 3768319: 32768: 12: 370688.. 403455: 3768320.. 3801087: 32768: 13: 403456.. 436223: 3801088.. 3833855: 32768: 14: 436224.. 468991: 3833856.. 3866623: 32768: 15: 468992.. 501759: 3866624.. 3899391: 32768: 16: 501760.. 534527: 3899392.. 3932159: 32768: 17: 534528.. 542223: 3932160.. 3939855: 7696: last,eof Compo_F0504_1434.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0504_1900.avi is 785712202 (191825 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 22527: 3940352.. 3962879: 22528: 1: 22528.. 43007: 3985408.. 4005887: 20480: 3962880: 2: 43008.. 65535: 4026368.. 4048895: 22528: 4005888: 3: 65536.. 88063: 4071424.. 4093951: 22528: 4048896: 4: 88064.. 110591: 4118528.. 4141055: 22528: 4093952: 5: 110592.. 133119: 4163584.. 4186111: 22528: 4141056: 6: 133120.. 155647: 4241408.. 4263935: 22528: 4186112: 7: 155648.. 178175: 4286464.. 4308991: 22528: 4263936: 8: 178176.. 191824: 4331520.. 4345168: 13649: 4308992: last,eof Compo_F0504_1900.avi: 9 extents found Filesystem type is: ef53 File size of Compo_F0504_1953.avi is 1663967618 (406243 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 22527: 3962880.. 3985407: 22528: 1: 22528.. 43007: 4005888.. 4026367: 20480: 3985408: 2: 43008.. 65535: 4048896.. 4071423: 22528: 4026368: 3: 65536.. 67583: 4093952.. 4095999: 2048: 4071424: 4: 67584.. 88063: 4098048.. 4118527: 20480: 4096000: 5: 88064.. 110591: 4141056.. 4163583: 22528: 4118528: 6: 110592.. 118783: 4186112.. 4194303: 8192: 4163584: 7: 118784.. 133119: 4227072.. 4241407: 14336: 4194304: 8: 133120.. 155647: 4263936.. 4286463: 22528: 4241408: 9: 155648.. 178175: 4308992.. 4331519: 22528: 4286464: 10: 178176.. 210943: 4345856.. 4378623: 32768: 4331520: 11: 210944.. 243711: 4378624.. 4411391: 32768: 12: 243712.. 276479: 4411392.. 4444159: 32768: 13: 276480.. 309247: 4444160.. 4476927: 32768: 14: 309248.. 342015: 4476928.. 4509695: 32768: 15: 342016.. 374783: 4509696.. 4542463: 32768: 16: 374784.. 406242: 4542464.. 4573922: 31459: last,eof Compo_F0504_1953.avi: 11 extents found Filesystem type is: ef53 File size of Compo_F0505_1430.avi is 2330182840 (568893 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 4575232.. 4607999: 32768: 1: 32768.. 65535: 4608000.. 4640767: 32768: 2: 65536.. 98303: 4640768.. 4673535: 32768: 3: 98304.. 131071: 4673536.. 4706303: 32768: 4: 131072.. 143359: 4706304.. 4718591: 12288: 5: 143360.. 176127: 4751360.. 4784127: 32768: 4718592: 6: 176128.. 208895: 4784128.. 4816895: 32768: 7: 208896.. 241663: 4816896.. 4849663: 32768: 8: 241664.. 274431: 4849664.. 4882431: 32768: 9: 274432.. 307199: 4882432.. 4915199: 32768: 10: 307200.. 339967: 4915200.. 4947967: 32768: 11: 339968.. 372735: 4947968.. 4980735: 32768: 12: 372736.. 405503: 4980736.. 5013503: 32768: 13: 405504.. 438271: 5013504.. 5046271: 32768: 14: 438272.. 471039: 5046272.. 5079039: 32768: 15: 471040.. 503807: 5079040.. 5111807: 32768: 16: 503808.. 536575: 5111808.. 5144575: 32768: 17: 536576.. 568892: 5144576.. 5176892: 32317: last,eof Compo_F0505_1430.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0505_1821.avi is 1709801154 (417432 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 5177344.. 5210111: 32768: 1: 32768.. 65535: 5210112.. 5242879: 32768: 2: 65536.. 98303: 5275648.. 5308415: 32768: 5242880: 3: 98304.. 131071: 5308416.. 5341183: 32768: 4: 131072.. 163839: 5341184.. 5373951: 32768: 5: 163840.. 196607: 5373952.. 5406719: 32768: 6: 196608.. 229375: 5406720.. 5439487: 32768: 7: 229376.. 262143: 5439488.. 5472255: 32768: 8: 262144.. 294911: 5472256.. 5505023: 32768: 9: 294912.. 327679: 5505024.. 5537791: 32768: 10: 327680.. 360447: 5537792.. 5570559: 32768: 11: 360448.. 393215: 5570560.. 5603327: 32768: 12: 393216.. 417431: 5603328.. 5627543: 24216: last,eof Compo_F0505_1821.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0505_2004.avi is 1542862600 (376676 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 5627904.. 5660671: 32768: 1: 32768.. 65535: 5660672.. 5693439: 32768: 2: 65536.. 98303: 5693440.. 5726207: 32768: 3: 98304.. 131071: 5726208.. 5758975: 32768: 4: 131072.. 139263: 5758976.. 5767167: 8192: 5: 139264.. 172031: 5799936.. 5832703: 32768: 5767168: 6: 172032.. 204799: 5832704.. 5865471: 32768: 7: 204800.. 237567: 5865472.. 5898239: 32768: 8: 237568.. 270335: 5898240.. 5931007: 32768: 9: 270336.. 303103: 5931008.. 5963775: 32768: 10: 303104.. 335871: 5963776.. 5996543: 32768: 11: 335872.. 368639: 5996544.. 6029311: 32768: 12: 368640.. 376675: 6029312.. 6037347: 8036: last,eof Compo_F0505_2004.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0506_1429.avi is 2442363890 (596281 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 6037504.. 6070271: 32768: 1: 32768.. 65535: 6070272.. 6103039: 32768: 2: 65536.. 98303: 6103040.. 6135807: 32768: 3: 98304.. 131071: 6135808.. 6168575: 32768: 4: 131072.. 163839: 6168576.. 6201343: 32768: 5: 163840.. 196607: 6201344.. 6234111: 32768: 6: 196608.. 229375: 6234112.. 6266879: 32768: 7: 229376.. 253951: 6266880.. 6291455: 24576: 8: 253952.. 286719: 6324224.. 6356991: 32768: 6291456: 9: 286720.. 319487: 6356992.. 6389759: 32768: 10: 319488.. 352255: 6389760.. 6422527: 32768: 11: 352256.. 385023: 6422528.. 6455295: 32768: 12: 385024.. 417791: 6455296.. 6488063: 32768: 13: 417792.. 450559: 6488064.. 6520831: 32768: 14: 450560.. 483327: 6520832.. 6553599: 32768: 15: 483328.. 516095: 6553600.. 6586367: 32768: 16: 516096.. 548863: 6586368.. 6619135: 32768: 17: 548864.. 581631: 6619136.. 6651903: 32768: 18: 581632.. 596280: 6651904.. 6666552: 14649: last,eof Compo_F0506_1429.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0506_1902.avi is 817439906 (199571 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 24575: 6668288.. 6692863: 24576: 1: 24576.. 49151: 6717440.. 6742015: 24576: 6692864: 2: 49152.. 73727: 6766592.. 6791167: 24576: 6742016: 3: 73728.. 98303: 6848512.. 6873087: 24576: 6791168: 4: 98304.. 122879: 6897664.. 6922239: 24576: 6873088: 5: 122880.. 147455: 6946816.. 6971391: 24576: 6922240: 6: 147456.. 172031: 6995968.. 7020543: 24576: 6971392: 7: 172032.. 196607: 7045120.. 7069695: 24576: 7020544: 8: 196608.. 199570: 7092224.. 7095186: 2963: 7069696: last,eof Compo_F0506_1902.avi: 9 extents found Filesystem type is: ef53 File size of Compo_F0506_2006.avi is 1354300990 (330640 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 24575: 6692864.. 6717439: 24576: 1: 24576.. 49151: 6742016.. 6766591: 24576: 6717440: 2: 49152.. 73727: 6791168.. 6815743: 24576: 6766592: 3: 73728.. 98303: 6873088.. 6897663: 24576: 6815744: 4: 98304.. 122879: 6922240.. 6946815: 24576: 6897664: 5: 122880.. 147455: 6971392.. 6995967: 24576: 6946816: 6: 147456.. 172031: 7020544.. 7045119: 24576: 6995968: 7: 172032.. 194559: 7069696.. 7092223: 22528: 7045120: 8: 194560.. 227327: 7096320.. 7129087: 32768: 7092224: 9: 227328.. 260095: 7129088.. 7161855: 32768: 10: 260096.. 292863: 7161856.. 7194623: 32768: 11: 292864.. 325631: 7194624.. 7227391: 32768: 12: 325632.. 330639: 7227392.. 7232399: 5008: last,eof Compo_F0506_2006.avi: 9 extents found Filesystem type is: ef53 File size of Compo_F0507_1828.avi is 708881772 (173067 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 7233536.. 7266303: 32768: 1: 32768.. 65535: 7266304.. 7299071: 32768: 2: 65536.. 98303: 7299072.. 7331839: 32768: 3: 98304.. 106495: 7331840.. 7340031: 8192: 4: 106496.. 139263: 7372800.. 7405567: 32768: 7340032: 5: 139264.. 172031: 7405568.. 7438335: 32768: 6: 172032.. 173066: 7438336.. 7439370: 1035: last,eof Compo_F0507_1828.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0508_1901.avi is 742218864 (181206 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 24575: 7440384.. 7464959: 24576: 1: 24576.. 57343: 7471104.. 7503871: 32768: 7464960: 2: 57344.. 90111: 7503872.. 7536639: 32768: 3: 90112.. 122879: 7536640.. 7569407: 32768: 4: 122880.. 155647: 7569408.. 7602175: 32768: 5: 155648.. 181205: 7602176.. 7627733: 25558: last,eof Compo_F0508_1901.avi: 2 extents found Filesystem type is: ef53 File size of Compo_F0509_1901.avi is 864591328 (211082 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 6143: 7464960.. 7471103: 6144: 1: 6144.. 38911: 7628800.. 7661567: 32768: 7471104: 2: 38912.. 71679: 7661568.. 7694335: 32768: 3: 71680.. 104447: 7694336.. 7727103: 32768: 4: 104448.. 137215: 7727104.. 7759871: 32768: 5: 137216.. 169983: 7759872.. 7792639: 32768: 6: 169984.. 202751: 7792640.. 7825407: 32768: 7: 202752.. 211081: 7825408.. 7833737: 8330: last,eof Compo_F0509_1901.avi: 2 extents found [/code] And what I have to learn now, is, at least three things. First is to find out if there's any way to recognize the start of an extent (if I understand the meaning correctly, if not, I will learn to, in the process). To be honest, I don't think there is a way, by the mere start of the extent. The second, I need to be able to maybe unmount that partition and be able to get those fragments or better extents (IIUC), and then be able to get the file together from those extents, just the same file as it was before. And the third, I need to recognize the `last,eof' in the file, to be able to reconstruct the file up to exactly that point, from its fragments. I think I do understand the notion of extents correctly. Such as in the Compo_F0503_1834.avi there are two extents, because the first extent, the first continuos part of that file goes from 3364864 to 3670015, where the 3364864 is the physical_offet at which, in the partition, this file starts with that extent of its, and 3670015 is where that extent ends, since there is something else or slack space (IIUC the term) that occupies or not occupies (if it's slack space), the blocks from 3670016 to 3702783 (3670016 being explicitly pointed to as `expected' on the right hand side at that level, exactly to mark that end of extent). And similarly any other extents can be seen there, and some file have only two extents, others up to eleven, of those files. In fact, let's do the third that I mentioned above. Let's figure out how the `last.eof' creates makes the file finished off or completed, and see if there are any padding typical for it and anything else that needs to be noted. And if there is, as it seems to be (I read the: LINK HERE (ext4 layout?) ), the ext4 filesystem is made so that fragmentation is minimal and that localization is maximal. [and if there is] usually consecutive mostly occupied by the same file in question, series of extents from the starting "RIFF ... AVI LIST..." to that `last.eof', then it could very well be that another stage of my recovery story will be done. And it'll be easy seeing those last.eof (where eof, sure, stands for end of file). I'll use this simple script: [code] #!/bin/bash # # check-eof-compo.sh # # check what end of file look like in old Hauppage composite input avi-video # mencoder recordings # Digress here and give the scripts for recording? # # ASK IF WANTED # for i in $(ls -1 Compo_F050*.avi) ; do ls -l $i ; # After created the 1024 byte endings only of each avi files, I can # comment out file lines from here, as no splitting needed #j=$(ls -l $i | awk '{ print $5}') ; echo $j ; #read FAKE ; # this gives time to decide; script ok? # # just hit Enter, else Ctrl-C #k=$(echo $j-1024|bc) ; echo $k ; #cat $i | split -d -b${k} - $i ; rm ${i}00 ; ls -l $i* ; read FAKE ; # And I can grep each file for what may be the code end of line... # So I comment out the line used earlier: hexdump -C ${i}01 # And check if it is 'a0 02 00 00' the 8 hex char string in all the # files? Which means uncomment the line below: hexdump -C ${i}01 | grep 'a0 02 00 00' done ; [/code]