答案:這就要看你的燒錄器了。通常較新的型號都會有 1MB 或更多,這樣它便可以 支持 1-2 秒沒有資料。如果你想得到更多的資料你可以問生產商或看看硬體手冊。
不管那些資料緩衝器的大小如何你都需要保證一個長時間 300 kb/s 或 600 kb/s 的經常 輸出。
一些硬碟密集的工作例如更新 locate-資料庫。
減低 maxium flow rate 就肯定會損壞你的光碟;你最好在燒錄光碟前用
cron
, at
或
anacron
來檢查一下你有否執行這些工作。
另一方面,有些人說他們能一面編譯核心一面燒錄光碟都沒有任何問題。 的確你要一部很快的機器才能做這個實驗。
Fragmentation 通常都不會影響輸出。不過你可以很容易制造 pathological cases of fragmentation 來減低你的硬碟輸出大約 100 kbyte/second。所以千萬不要這樣做。:-)
是的,你的硬碟會 fragmented 經過經年的使用。如果越快fragmented,那檔案系統便越 滿。經常保持 10% 或 20% 的空間,這樣燒錄光碟便沒有問題了。
如果你不肯定的話你可以看看啟動時的訊息,你就可以看到你的檔案系統有幾多磁碟空間 fragmentation 的百份比。你可以用一個非常危險的指令
shell> e2fsck -n /dev/sda5 # '-n' is important!
[stuff deleted - ignore any errors]
/dev/sda5: 73/12288 files (12.3% non-contiguous)
在這個範例中磁碟空間似乎非常鬆散 ─ 不過這裏只有 73 個非常小的檔案在這 個檔案系統中,所以這個只不過是一個很少的值。
現在有一個實驗性的工具軟件叫做 e2defrag 它可以用來 defragment extended-2 檔案系統。不過現在的版本在私人環境中還是不夠穩定。如果你真想 defragment 你 的檔案系統,請先備份 (最好:兩份),嘗試 restore 備份,然後建立一個新的檔案系 統 (會破壞舊有的) 最後再 restore 備份。總之這是最安全的技巧。
可以。只有一個檔案系統是不能可靠和快速來燒錄光碟的,這就是 network filesystem (NFS)。
我現在是在一部 (486/66) PC 中使用 UMSDOS 來讓Linux 和 DOS/Win 共享磁碟 空間,而這部 486 是專門來燒錄光碟用的。
可以。你可以用任何一個檔案系統來燒錄光碟。不過你不能在其他的操作系統中使 用這隻光碟。
用這個方法就行了:
dd if=/dev/zero of="empty_file" bs=1024k count=650
bash> /sbin/mke2fs empty_file
empty_file is not a block special device.
Proceed anyway? (y,n) y
mount -t ext2 -o loop=/dev/loop1 empty_file /mnt
cdwrite
或 cdrecord
來看看這個檔案 ( 它現在該不是空的 ) 是不是 iso9660-影像。如困你想在/etc/fstab
加一個出入口給那隻光碟的話,你便需要取消對那隻光
碟的檢查,例如:
/dev/cdrom /cdrom ext2 defaults,ro 0 0
第一個零代表 "不要包含在 dumps" ,第二個零代表 "在啟動時不要檢錯誤" ( fsck 將不會檢查光碟內的錯處 ) 。
現在有多個軟件。最新的叫作 "cdpranoia" 它可以在以下地方下載
http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia/index.html
或者你可以嘗試 "cdda2wav" 和 "sox" 的組合,可以在 sunsite 和它的 mirror 中取得
ftp://sunsite.unc.edu/pub/Linux/apps/sound/cdrom/cdda2wav0.71.src.tar.gzftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-cb3.tar.gz
cdda2wav
令你可以由光碟中抓取到一段特定的(或一整條)音軌然後可以
將它轉為 .wav 檔案。 sox
可以將 wav 檔案轉回音樂光碟的cdda 格式,
然後可以用 cdwrite
將它燒錄在光碟上。 如果你是使用最新版本的cdrecord
,你便不需要使用 sox
因為 cdrecord
已內置支援 .au 和 .wav 檔案。
drivers/scsi/scsi.c
有所需要的資料。
/*
* Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
* with "0 1 2 3" replaced by your "Host Channel Id Lun".
* Consider this feature BETA.
* CAUTION: This is not for hotplugging your peripherals. As
* SCSI was not designed for this you could damage your
* hardware !
* However perhaps it is legal to switch on an
* already connected device. It is perhaps not
* guaranteed this device doesn't corrupt an ongoing data transfer.
*/
Please note that this should only be used if your add SCSI-devices at the end of the chain. Inserting new SCSI-devices into an existing chain disturbs the naming of devices (directory /dev) and may destroy the complete content of your harddisk.
可以。不過你要注意的是如果當讀取光碟時有任何的錯誤發生,都可能令杪寫失敗。
第一個情況:你有一個可寫光碟機和一個唯讀光碟機。你可以用以下的指令
cdwrite -v -D /dev/sgc --pad -b $(isosize /dev/scd0) /dev/scd0
or
cdrecord -v dev=3,0 speed=2 -isosize /dev/scd0
你可以從/dev/scd0
讀取資料流然後直接經由/dev/sgc
寫入光碟中。
第二個情況:你沒有另一個唯讀光碟。你便需要用可寫光碟機來讀取光碟:
dd if=/dev/scd0 of=cdimage bs=1c count=`isosize /dev/scd0`
這個指令等同於 mkisofs
,所以你可以用第三章所提及的方法繼續
餘下的工作。請注意這個方法是不適用於音樂光碟。
可以。最新的核心 (2.0.36 和以後) 已內置支援 joliet 格式。請記著你要在 /etc/fstab 中使用 iso9660 和 joliet 兩個選項。要取得更多資料,你可以看 http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html.
就如同你使用普通唯讀光碟機一樣。沒有任何的特別。注意你要使用scd-devices (唯讀光碟機) 來讀取光碟。以下便是在/etc/fstab 中的範例:
/dev/scd0 /cdrom iso9660 ro,user,noauto 0 0
用 bzip2
以取代其他的壓縮器好像 gzip
或
pkzip
。這會節省30%的磁碟空間。你可以在以下地方下載
http://www.muraroa.demon.co.uk/
Instead of writing a true audio-CD, you can optionally convert your wav-audio-files into mp3-audio-files and store them on a ISO-9660 filesystem as regular files. Usually MPEG III gives you a compression of 1:10.
Of course, most CD-players are not able to read files... this is the drawback. On the other hand, why not running the music for your next party from harddisk? 18 Gbyte are enough for 3000-4000 titles. :-)
A software MPEG III-encoder is available from
http://www.stud.ifi.uio.no/~larsi/other/8hz-mp3-cheng.tar.gz
A MPEG III-player is available from
http://homepages.uni-tuebingen.de/student/michael.hipp/mpg123/
For recorded speech, you may want to try to reduce its size using
shorten
or "GSM lossy speech compression":
ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/http://kbs.cs.tu-berlin.de/~jutta/toast.html
You must have an 1.44 MB bootable floppy-disk. Create an exact image of this floppy-disk by issuing the command
dd if=/dev/fd0 of=boot.img bs=18k
Place this floppy-image into the directory holding the collection of your files (or into a subdirectory of it, just as you like). Tell mkisofs about this file with the option '-b' and also use '-c'. For details read the file README.eltorito in the mkisofs-distribution.
An interesting application for a custom bootable CD is as a virus-safe DOS- or Windows-system. It saves you the money for the harddisks (if you have a network and use samba to put the user-data on a fileserver). However, this is purely theoretical as nobody reported an actual recipe to me.
Some details about the bootable RedHat CD-ROM is available from http://www.channel1.com/users/rodsmith/rhjol-technical.html.
There is an overlay-filesystem available for Linux, which is mounted over the CD-ROM and intercepts all writing operations. New and modified files are stored elsewhere, but for the user it looks like the CD-ROM is modified. For more information, see http://home.att.net/~artnaseef/ovlfs/ovlfs.html.
If that is not enough for your needs: wait for the UDF-filesystem to be supported by Linux or help developing it (see http://trylinux.com/projects/udf/.
Yes. However, it has been only tested with two writers yet. And you need a kernel patch for more buffers in the SCSI-generic driver ( ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha).
The german computer magazine "c't" had a list of tips regarding the blank CD-Rs in their november 1996 issue: