免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1093 | 回复: 0
打印 上一主题 下一主题

在linux下制作光盘镜像 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-02 11:39 |只看该作者 |倒序浏览

该文章来源于
http://www.blogjava.net/mstar/archive/2007/05/19/118575.html
Creating an ISO Image
Here are a couple of different commands for creating an ISO image:
[root@server /root]# mkisofs -RJ -o image.iso /burndirectory/
[root@server /root]# mkisofs -J -o image.iso /burndirectory
mkisofs -o image.iso -b images/boot.img -c boot.cat -R -J -T /my/file/tree
The options (-RJ) will preserve long filenames, casing and Rock Ridge extensions (long mixed-case filenames and symbolic links for *nix).
-J  Generate Joliet directory records  in  addition  to
       regular iso9660 file names.  This is primarily use-
       ful when the discs are to be used on Windows-NT  or
       Windows-95  machines.    The  Joliet  filenames are
       specified in Unicode and each path component can be
       up to 64 Unicode characters long.
   -R  Generate  SUSP  and RR records using the Rock Ridge
       protocol to  further  describe  the  files  on  the
       iso9660 filesystem.
Copying a CD to a File on your Filesystem
Here are a couple of mentods for copying a CD to a file:
[root@server /root]# dd if=/dev/cdrom of=image.iso
[root@server /root]# cat /dev/cdrom >image.iso
More info can be found here:
cdimage.html

Buring an ISO Image to CDR or CDRW
[root@server /root]# cdrecord -v dev=3,0,0 image.iso
Blanking CDRW Media
Here are a few methods to blank CDRW media:
[root@server /root]# cdrecord blank=fast dev=3,0,0
[root@server /root]# cdrecord blank=all dev=3,0,0
[root@server /root]# cdrecord blank=all -force dev=3,0,0
Copying Directly from One CD to Another
[root@server /root]# cdrecord -v dev=3,0,0 -isosize /dev/cdrom
Where the dev designation is the cd burner and /dev/cdrom is your regular cdrom drive.
Verifying an ISO Image or CDR/CDRW
[root@server /root]# md5sum
- or -
[root@server /root]# diff /dev/cdrom image.iso
- or -
[root@server /root]# mount /mnt/cdrom;
[root@server /root]# mount -t iso9660 iso.image /mnt/isotest -o loop;
[root@server /root]# diff -r /mnt/cdrom /mnt/isotest
- or -
[root@server /root]# md5sum /dev/cdrom >md5sum-cdrom.txt
[root@server /root]# md5sum image.iso >md5sum-file.txt
#Script to verify the md5sum results:
echo "Verifying MD5SUMS:"
MD5SUM1=md5sum-file.txt
MD5SUM2=md5sum-cdrom.txt
cat $MD5SUM1 | while read CODE NAME; do
     if [ -n "`cat $MD5SUM2 | grep $CODE`" ]; then
          echo "Success: $NAME"
     else
          echo "Failure: $NAME"
     fi
done
Using an ISO Image without Burning it to CD Media
Mount it via the loop device:
[root@server /root]# mkdir /mnt/isotest
[root@server /root]# mount -t iso9660 /dev/cdrom /mnt/isotest -o loop
[root@server /root]# ls /mnt/isotest
More Info:
loop.html
cdimage.html

Setting up your system to work with cdrecord
Before performing the entries mentioned for /etc/modules.conf, try just adding the following line to the global section of /etc/lilo.conf:
append="hda=ide-scsi"
Then run /sbin/lilo, reboot, then run cdrecord -scanbus to see if your CDRW is detected:
[root@server /root]# /sbin/lilo
[root@server /root]# shutdown -r now
...
[root@server /root]# cdrecord -scanbus
If the above doesn't work, then you may need to complete the following steps:
Red Hat 7.1 (and probably 6.2 and 7.0) should already have a kernel that is ready to work with cdrecord. You probably need to add some or all of the following entries into /etc/modules.conf (or /etc/conf.modules):
options ide-cd ignore=hda            # tell the ide-cd module to ignore hdb
#alias scd0 sr_mod                    # load sr_mod upon access of scd0
alias scd0 ide-scsi                    # load sr_mod upon access of scd0
#pre-install ide-scsi modprobe imm    # uncomment for some ZIP drives only
pre-install sg     modprobe ide-scsi # load ide-scsi before sg
pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod
pre-install ide-scsi modprobe ide-cd # load ide-cd   before ide-scsi
Script for checking out your system:
cdre_sh.txt

Finding your CDR or CDRW drive
[root@server /root]# cdrecord -scanbus

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/58682/showart_475039.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP