开发者

How to add text to disk image?

i have开发者_开发技巧 created a disk image using disk utility. but i want to add some text to the disk image for providing help on what to do. How can i do this? Can anybody help me out?


See this question from a few months ago which covers how to make a custom disk image.


If I understand what you are asking, the most straightforward solution is to write the instructions, place it on the disk, and make a new image.


You should just add a help.txt or readme.txt the the root of the folder that you created the image from and just make another image. you cannot edit the image once it is burned.

Imho, a better idea is to just add a small readme.txt telling the user to go to some website (something like google sites works well for this as it wont get accidentally deleted) that would have your help info there. This way you could also update it based on feedback from your users.


You need to check with the disk utility if that gives you such an option to add information later after creating disc image. Symantec Ghost disk imaging solution has additional disk image explorer where you can add/remove files without compromising the disk image intergrity.

So it basically boils down to the type of disk image software used by you. Any clue on that would help us answer better.


If you add text to the 'disk image' it won't be a disk image any more. That is, if you modify the disk image file it won't be a true disk image.

Besides, if you plan to add instructions on how to 'burn' the image, the user needs to see the instructions before the image is burned to disk. Or are you thinking of doing something else with the disk image?

Your best bet is probably to package the disk image together with files which explain what to do with it. A ZIP file, a RAR file, whatever.


As other answers note, you should put things like README files in the source directory before creating a disk image. Note, however, there are different kinds of disk images, in particular, ones that are writable and ones that are read-only. For distribution, you want a read-only variant but, if necessary, you can take advantage of some features provided by OS X's hdiutil, the command-line disk image utility, to easily create a modified disk image from an existing read-only image. As described in the hdiutil man page, you can use "a shadow file to attach a read-only image read-write to modify it, then convert it back to a read-only image. This method eliminates the time/space required to convert a image to read-write before modifying it."

# first, attach the old image with a shadow file to allow write access
hdiutil attach -owners on old.dmg -shadow
# hdiutil mounts the file systems and lists the mount points 
#
# add or modify files as needed in the mounted file system, /Volumes/xxx,
# then eject/detach it, either with the Finder or hdiutil eject
#
# then, create a new compressed, read-only image
hdiutil convert -format UDZO -o new.dmg old.dmg -shadow
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