光盘刻录技巧 (简体中文)
From ArchWiki
i18n |
---|
English |
Italiano |
简体中文 |
本文描述了一些光盘刻录的技巧。
Contents |
命令行的光盘刻录工具
安装光盘刻录工具集
# pacman -Sy cdrkit
如果你希望使用cdrdao (把文件cue/bin写到光盘上)
# pacman -S cdrdao
设置权限
如果希望使用cd/dvd烧录设备的话必须要有它们的访问权限。如果要使用udev(Archlinux内核的默认值),你只需要把这个(或多个)用户加入到optical组中:
# gpasswd -a <username> optical
然后别忘了注销后再登录一次。
修改CD-RW中的内容
本节假设你的刻录设备是/dev/cdrw。如果你不是这种情况,那么请对命令做相应的修改。为了能在光盘中写入内容必须先卸载。如果没有卸载,wodim
会给出错误提示。
擦除CD-RW中的内容
CD-RW往往需要先擦除已经存在的内容然后再写入新的数据。使用以下命令来清空cd-rw中的内容:
wodim -v dev=/dev/cdrw -blank=fast
正如你可能猜想的,这个命令可以很快的清空光盘,但是你还可以使用一些其它的选项,只需把fast替换为下面的即可:
- all
- 清空整个光盘
- disc
- 清空整个光盘
- disk
- 清空整个光盘
- fast
- 最低限度的清空整个光盘(PMA,TOC,pregap)
- minimal
- 最低限度的清空整个光盘(PMA,TOC,pregap)
- track
- 清空一个磁道
- unreserve
- unreserve a track
- trtail
- blank a track tail
- unclose
- unclose last session
- session
- blank last session
刻录一个iso镜像
要刻录一个iso镜像,运行:
wodim -v dev=/dev/cdrw isoimage.iso
刻录bin/cue
要刻录bin/cue,运行:
cdrdao write --device /dev/cdrw image.cue
从光盘生成一个iso镜像
要复制一个光盘只需键入:
dd if=/dev/cdrw of=/home/user/isoimage.iso
或者使用更简单的输入:
cat /dev/cdrw > isoimage.iso
或者使用程序readcd(同样在cdrkit包中)
readcd -v dev=/dev/cdrw -f isoimage.iso
如果原光盘是能够启动电脑的,那么生成的镜像也是能够启动电脑的。
从硬盘上的文件生成一个iso镜像
要生成iso镜像只需要拷贝需要的文件到一个文件夹,然后输入:
mkisofs -V volume_name -J -r -o isoimage.iso ~/folder
挂载iso镜像
要测试iso镜像是否是正确的,你先要挂载它(用root身份):
mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom
你首先需要装入loop模块:
modprobe loop
转换成iso镜像
为了转换一个 .img / ccd 镜像,你需要使用ccd2iso:
pacman -Sy ccd2iso ccd2iso /home/archman/image.img /home/archman/image.iso
图形界面的光盘刻录软件
在图形环境中有一些软件可以用于光盘刻录。这些软件的使用方法都是很直观的。
Nero Linux版
它不是免费的,而且界面也没有windows版本的好。3.0.0 beta版还不能正确的制作可启动电脑的文件光盘。
如果你恰好有一个不被dvd+rw工具集支持的刻录光驱(也包括k3b和其它所有免费的图形界面工具),那么nero也许就是你唯一的选择。
K3B
根据http://www.k3b.org,k3b是为KDE优化的CD/DVD制作工具(“CD/DVD Kreator for Linux”)。K3B使用 QT 工具集。
- 使用pacman来安装k3b
# pacman -Sy k3b
- 在root下,运行
k3bsetup
, - 现在你可以设置你的权限等。
- 运行
k3b
来执行主程序。
本地化
当运行K3B时,如果出现下面的提示信息:
System locale charset is ANSI_X3.4-1968 Your system's locale charset (i.e. the charset used to encode filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally. Most likely the locale is not set at all. An invalid setting will result in problems when creating data projects.Solution: To properly set the locale charset make sure the LC_* environment variables are set. Normally the distribution setup tools take care of this.
就意味着你的本地化设置不正确。
通过下面的步骤来改正:
- 删除
/etc/locale.gen
# rm /etc/locale.gen
- 重新安装
glibc
# pacman -Sy glibc
- 修改
/etc/locale.gen
, 为了兼容,取消注释en_US
和所有与你的语言相关的行
# nano /etc/locale.gen en_US.UTF-8 UTF-8 en_US ISO-8859-1
- 使用
locale-gen
来重新生成档案
# locale-gen Generating locales... en_US.UTF-8... done en_US.ISO-8859-1... done pt_BR.UTF-8... done pt_BR.ISO-8859-1... done Generation complete.
更多的信息请参考 这里
K3B 报告没有光盘刻录设备
一个常见的原因是因为用户没有访问刻录设备的权限。 你可以尝试:
- 添加用户到
optical
组 (记住添加后要重新登录使之生效)
gpasswd -a <user> optical
- 设置访问权限
chmod 777 /dev/dvd* chmod 777 /dev/cd*
其它原因,步骤,请参考当前指南 (;
Gnomebaker
Gnomebaker是一个Gnome桌面环境下的光盘刻录解决方案。 如其作者所述,Gnomebaker不再开发维护了。考虑改用 Brasero 。
- 使用pacman来安装gnomebaker
# pacman -Sy gnomebaker
- 运行
gnomebaker
以执行主程序
Brasero
Brasero是Gnome桌面环境下的另一个光盘刻录软件。
- 使用pacman来安装brasero
# pacman -Sy brasero
- 运行
brasero
来执行主程序
Graveman
Graveman 是一个简单并且几乎完全独立的光盘刻录软件。
- 通过 pacman 安装 graveman 。
# pacman -Sy graveman
- As root, run graveman, go to menu File > Preferences... > Devices and add your CD burners.
- Note that you may have to manually add your own device in Graveman's preferences and point it at /dev/cdrom instead of /dev/hdc
- Run
graveman
to run the main program.
Bashburn
Alternatively theres also Bashburn in AUR as a semi-gui solution. BashBurn is the new name for the cd burning shell script Magma. It's not the best looking CD-burning application out there, but it does what you want it to do.
故障处理方法
PATA and SATA problems around 2.6.20/2.6.21
For some kernels on some machines, CD burning works very unreliably. This is not fully diagnosed but appears to be related to DMA and having SATA Hard Drives and older IDE CD/DVD Burners and is possibly more prevalent on PIIX Motherboards. On newer kernels there is a new driver whereby the CD/DVD Burner behaves as if it is a SCSI drive, even though it isn't.
The symptom for this problem is an almost total refusal to burn anything at all. It 'seems' to work fine, but if you verify the burn it invariably fails. If this is happening to you and you have an IDE burner try this fix.
You will need to install mkinitcpio as described here,Configuring_mkinitcpio so you can rebuild the kernel. You now need to reconfigure your /etc/mkinitcpio.conf file to reuse the old IDE drivers.
gedit /etc/mkinitcpio.conf
Find the line:
MODULES="ata_generic ata_piix"
and change it to (insert piix in the front)
MODULES="piix ata_generic ata_piix"
Then, find the line:
HOOKS="base udev autodetect pata scsi sata usbinput keymap filesystems"
and change that to (replace pata with ide)
HOOKS="base udev autodetect ide scsi sata usbinput keymap filesystems"
Use mkinitcpio to rebuild the kernel as described in it's own wiki page, and reboot. In brief :
mkinitcpio -g /boot/kernel26.img