Go Back   MacRumors Forums > Apple Hardware > Mac Peripherals

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 30, 2009, 12:46 PM   #1
joshysquashy
macrumors 6502a
 
Join Date: May 2005
Location: UK
Upper and lowercase in a FAT32 Volume name

Ok, before anyone says it can't be done, LaCie managed it!

When I inserted my new iamaKey into my mac, it had an icon of a key, and a file name of "LaCie".

So I changed it to Josh's Disk and low and behold, after ejecting/re-inserting it, the name showed as "JOSH'S DISK". Even "Test" becomes "TEST". Reformating, renaming in windows, you name it, I tried it.

So how do they achieve this? It would make me so happy!
joshysquashy is offline   0 Reply With Quote
Old May 1, 2009, 11:27 AM   #2
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
I'm having the exact same problem. Thing is: When the LaCie Key is shipped it comes with some hidden files preinstalled.

There are e.g.: .volumeicon.icns, volumicon.ico, autorun.inf and others. Once you reformat the Stick those files are gone and no more shiny icons and stuff for you.

Solution: Backup the "empty" stick first, reformat, put the backup back onto the stick and the icons should be there after formating.

If not try opening the terminal and put this command: /Developer/Tools/SetFile -a C "/Volumes/VolumeName/"

Well... I was too dumb and forgot to do the Backup before reformating , so if anyone has those files, please post them here so I can revert my stick to the factory default. LaCie support is incompetent and can't send me the files because they "don't have them". Great support
PabloGS is offline   0 Reply With Quote
Old May 1, 2009, 11:45 AM   #3
joshysquashy
Thread Starter
macrumors 6502a
 
Join Date: May 2005
Location: UK
Quote:
Originally Posted by PabloGS View Post
If not try opening the terminal and put this command: /Developer/Tools/SetFile -a C "/Volumes/VolumeName/"
So what does that command do? I'm guessing we replace VolumeName with something (current name or new name?)
joshysquashy is offline   0 Reply With Quote
Old May 1, 2009, 02:54 PM   #4
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Yeah... You just replace VolumeName by the actuall drive name, in your case this would be: JOSH\ 'S\ KEY/ or "JOSH'S KEY".

BTW: I managed to find the Windows Icons for the LaCie Key.

Just extract the zip-file onto your LaCie stick.

The files are hidden but it should fix the Icon for Windows displayed.

Anyone know where to find the Mac icons?
Attached Files
File Type: zip VolumeIcon.zip (17.1 KB, 510 views)
PabloGS is offline   0 Reply With Quote
Old May 1, 2009, 02:59 PM   #5
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Oh.... And to answer your question:

SetFile is a tool to set the file attributes on files in an HFS+ directory.
-a Sets the file attributes bits where attributes is a string of case sensitive letters. Each letter corresponds to a file attribute: an uppercase letter indicates that the attribute bit is set (1), a lowercase letter indicates that it is not (0).

C | c Stands for Custom icon for folders

So anyone got the .volumeicon.icns file?
PabloGS is offline   0 Reply With Quote
Old May 1, 2009, 03:15 PM   #6
joshysquashy
Thread Starter
macrumors 6502a
 
Join Date: May 2005
Location: UK
Ah I see, SetFile won't make a Fat partition's name case sensitive. I had a quick hunt but couldn't find the Lacie ICNS file.
joshysquashy is offline   0 Reply With Quote
Old May 1, 2009, 03:53 PM   #7
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
You probably just deleted them like I did

Well... As for the upper and lower case problem: You could mount the Drive as UTF-8 or 16 and it could... hmmm... maybe should work. But I don't know how to create an automount policy that explicitly mounts it as UTF-8 whenever it is inserted into any Mac.

sudo mount -t vfat -o utf8 /dev/disk2s1 "/Volumes/Josh's Disk"

or maybe the shortname mount option helps... Set it to mixed and rename the drive then. I might try this later on. I'm no terminal expert so don't blame me if anything goes wrong!
PabloGS is offline   0 Reply With Quote
Old May 1, 2009, 05:59 PM   #8
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Ok... Regarding case sensitive Drive names, I did this:
  1. install darwinports
  2. download mtools (sudo apt-get install mtools)
  3. sudo umount /dev/disk2s1
  4. sudo mlabel -i /dev/sdc1 ::"Josh's Disk"

Do a mixed UTF8 mount and it works... If not you'll get something like "JOSH_~1DISK".

Works fine under Ubuntu too... Didn't check Windows yet... But that's not how LaCie did it... Hmmm...
PabloGS is offline   0 Reply With Quote
Old May 5, 2009, 04:48 PM   #9
richarch
macrumors newbie
 
Join Date: Sep 2003
Extended Attributes?

So, looking at the hidden files, I cannot find the LaCie icons for the Mac either...

I did find that the file has extended attributes, as defined by the xattr command:

xattr -l VolumeIcon.ico

com.apple.FinderInfo:
0000 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@.......
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

As seen in ls:

Capital:LaCie richard$ ls -lhR
total 192
-rwxrwxrwx@ 1 richard richard 91K Jan 14 08:51 VolumeIcon.ico
-rwxrwxrwx@ 1 richard richard 32B Feb 9 09:00 autorun.inf

I bought two at once, so I copied the icon from one volume to the other to get the Mac icon back after formatting.

I still have no idea how they are doing this - but I'm seriously curious...

Attached is a gzip of the files that ship on the drive, including the Mac icon.

--richard
Attached Files
File Type: zip lacie.zip (30.2 KB, 441 views)

Last edited by richarch; May 5, 2009 at 05:08 PM. Reason: adding a tar file with all of the default files on the LaCie drive!
richarch is offline   0 Reply With Quote
Old May 5, 2009, 05:00 PM   #10
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Quote:
I bought two at once, so I copied the icon from one volume to the other to get the Mac icon back after formatting.
Would you mind doing a Disk Image / Dump with Disk Util of your mint Key so that I can restore mine to factory default and further investigate?
PabloGS is offline   0 Reply With Quote
Old May 5, 2009, 05:12 PM   #11
richarch
macrumors newbie
 
Join Date: Sep 2003
Dump the drive?

I don't know how to do a dump with Disk Utility, so I created a .zip file that is a tar of the root of the LaCie drive and all sub directories (including the junk spotlight created).

How do I do the dump and not create an 8 GB file?

--richard
richarch is offline   0 Reply With Quote
Old May 5, 2009, 05:31 PM   #12
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Just check the attached screenshot... Should be pretty much straight forward Just select the drive, hit "New Image" and set it to "Compressed" and "Unencrypted".

Just be sure to not have any (especially sensitive) data on the drive so that it'll compress nicely. You may want to zip the dmg file afterwards also.



Btw... My files also have that special attrib:

Code:
$ ls -alG
-rwxrwxrwx@ 1 Pablo  staff  92854  1 Mai 17:31 VolumeIcon.ico
-rwxrwxrwx@ 1 Pablo  staff     32  1 Mai 17:31 autorun.inf

P.S.: I managed to restore the drive's icon using your zip Thanks a lot mate!
Code:
$ cp .VolumeIcon.icns /Volumes/PABLO_~1KEY/
$ /Developer/Tools/SetFile -a C "/Volumes/PABLO_~1KEY/"
But now we still need to figure out the upper and lower case stuff :/ Regarding that... Can you do a hexdump?

