如何向磁盘映像添加文本?

发布于 2024-08-16 19:16:30 字数 68 浏览 3 评论 0原文

我已经使用磁盘实用程序创建了一个磁盘映像。但我想向磁盘映像添加一些文本,以提供有关操作的帮助。我该怎么做?有人可以帮我吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

猫瑾少女 2024-08-23 19:16:30

请参阅几个月前的这个问题,其中介绍了如何制作自定义磁盘图像。

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

羅雙樹 2024-08-23 19:16:30

如果我明白你在问什么,最简单的解决方案是编写说明,将其放在磁盘上,然后制作一个新图像。

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.

不如归去 2024-08-23 19:16:30

您应该只在创建图像的文件夹的根目录中添加 help.txt 或 readme.txt,然后再制作另一个图像。图像一旦刻录就无法编辑。

恕我直言,一个更好的主意是添加一个小的 readme.txt 告诉用户去一些网站(比如谷歌网站很适合这个,因为它不会被意外删除),那里会有你的帮助信息。这样您还可以根据用户的反馈进行更新。

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.

各自安好 2024-08-23 19:16:30

您需要检查磁盘实用程序是否为您提供了在创建光盘映像后添加信息的选项。
Symantec Ghost 磁盘映像解决方案具有附加的磁盘映像资源管理器,您可以在其中添加/删除文件,而不会影响磁盘映像的完整性。

所以它基本上可以归结为您使用的磁盘映像软件的类型。任何线索都可以帮助我们更好地回答。

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.

难以启齿的温柔 2024-08-23 19:16:30

如果您向“磁盘映像”添加文本,它将不再是磁盘映像。也就是说,如果您修改磁盘映像文件,它将不是真正的磁盘映像。

此外,如果您计划添加有关如何“刻录”映像的说明,则用户需要在将映像刻录到磁盘之前查看说明。或者您是否正在考虑对磁盘映像执行其他操作?

您最好的选择可能是将磁盘映像与解释如何处理它的文件打包在一起。 ZIP 文件、RAR 文件等等。

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.

π浅易 2024-08-23 19:16:30

正如其他答案所指出的,在创建磁盘映像之前,您应该将诸如 README 文件之类的内容放入源目录中。但请注意,磁盘映像有不同类型,特别是可写磁盘映像和只读磁盘映像。对于分发,您需要只读变体,但如有必要,您可以利用 OS X 的 hdiutil,命令行磁盘映像实用程序,可轻松从现有只读映像创建修改后的磁盘映像。如hdiutil手册页中所述,您可以使用“影子文件附加只读图像读写来修改它,然后将其转换回只读图像。这种方法消除了在修改图像之前将图像转换为读写所需的时间/空间。”

# 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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文