Writing CD is an old fashion but a lot of server hardware all ready use CD-ROM. Writing ISO files into CD-ROM from bash can seem very hard job. But it is not as hard as it seem.
刻录CD是一种古老的方式,但是许多服务器硬件都可以立即使用CD-ROM。 从bash将ISO文件写入CD-ROM看起来很困难。 但这并不像看起来那么难。
安装Mkisofs,Cdrecord (Install Mkisofs, Cdrecord)
We will install tools named mkisofs
and cdrecord
into our system. Apt and Yum package installation is below.
我们将在系统中安装名为mkisofs
和cdrecord
工具。 Apt和Yum软件包安装如下。
Debian,Ubuntu,Mint,Kali (Debian, Ubuntu, Mint, Kali)
We can install mkisofs
and cdrecord
tools with the following commands In Debian, Ubuntu, Mint, Kali.
我们可以使用以下命令在Debian,Ubuntu,Mint和Kali中安装mkisofs
和cdrecord
工具。
$sudo apt-get install mkisofs cdrecord
CentOS,Fedora,RHEL (CentOS, Fedora, RHEL)
We can install mkisofs
and cdrecord
tools with the following commands In CentOS, Fedora, RHEL.
我们可以在CentOS,Fedora,RHEL中使用以下命令安装mkisofs
和cdrecord
工具。
$ sudo yum install mkisofs cdrecord
列出Cdrom设备 (List Cdrom Devices)
We need to get CDROM device major and minor numbers. We will use cdrecord
toll for this information. We will also provide the CDROM device type which is ATA
in this example.
我们需要获取CDROM设备的主要和次要编号。 我们将使用cdrecord
收费来获取此信息。 在此示例中,我们还将提供CDROM设备类型为ATA
。
$ sudo cdrecord dev=ATA: -scanbus
通过指定写入速度将ISO文件写入CD (Write ISO File Into CD By Specifying Write Speed)
We will provide major, minor numbers of the device and use these numbers to specify target CDROM
我们将提供设备的主设备号和次设备号,并使用这些数字指定目标CDROM
$ sudo cdrecord -dev=ATA:1,1,0 speed=4 ubuntu.iso
Following options can be used to change the command behavior like speed, verbosity, and device
以下选项可用于更改命令行为,例如速度,详细程度和设备
speed=4 is the writing speed f the CDROM
speed = 4是CDROM的写入速度
-dev=ATA:1,1,0 specify target cdrom device
-dev = ATA:1,1,0指定目标CDROM设备
详细写操作(Verbose Write Operation)
In some cases there may be some problem with writing CD or we may need to get more detailed information about the write operation. We can use -v
option in order to print verbose information about the writer.
在某些情况下,写CD可能会出现问题,或者我们可能需要获取有关写操作的更多详细信息。 我们可以使用-v
选项来打印有关编写器的详细信息。
$ sudo cdrecord -v -dev=ATA:1,1,0 ubuntu.iso