Code:
$ hexdump -C /Volumes/PABLO_~1KEY/
00000000  e5 41 42 4c 4f 27 53 20  4b 45 59 00 00 00 00 00  |?ABLO'S KEY.....|
00000010  00 00 00 00 00 00 68 b5  a1 3a 00 00 00 00 00 00  |......h??:......|
00000020  41 2e 00 5f 00 2e 00 54  00 72 00 0f 00 0c 61 00  |A.._...T.r....a.|
00000030  73 00 68 00 65 00 73 00  00 00 00 00 ff ff ff ff  |s.h.e.s.....????|
00000040  5f 7e 31 20 20 20 20 20  54 52 41 22 00 07 fc 88  |_~1     TRA"..?.|
00000050  a1 3a a5 3a 00 00 fc 88  a1 3a 04 00 00 10 00 00  |?:?:..?.?:......|
00000060  41 55 54 4f 52 55 4e 20  49 4e 46 20 18 89 f5 8b  |AUTORUN INF ..?.|
00000070  a1 3a a5 3a 00 00 f5 8b  a1 3a 23 00 20 00 00 00  |?:?:..?.?:#. ...|
00000080  41 2e 00 54 00 72 00 61  00 73 00 0f 00 25 68 00  |A..T.r.a.s...%h.|
00000090  65 00 73 00 00 00 ff ff  ff ff 00 00 ff ff ff ff  |e.s...????..????|
000000a0  54 52 41 53 48 45 7e 31  20 20 20 12 00 07 fc 88  |TRASHE~1   ...?.|
000000b0  a1 3a a1 3a 00 00 fc 88  a1 3a 03 00 00 00 00 00  |?:?:..?.?:......|
000000c0  41 50 00 61 00 62 00 6c  00 6f 00 0f 00 a0 27 00  |AP.a.b.l.o...?'.|
000000d0  73 00 20 00 4b 00 65 00  79 00 00 00 00 00 ff ff  |s. .K.e.y.....??|
000000e0  50 41 42 4c 4f 5f 7e 31  4b 45 59 08 00 00 18 bc  |PABLO_~1KEY....?|
000000f0  a1 3a a1 3a 00 00 01 bd  a5 3a 00 00 00 00 00 00  |?:?:...??:......|
00000100  42 30 00 30 00 00 00 ff  ff ff ff 0f 00 21 ff ff  |B0.0...????..!??|
00000110  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
00000120  01 2e 00 53 00 70 00 6f  00 74 00 0f 00 21 6c 00  |...S.p.o.t...!l.|
00000130  69 00 67 00 68 00 74 00  2d 00 00 00 56 00 31 00  |i.g.h.t.-...V.1.|
00000140  53 50 4f 54 4c 49 7e 31  20 20 20 12 00 b0 fc 88  |SPOTLI~1   ..??.|
00000150  a1 3a a1 3a 00 00 fc 88  a1 3a 07 00 00 00 00 00  |?:?:..?.?:......|
00000160  42 6f 00 00 00 ff ff ff  ff ff ff 0f 00 ca ff ff  |Bo...??????..???|
00000170  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
00000180  01 56 00 6f 00 6c 00 75  00 6d 00 0f 00 ca 65 00  |.V.o.l.u.m...?e.|
00000190  49 00 63 00 6f 00 6e 00  2e 00 00 00 69 00 63 00  |I.c.o.n.....i.c.|
000001a0  56 4f 4c 55 4d 45 7e 31  49 43 4f 20 00 85 f5 8b  |VOLUME~1ICO ..?.|
000001b0  a1 3a a5 3a 00 00 f5 8b  a1 3a 83 00 b6 6a 01 00  |?:?:..?.?:..?j..|
000001c0  42 69 00 63 00 6f 00 00  00 ff ff 0f 00 30 ff ff  |Bi.c.o...??..0??|
000001d0  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
000001e0  01 2e 00 5f 00 56 00 6f  00 6c 00 0f 00 30 75 00  |..._.V.o.l...0u.|
000001f0  6d 00 65 00 49 00 63 00  6f 00 00 00 6e 00 2e 00  |m.e.I.c.o...n...|
00000200  5f 56 4f 4c 55 4d 7e 31  49 43 4f 22 00 89 f5 8b  |_VOLUM~1ICO"..?.|
00000210  a1 3a a5 3a 00 00 f5 8b  a1 3a 1a 00 00 10 00 00  |?:?:..?.?:......|
00000220  41 2e 00 5f 00 61 00 75  00 74 00 0f 00 11 6f 00  |A.._.a.u.t....o.|
00000230  72 00 75 00 6e 00 2e 00  69 00 00 00 6e 00 66 00  |r.u.n...i...n.f.|
00000240  5f 41 55 54 4f 52 7e 31  49 4e 46 22 00 8c f5 8b  |_AUTOR~1INF"..?.|
00000250  a1 3a a5 3a 00 00 f5 8b  a1 3a 24 00 00 10 00 00  |?:?:..?.?:$.....|
00000260  41 48 00 6f 00 75 00 73  00 65 00 0f 00 08 00 00  |AH.o.u.s.e......|
00000270  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
00000280  48 4f 55 53 45 20 20 20  20 20 20 10 00 05 51 8d  |HOUSE      ...Q.|
00000290  a1 3a a1 3a 00 00 52 8d  a1 3a 06 00 00 00 00 00  |?:?:..R.?:......|
000002a0  e5 6d 00 74 00 6f 00 6f  00 6c 00 0f 00 25 73 00  |?m.t.o.o.l...%s.|
000002b0  2d 00 34 00 2e 00 30 00  2e 00 00 00 31 00 30 00  |-.4...0.....1.0.|
000002c0  e5 54 4f 4f 4c 53 7e 31  31 30 20 10 00 43 7c b1  |?TOOLS~110 ..C|?|
000002d0  a1 3a a1 3a 00 00 7c b1  a1 3a 09 00 00 00 00 00  |?:?:..|??:......|
000002e0  e5 31 00 30 00 00 00 ff  ff ff ff 0f 00 8b ff ff  |?1.0...????...??|
000002f0  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
00000300  e5 2e 00 5f 00 6d 00 74  00 6f 00 0f 00 8b 6f 00  |?.._.m.t.o....o.|
00000310  6c 00 73 00 2d 00 34 00  2e 00 00 00 30 00 2e 00  |l.s.-.4.....0...|
00000320  e5 4d 54 4f 4f 4c 7e 31  31 30 20 22 00 47 7c b1  |?MTOOL~110 ".G|?|
00000330  a1 3a a5 3a 00 00 7c b1  a1 3a 17 00 00 10 00 00  |?:?:..|??:......|
00000340  41 2e 00 66 00 73 00 65  00 76 00 0f 00 da 65 00  |A..f.s.e.v...?e.|
00000350  6e 00 74 00 73 00 64 00  00 00 00 00 ff ff ff ff  |n.t.s.d.....????|
00000360  46 53 45 56 45 4e 7e 31  20 20 20 12 00 42 4f bc  |FSEVEN~1   ..BO?|
00000370  a5 3a a5 3a 00 00 4f bc  a5 3a 05 00 00 00 00 00  |?:?:..O??:......|
00000380  42 63 00 6e 00 73 00 00  00 ff ff 0f 00 c9 ff ff  |Bc.n.s...??..???|
00000390  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
000003a0  01 2e 00 56 00 6f 00 6c  00 75 00 0f 00 c9 6d 00  |...V.o.l.u...?m.|
000003b0  65 00 49 00 63 00 6f 00  6e 00 00 00 2e 00 69 00  |e.I.c.o.n.....i.|
000003c0  56 4f 4c 55 4d 45 7e 31  49 43 4e 22 00 a4 37 bc  |VOLUME~1ICN".?7?|
000003d0  a5 3a a5 3a 00 00 37 bc  a5 3a ef 28 41 c7 00 00  |?:?:..7??:?(A?..|
000003e0  42 2e 00 69 00 63 00 6e  00 73 00 0f 00 2f 00 00  |B..i.c.n.s.../..|
000003f0  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
00000400  01 2e 00 5f 00 2e 00 56  00 6f 00 0f 00 2f 6c 00  |..._...V.o.../l.|
00000410  75 00 6d 00 65 00 49 00  63 00 00 00 6f 00 6e 00  |u.m.e.I.c...o.n.|
00000420  5f 56 4f 4c 55 4d 7e 31  49 43 4e 22 00 a4 37 bc  |_VOLUM~1ICN".?7?|
00000430  a5 3a a5 3a 00 00 37 bc  a5 3a 44 00 00 10 00 00  |?:?:..7??:D.....|
00000440  41 2e 00 5f 00 29 f0 00  00 ff ff 0f 00 c5 ff ff  |A.._.)?..??..???|
00000450  ff ff ff ff ff ff ff ff  ff ff 00 00 ff ff ff ff  |??????????..????|
00000460  5f 7e 31 20 20 20 20 20  20 20 20 22 00 0c 47 bc  |_~1        "..G?|
00000470  a5 3a a5 3a 00 00 47 bd  a5 3a 50 00 00 10 00 00  |?:?:..G??:P.....|
00000480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000
Attached Thumbnails
Click image for larger version

