Space: Lost Pictures and Reformatting

After some thought regarding price and gas costs, I went out to NASA today, paying the hefty entrance fee to get in.  Actually, I bought the annual membership so that I could go back.  This is a good thing because, I had a great time there, took lots of pictures, and then lost all of my pictures when I tried to download them.  It is the 2nd card with great meaningful pictures that has been corrupted in 1 week.  I’m left with 4 pictures.

102_3021The pics were fine and could be reviewed from the 2G SD card in the camera, but once I put the card in the card reader to upload the pictures to the computer, the directory was no longer readable, and upon reinserting the card into the camera, the pictures could no longer be read.  It is as if the card were reformatted.  Interestingly, I was still able to copy 4 pictures from the internal camera memory onto the card and upload these 4 pictures to the computer.  Maybe a FAT-16/VFAT problem?  Internal memory is formatted to FAT-16, card is formatted to FAT-16, then reformatted to VFAT when it goes into the card reader?  The problem repeats with new pictures.

When I run Graphical Disk Map 0.8.1 on lucid pup 5.25, the program goes into an infinite loop when I scan the diskette.  It is as if, each file is being read as a directory, or maybe even the contents of the files are being read as individual directories, like the second byte of the file name is an incorrect terminator to accessing the contents (VFAT would make it a pointer which would be interpreted as a literal in FAT-16).  Furthermore, as the directory is read onto the screen in an unending loop, the filenames (gibberish) appear to change.

dir_junk

I’ve tried the Wondershare photo recovery program (windows based and painfully slow through system 7 on my box), and it reads the files as FAT-16, only recovering a few “big” files (like maybe directories).  One approach might be to get a new card that is unused, format it one way, and scan the bits, then format it another way and scan the bits, compare, and change on the diskette with pictures as needed to experiment with different file formats.  Probably use a different computer to do this, as it is conceivable that it’s a virus.  Everything used to work pretty seamlessly.

Running everything though the console window using a lucid pup 5.25 operating system, the ls command reads the top directories and subdirectories fine, but then when I do “ls” on the directory containing the pictures goes into an infinite loop returning over and over that it cannot read input/output data.  The fsck command returns: The superblock could not be read or does not describe a correct ext2 system.   The e2fsck -b 8193 command returns “The superblock cannot be read or does not describe a correct ext2 system.”  So, I guess the superblock isn’t the problem, the problem is that the partition is not a proper ext2 filesystem because the filename pointer is being read as a literal (not really sure I understand why it floats with time though).  Looking at the /etc/mtab file, the entry reads:

/dev/sdb1 /mnt/sdb1 vfat ro,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,quiet,errors=remount-ro 0 0

The fdisk command with the p (print the partition table) command returns:

Disk /dev/sdb1: 1890 MB, 1890503168 bytes
59 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 3658 * 512 =1872896 bytes

Device Boot    Start     End    Blocks    Id  System

Verifying the partition table with v command gives:

3692388 unallocated sectors

For some reason, despite the fact that the card is obviously writable, it is mounting as read only.  I tried changing the mounted device to read write with chmod, and then using fdisk to make a new partition (and table), and it still reads gibberish.

I guess I could run dd, and try to reformat.  OK. I ran dd.

