问题
I want to create a dmg file of three files in centos . i am using hfsutils commands, but it is showing errors like "No known volumes; use `hmount' to introduce new volumes". I googled a lot to get clear steps for creating dmg. some one who knows these steps please post here
回答1:
Say if you want to create dmg of three files named file1,file2,file3.keep these three in one directory
Should run this command in the directory where we kept our three files
dd if=/dev/zero of="example.dmg" bs=1M count=10 hformat -l "example" ./"example.dmg"
A dmg file will be formed in our directory. next go to /usr/sbin from there run and then 1)hmount /directorypath/example.dmg 2)hcopy /directorypath/file1 example: 3)hcopy /directorypath/file2 example: 4)hcopy /directorypath/file3 example: 5)humount and then copy this file in to your mac system and open the dmg file,you will find all your three files in it.
回答2:
You can use this command:
genisoimage -D -V "Volume Label" -no-pad -r -apple -o <dest.dmg> <src>
Here is more.
来源:https://stackoverflow.com/questions/23910347/how-to-create-dmg-file-in-centos-through-command-line