Name:	Bild 2.png
Views:	3819
Size:	179.5 KB
ID:	169902  

Last edited by PabloGS; May 5, 2009 at 05:53 PM. Reason: Various things added
PabloGS is offline   0 Reply With Quote
Old May 5, 2009, 07:04 PM   #13
richarch
macrumors newbie
 
Join Date: Sep 2003
Attachments

Disk Image and Hex Dump attached.

--richard
Attached Files
File Type: zip LaCie.dmg.zip (843.0 KB, 340 views)
File Type: txt Lacie.hexdump.txt (4.4 KB, 140 views)
richarch is offline   0 Reply With Quote
Old May 5, 2009, 08:35 PM   #14
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Seeing that the text in your hex dump is mixed case I did another dump...

Code:
$ hexdump -C /dev/disk2s1 | grep "PABLO"
00000040  80 00 29 08 ac 67 54 50  41 42 4c 4f 27 53 20 4b  |..).?gTPABLO'S K|
010000e0  50 41 42 4c 4f 27 53 20  4b 45 59 08 00 00 18 bc  |PABLO'S KEY....?|
03b62160  27 2f 56 6f 6c 75 6d 65  73 2f 50 41 42 4c 4f 27  |'/Volumes/PABLO'|
My idea would be to dd if=... of=/dev/disk2s1 and replace all PABLO'S KEY with Pablo's Key... Sounds crazy... Dunno if it works and it might destroy that particular partition, but one can always reformat :P