dd if=/dev/sdb1 of=nasapics.iso
dd: writing to ‘nasapics.iso’: No space left on device
662465+0 records in
662464+0 records out
339181568 bytes (339 MB) copied, 18.1531 s, 18.7 MB/s
ls -tal of file gives
-rw-r–r– 1 root root 339181568 2013-07-17 13:41 nasapics.iso
Obviously huge (324 MB), obviously incomplete, and does not compare with the original file system on /dev/sdb1
diff /dev/sdb1 and /mnt/sda2/Temp/nasapics/nasapics.iso
returns
Binary files /dev/sdb1 and /mnt/sda2/Temp/nasapics/nasapics.iso differ
Still, it is probably the best that I can do.  My whole linux iso is 133912576 blocks, which is roughly 1/3 of what got copied.  So, I’m going to go ahead and reformat.  If needed, revisit NASA.
Reformatted through the camera.  The first time, it returned text files instead of jpg in spite of being able to review pics on the camera. I  don’t know if this is relevant but running fdisk and printing out the partition file showed that the partition that I had created from before had been retained in spite of the camera reformatting.  Deleted this partition, and overwrote the partition table (error messages), then tried to reformat again through the camera, and now, I’m up and running with functional pictures again, but short of playing with the nasapics.iso, I will have to redo the NASA visit.
In the process of overwriting the partition table to reformat the card using the o command, I was given the following message:
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite).I guess it is a specific error because it mentions a partition table 4.  So maybe that’s the effective bit that has to be reset?
This is what the partition file looks like now (fdisk /dev/sdb1)
Command (m for help):
Disk /dev/sdb1: 1888 MB, 1888832000 bytes
64 heads, 63 sectors/track, 914 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytesThis doesn’t look like a partition table
Probably you selected the wrong device.Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   ?      417896      840019   850999312   6c  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(368, 82, 37) logical=(417895, 44, 13)
Partition 1 has different physical/logical endings:
phys=(357, 97, 35) logical=(840018, 23, 23)
Partition 1 does not end on cylinder boundary.
/dev/sdb1p2   ?      495689      630636   272052916   6e  Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(97, 115, 32) logical=(495688, 46, 20)
Partition 2 has different physical/logical endings:
phys=(107, 121, 32) logical=(630635, 38, 51)
Partition 2 does not end on cylinder boundary.
/dev/sdb1p3   ?      133678      267353   269488144   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(356, 101, 33) logical=(133677, 42, 52)
Partition 3 has different physical/logical endings:
phys=(0, 13, 10) logical=(267352, 21, 62)
Partition 3 does not end on cylinder boundary.
/dev/sdb1p4   ?      345887      345892       10668+  53  OnTrack DM6 Aux3
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(333, 89, 19) logical=(345886, 30, 63)
Partition 4 has different physical/logical endings:
phys=(339, 68, 15) logical=(345891, 49, 42)
Partition 4 does not end on cylinder boundary.Partition table entries are not in disk orderI went ahead and ran dd on the san antonio pictures and files.  This time it came back:3692389+0 records in
3691289+0 records out
1890503168 bytes (1.9 GB) copied, …and ls -tal produces a 1.803 GB file
-rwxrwxrwx 1 root root 1890503168 2013-07-17 17:45 /mnt/sda2/Temp/san_antonio_pics/san_antonio.isoThat card also shows a missing partition table.  It has a lot more data on it.  The camera was having problems loading the card, so I tried to delete the data, but I had to make everything writable first.  I went into /etc/mtab to do this (it is supposed to be writable), but it points to /proc/mounts which in turn points to self/mounts.  Can’t find self/mounts.  It seems to me that forcing the system to read the card as a FAT-16 vs. VFAT might recover the files.  On the other hand, it seems like Windows did this when I tried, and that for whatever reason got me 3 big jpg files.  Anyway, can’t edit the file.  Can’t do this, so return to fdisk and use the o option, then reformat in the camera, and now the partition file on the san antonio card reads:
Command (m for help):
Disk /dev/sdb1: 1888 MB, 1888832000 bytes
64 heads, 63 sectors/track, 914 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytesThis doesn’t look like a partition table
Probably you selected the wrong device.Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   ?      417896      840019   850999312   6c  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(368, 82, 37) logical=(417895, 44, 13)
Partition 1 has different physical/logical endings:
phys=(357, 97, 35) logical=(840018, 23, 23)
Partition 1 does not end on cylinder boundary.
/dev/sdb1p2   ?      495689      630636   272052916   6e  Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(97, 115, 32) logical=(495688, 46, 20)
Partition 2 has different physical/logical endings:
phys=(107, 121, 32) logical=(630635, 38, 51)
Partition 2 does not end on cylinder boundary.
/dev/sdb1p3   ?      133678      267353   269488144   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(356, 101, 33) logical=(133677, 42, 52)
Partition 3 has different physical/logical endings:
phys=(0, 13, 10) logical=(267352, 21, 62)
Partition 3 does not end on cylinder boundary.
/dev/sdb1p4   ?      345887      345892       10668+  53  OnTrack DM6 Aux3
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(333, 89, 19) logical=(345886, 30, 63)
Partition 4 has different physical/logical endings:
phys=(339, 68, 15) logical=(345891, 49, 42)
Partition 4 does not end on cylinder boundary.Partition table entries are not in disk orderCommand (m for help):

It works again.  So, it is pretty clear my operating system has changed in spite of the fact that I load new off of “the same” unwritable CD ROM every time.  Unmounting and Remounting used to always remount to a different dev (i.e. sdb1 would become sdc1 or sdd1 if sdc1 was occupied), and now it remounts to the same device and is read only.  I am not pleased about this.

It’s ok.  NASA will be free the next time, and it was very inspiring and therapeutic for me to see people make a dream of getting from point A to a very far away point B, and achieve this goal.  It demonstrated great mastery of the physical world, and a lot of bravery.  It also helps me to reconnect when I start to feel like things are too disconnected or quantized.  And it was a good activity for Ramadan because, for me anyway, one’s focus on physicality turns outwards and not inwards..
One interesting thing that I was told on the tour of the historic mission control center is that the mission to the moon and back was accomplished with about 4 MB of total memory on a computer that was the size of about 8 cars.
100_3040
Petey under the desk while I work.  Happy to have pictures again.
I had one more thought about this.  The mtab file is probably not supposed to be directly writable except through the mount command.  I could have tried that too.
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s