2011年2月7日 星期一

linux iso files

dd 是可以用來製作可燒錄的CD/DVD映像檔(ISO)!


用版大的例子(適用於僅含資料的光碟):

#dd if=/dev/cdrom of=file.iso

#cat /dev/cdrom > ~/file.iso

file.iso可以用cdrecord, k3b, 或是nero直接燒錄,


如果是音樂CD,就不能用上述的dd指令了!你得把每一軌(或每首歌)分開來拷貝而且要指定bs和count,有點複雜。用cdparanoia或是X-CdRoast還來的方便些!

----------------------------

可以用isoinfo來查詢CD上得iso資訊,例如:

> isoinfo -d -i /dev/cdrom

CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: FC/3 x86_64
Volume set id:
Publisher id:
Data preparer id:
Application id: FC/3 x86_64
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 326239
El Torito VD version 1 found, boot catalog is in sector 123
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
Eltorito validation header:
Hid 1
Arch 0 (x86)
ID ''
Key 55 AA
Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 0 (No Emulation Boot)
Load segment 0
Sys type 0
Nsect 4
Bootoff 7C 124

然後block size (bs) 和 volume size (count) 可以用來正確的,製作iso:

* 計算CD的check sum:

dd if=/dev/cdrom bs=2048 count=326239 conv=notrunc,noerror | md5sum

(Linux kernel 2.6: /media/cdrecorder)

* 製作 iso image:

dd if=/dev/cdrom bs=2048 count=326239 conv=notrunc,noerror > file-name.iso

-------------------

至於DVD,如果是DVD-5(單層片)或是DVD+/-R的資料片,可以用和CD同樣的方法來製作iso。雙層DVD-DL的資料片應該也是可以的,但是得用雙層片DVD-DL來燒錄。至於電影的DVD,應該也是可以的(自己沒試過,下面提供的網頁中有詳細的說明)

$ dd if=/dev/dvd of=DVD.iso bs=2048

不過現在的DVD大都是雙層片(DVD-9),你得用雙層片來燒錄。

-----------------------------

這些網頁有一些有關備份CD/DVD更詳細的資料:

http://www.yolinux.com/TUTORIALS/LinuxTutorialCDBurn.html

http://gentoo-wiki.com/HOWTO_Backup_a_DVD

----------------------

另外,Windows上也有 dd可以使用:
http://www.chrysocome.net/dd

Mounting ISO and DD Image Files

Most images downloaded from the Internet will be iso9660, Windows filesystems are normally ntfs, Linux are commonly ext2, and Macintosh are udf or hfs.

As a last resort, you can work your way down the list of filesystem types listed in the mount man pages.

After you know the filesystem type, you are ready to mount.
Note: replace <_type> with the filesystem type.

To mount the file livebootcd.iso with write enabled:

mount -t <_type> -o loop ./livebootcd.iso /mnt

To mount an image made from a Windows partition in read-only mode:

mount -t ntfs -o loop,ro,umask=0222 ./evidence.dd /mnt

文章分類