个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:ManageDiscImages”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:ManageDiscImages”的源代码
来自Ubuntu中文
←
UbuntuHelp:ManageDiscImages
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/ManageDiscImages}} {{Languages|UbuntuHelp:ManageDiscImages}} == Convert CloneCD Images to ISO == === Installation === Download the latest version from [http://sourceforge.net/projects/ccd2iso/ ccd2iso homepage] extract the archive files <pre><nowiki> tar xvfz ccd2iso-x.x.tar.gz </nowiki></pre> enter the new directory <pre><nowiki> cd ccd2iso </nowiki></pre> You need aclocal-1.6, therefore we have to install automake1.6 <pre><nowiki> sudo apt-get install automake1.6 </nowiki></pre> configure and compile it <pre><nowiki> ./configure make </nowiki></pre> install it <pre><nowiki> sudo make install </nowiki></pre> or to install it via a deb file ([[UbuntuHelp:CheckInstall|CheckInstall]]) <pre><nowiki> sudo make checkinstall </nowiki></pre> === Usage === Normally you would have 3 file from CloneCD image, they are .ccd, .img, and .sub general usage: <pre><nowiki> ccd2iso <.img filename> <.iso filename> </nowiki></pre> for example: <pre><nowiki> ccd2iso myimage.img myimage.iso </nowiki></pre> == Convert BIN/CUE Images to ISO == === Installation === <pre><nowiki> sudo apt-get install bchunk </nowiki></pre> === Usage === As the name implies, a BIN/CUE CD image has two files. BIN being a binary of the raw CD data, and CUE being an ASCII file of CD layout. general usage: <pre><nowiki> bchunk <image.bin> <image.cue> <basename> </nowiki></pre> for example: <pre><nowiki> bchunk myimage.bin myimage.cue myimage </nowiki></pre> Where basename(myimage) is myimage.iso of the produced file. == Convert DMG (compressed z-lib) to ISO == ==== Notes ==== I noticed a lot of people having difficulties with the old method, using the deprecated PERL script, so this method is a two step method. Convert to img, mount, then use Brasero to create an ISO. This way will also let you just mount the image if you don't want to take the last step of converting and creating an ISO from it. The old method has been preserved on the Wiki for the case that this way does not work. === New Method === ==== Installation ==== For this method we'll be using dmg2img, written by Jean-Pierre Demailly. Download the latest source code of dmg2img from [http://vu1tur.eu.org/tools/ here]. At the time of writing that was version 1.1, so this tutorial will be written from that point of view. Decompress the source code and then install the libraries that will be required to build it. <pre><nowiki> ubuntuer@(fridge)[~/temp]$ tar -xzf dmg2img-1.1.tar.gz ubuntuer@(fridge)[~/temp]$ sudo apt-get install libssl-dev libcurl4-openssl-dev </nowiki></pre> Now we go to the new directory, build, and install dmg2img <pre><nowiki> ubuntuer@(fridge)[~/temp]$ cd dmg2img-1.1/ ubuntuer@(fridge)[~/temp/dmg2img-1.1]$ make ubuntuer@(fridge)[~/temp/dmg2img-1.1]$ sudo make install </nowiki></pre> ==== Usage ==== Pretending we're working with 'MyDMG.dmg' we'll do the following (Example output shown). <pre><nowiki> ubuntuer@(fridge)[~/myDMGs]$ dmg2img MyDMG.dmg newImage.img dmg2img v1.1 is derived from dmg2iso by vu1tur (to@vu1tur.eu.org) MyDMG.dmg --> newImage.img reading property list, 175755 bytes from address 712400386 ... decompressing: opening partition 0 ... 0.00 % ok opening partition 1 ... 0.00 % ok opening partition 2 ... 100.00 % ok Archive successfully decompressed as newImage.img Linux users should be able to mount the archive [as root] by : modprobe hfsplus mount -t hfsplus -o loop newImage.img /mnt </nowiki></pre> You'll not want to follow their instructions exactly. Mounting to /mnt could cause problems, or just be messy. A better idea is to make a temporary folder and mount the image there <pre><nowiki> ubuntuer@(fridge)[~/myDMGs]$ mkdir -p /tmp/images/myImage ubuntuer@(fridge)[~/myDMGs]$ sudo modprobe hfsplus ubuntuer@(fridge)[~/myDMGs]$ sudo mount -t hfsplus -o loop newImage.img /tmp/images/myImage </nowiki></pre> At this point the image is available for browsing under the /tmp/images/myImage directory. If that's all you need then you don't need to go any further. If you would like to create an ISO you'll need to keep on reading ==== Creating the ISO ==== If you're using GNOME then you can run Brasero from the 'Applications -> Sound & Video' menu. Brasero provides an option called 'Create a New Data Project' which is accessible from either the main Brasero screen, or through 'Project -> New Project -> New Data Project'. In the left panel you will browse to where you mounted the img (/tmp/images/myImage in this example). Select all the files that are in that directory and drag them to the panel on the right side of the screen. As you add more and more files you will see a bar graph fill up indicating how much space you have used and have remaining. You can change what kind of disk it's checking your space against by selecting the icon to the left of the bar graph and choosing an option from there. When you're finished just press "Burn" on the bottom of the right panel, to the right of the bar graph. A new screen will come up where you will be able to "Select a disc to write to". Select "Image File" if you have multiple options to chose from. If you press the "Properties" button on the right you can chose where to save the iso and what it will be named. Next to "Label of the disk" You chose anything you'd like that you think adequately describes your disk. Selecting "Increase compatibility with Windows systems" is entirely your decision, the specifics of what that option does is out side of the scope of this Wiki. === Old Method === ==== Installation ==== Download the latest version from [http://vu1tur.eu.org/tools/ here] and move the perl script for example into the directory: <code><nowiki>/usr/local/bin/</nowiki></code> <pre><nowiki> sudo mv dmg2iso.pl /usr/local/bin/ </nowiki></pre> === Usage === dmg2iso.pl <filename.dmg> <filename.iso> === Example === dmg2iso.pl disc1.dmg disc1.iso == Mount ISO Files == Create the directory for mount point: <pre><nowiki> sudo mkdir –p /mnt/iso </nowiki></pre> Use mount command as follows (assumes that your ISO file name is disk1.iso): <pre><nowiki> sudo mount -o loop disk1.iso /mnt/iso </nowiki></pre> Now your ISO is mounted on <code><nowiki>/mnt/iso/</nowiki></code> == Integrate Disk Image Mounting/Unmounting into Gnome (Nautilus) == The following will allow you to mount disk images (.iso, .img, .bin, .nrg, .mdf) by simply right clicking on the image file and selecting "Mount Disk Image". This solution uses fuse, so it does not require sudo rights or a password! The mounted image will be linked on the desktop, in the Places menu, and on the Places Bar in Nautilus; similar to how removable devices (CD/DVD/USB) appear. To unmount an image, right click it's desktop icon and select "Unmount Disk Image". All disk image mounts will be removed upon a restart of gnome. *NOTE: Only disk images that are part of the system hierarchy are supported, images on smb://, nfs://, etc. are not supported unless those remote file systems are mounted to a local folder. Install fuseiso and nautilus-actions package <pre><nowiki> sudo apt-get install fuseiso nautilus-actions </nowiki></pre> Add permitted users to the fuse group (run once for each user who should be able to mount using fuse). <pre><nowiki> sudo usermod -a -G fuse username </nowiki></pre> Logout and back in to have the current logged in user get the fuse group permissions. Download the userisomount.sh script from [http://thefrys.com/userisomount.sh here]. Copy the script to /usr/local/bin/ and make it executable. <pre><nowiki> sudo cp ~/Desktop/userisomount.sh /usr/local/bin/ sudo chown root:fuse /usr/local/bin/userisomount.sh sudo chmod 754 /usr/local/bin/userisomount.sh </nowiki></pre> *note: ~/Desktop is the default firefox download location. If you saved the file elsewhere, adjust as necessary. Download the Nautilus Actions Schemas for [http://thefrys.com/mount.schemas MOUNTING] and [http://thefrys.com/umount.schemas UNMOUNTING] disk images from within nautilus. Import these into the Nautilus Actions Extension, by opening (System Menu -> Preferences -> Nautilus Actions Configuration) and clicking Import/Export. Create an entry named "Clean Disk Image Mounts" in (System Menu -> Preferences -> Sessions -> Startup Programs) that runs the following command at startup. (Place the command below in the command box) <pre><nowiki> /usr/local/bin/userisomount.sh clean </nowiki></pre> By default, the images are mounted in the user's home directory in a hidden folder called ".mymounts", and the desktop icon used will be gtk-dev-removable from the current icon theme. Both of these parameters can be modified at the top of the /usr/local/bin/userisomount.sh script. To quickly unmount all of your mounted images, you can press Alt+F2 and execute: <pre><nowiki> userisomount.sh clean </nowiki></pre> Vote for this to be included in upcoming versions of Ubuntu!: [http://brainstorm.ubuntu.com/idea/11275/] === Troubleshooting === <pre><nowiki> cat /etc/group |grep fuse </nowiki></pre> should return something like: "fuse:x:###:yourusername". If not, rerun the usermod command above. <pre><nowiki> ls -al ~ |grep .mymounts </nowiki></pre> should show you as the owner and group, if it shows root, then you ran the script using sudo and need to run the following command to fix it: <pre><nowiki> sudo userisomount.sh clean ; sudo rm -r ~/.mymounts ; sudo chown username:username ~/.gtk-bookmarks </nowiki></pre> ---- [[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:ManageDiscImages
。