If you're no script kiddie using a Hex Editor might work... Just seek to the offsets and replace them... Will report back sometime and report if it worked...
PabloGS is offline   0 Reply With Quote
Old May 6, 2009, 05:58 AM   #15
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
IT WORKED! YEAH!

Thanks a lot to you richarch... Couldn't have done it without you!

Here's the proof:


What to do? Find the drives label. Should be at offset 0x47 and 0x10000e0. But do a hexdump to be sure!

Code:
$ hexdump -C /dev/disk2s1 | grep "PABLO"
00000040  80 00 29 08 ac 67 54 50  61 62 6c 6f 27 73 20 4b  |..).?gTPABLO'S K|
010000e0  50 61 62 6c 6f 27 73 20  4b 65 79 08 00 00 18 bc  |PABLO'S KEY....?|
Next create a text file containing the new label:
Code:
$ echo "Pablo's Key" > input
Now do this:
Code:
$ dd if=input bs=1 count=11 seek=0x47 conv=notrunc of=/dev/disk2s1
$ dd if=input bs=1 count=11 seek=0x10000e0 conv=notrunc of=/dev/disk2s1
If your new Label is 5 char long set count to 5 instead of 11. Also: If I recall correctly the longest label for a FAT Volume name is 8+3 = 11 characters. If you put more it will most likely screw up your drive.

Do a new hexdump to verify:

Code:
$ hexdump -C /dev/disk2s1 | grep "Pablo"
00000040  80 00 29 08 ac 67 54 50  61 62 6c 6f 27 73 20 4b  |..).?gTPablo's K|
010000e0  50 61 62 6c 6f 27 73 20  4b 65 79 08 00 00 18 bc  |Pablo's Key....?|
Works like a charm. Now if anyone could simplify the process a bit that'd be nice... And... If you break your drive, that's not my fault! DO AT YOUR OWN RISK
Attached Thumbnails
Click image for larger version

Name:	Bild 1.png
Views:	3835
Size:	639.2 KB
ID:	169976  

Last edited by PabloGS; May 7, 2009 at 11:18 AM. Reason: Corrected a small typo: Should be at offset 0x47 NOT 0x40, original hexdump corrected to be uppercase
PabloGS is offline   0 Reply With Quote
Old May 6, 2009, 08:10 AM   #16
joshysquashy
Thread Starter
macrumors 6502a
 
Join Date: May 2005
Location: UK
Thanks Pablo! Great find, but it seems to complicated/risky for me. If there were a script that would simplify the process I would definitely give it a go!

Great find though! If this works, seems strange no OS has built in support for this.
joshysquashy is offline   0 Reply With Quote
Old May 6, 2009, 08:14 AM   #17
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Quote:
Originally Posted by joshysquashy View Post
Seems strange no OS has built in support for this.
Indeed... But it's in the FAT specs... It's probably because lower case letters are not allowed for filenames/directories. But they are definitely allowed for volume labels. So it should work just fine... No worries... At least I believe that...

If you want to and have IRC/AIM/MSN/ICQ or Skype I can talk you through it. It's not that hard. I just wanted to give an exhausting answer / how to.


Any questions?

Last edited by PabloGS; May 6, 2009 at 08:29 AM.
PabloGS is offline   0 Reply With Quote
Old May 6, 2009, 02:16 PM   #18
richarch
macrumors newbie
 
Join Date: Sep 2003
hexdump question

When I try to do the hexdump, I'm getting an error:

hexdump: /dev/disk2s1: No such file or directory
hexdump: /dev/disk2s1: Bad file descriptor

Any ideas?

Thanks,
Richard
richarch is offline   0 Reply With Quote
Old May 6, 2009, 03:11 PM   #19
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Are you sure you have the correct Disk Identifier?

Check my last screenshot (Information window) or type:
Code:
mount
You will get a list like:

Code:
$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local)
fdesc on /dev (fdesc, union)
map -hosts on /net (autofs, automounted)
map auto_home on /home (autofs, automounted)
/dev/disk0s3 on /Volumes/Untitled (fusefs, local, synchronous)
/dev/disk1s1 on /Volumes/Terrabird HFS+ (hfs, local, nodev, nosuid, journaled)
/dev/disk1s2 on /Volumes/Terrabird NTFS (fusefs, local, synchronous)
/dev/disk2s1 on /Volumes/Pablo's Key (msdos, local, nodev, nosuid, noowners)
Look for your Volume and check what it says!

