Chinaunix首页 | 论坛 | 博客
  • 博客访问: 69674
  • 博文数量: 19
  • 博客积分: 1420
  • 博客等级: 上尉
  • 技术积分: 200
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-03 17:53
文章分类

全部博文(19)

文章存档

2011年(1)

2008年(18)

我的朋友

分类: LINUX

2008-02-02 11:39:11

该文章来源于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:

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:

Finding your CDR or CDRW drive

[root@server /root]# cdrecord -scanbus
阅读(1072) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~