Try to hexdump again!

If you get something like:
Code:
hexdump: /dev/disk2s1: Resource busy
hexdump: /dev/disk2s1: Bad file descriptor
you will either have to unmount it using umount or unmount the drive using Disk Util.
PabloGS is offline   0 Reply With Quote
Old May 6, 2009, 03:58 PM   #20
richarch
macrumors newbie
 
Join Date: Sep 2003
Success

It worked for me. Great instructions Pablo!

--richard
richarch is offline   0 Reply With Quote
Old May 6, 2009, 06:57 PM   #21
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
No problem My pleasure... I mean: You helped me too

What did you name it?

Last edited by PabloGS; May 6, 2009 at 07:05 PM.
PabloGS is offline   0 Reply With Quote
Old May 7, 2009, 01:56 PM   #22
mac65
macrumors newbie
 
Join Date: Mar 2009
 
Warning - don't do this blindly!

Quote:
Originally Posted by PabloGS View Post
IT WORKED! YEAH!
Now do this:
Code:
$ dd if=input bs=1 count=11 seek=0x47 conv=notrunc of=/dev/disk2s1
$ dd if=input bs=1 count=11 seek=0x10000e0 conv=notrunc of=/dev/disk2s1
Believe me - this is NOT safe - the offset 0x10000e0 may or may not be right on any FAT formatted disk - you can lose data doing this if you're not verifying that the volume label is really in that place. See my comment here:

http://www.macosxhints.com/comment.p...iew&cid=108528
mac65 is offline   0 Reply With Quote
Old May 7, 2009, 05:08 PM   #23
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
0x47 is fixed however. Overwriting the 11 bytes after that address should be "safe".

Yes, the other one is dynamic. It's the root dir entry. That's why you should hexdump for the volume name to find the offset and verify.

You can however calculate the address if you want to:

It would go something like this: Look at address 0x2c, the value there indicates the sector number of the root directory. Multiply that value by the cluster size. Seek to the right directory entry through the linked list containing the volume label.

Easier: Just grep for it!

I wasn't clear enough about that I guess :/

Last edited by PabloGS; May 7, 2009 at 05:32 PM.
PabloGS is offline   0 Reply With Quote
Old May 11, 2009, 05:58 AM   #24
slinkymike
macrumors newbie
 
Join Date: May 2009
Muuuuuch easier method...

Hey - had to register to post a reply in this thread as I have a far simpler solution:

Firstly: thanks richarch -your .dmg was the key (sorry! ) to getting the icon back.

Secondly- the method I used is as follows:
-Download richarchs .dmg
-Ignore the hex rocket science
-Mount richarchs .dmg
-Select it and select: 'Get Info'
-At the top of the 'Get Info screen, click once on the icon so that it has a blue outline around it
-Select: Edit>Copy
-Select 'Get Info' on your iamakey volume and click the icon once so that it has a blue outline
-Select: Edit>Paste
-Smile cos you done it all clickety click wihtout editing hex

This is in OSX 10.5.6... boom!
slinkymike is offline   0 Reply With Quote
Old May 11, 2009, 06:36 AM   #25
PabloGS
macrumors member
 
Join Date: Oct 2007
Location: Europe
Quote:
Originally Posted by slinkymike View Post
-Smile cos you done it all clickety click wihtout editing hex
Changing the icon by:
Code:
$ /Developer/Tools/SetFile -a C "/Volumes/VolumeName/"
doesn't require any hex dump or what so ever either, but I'd assume your method works just fine for setting the drive icon also.
PabloGS is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Mac Peripherals

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Shortcut/accent code for lowercase delta alkalifly Mac Basics and Help 3 May 30, 2014 05:38 AM
General: Great tweak for lowercase keyboard: ShowCase thadoggfather Jailbreaks and iOS Hacks 2 Mar 7, 2014 09:14 PM
Can I have cmd + volume keys (f11, f12) changing iTunes volume? madsylar OS X 5 Oct 12, 2013 12:03 PM
You cannot install Safari on this volume. This volume already has a newer version of abidkhan135 Mac Applications and Mac App Store 2 Jul 10, 2013 09:30 AM
Volume keys and on screen volume controls not working??? 11j11 Mac Basics and Help 2 Oct 8, 2012 01:15 PM

Forum Jump

All times are GMT -5. The time now is 04:15 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC