引用 | 編輯
122052981
2005-02-01 11:12 |
樓主
▼ |
||
x0
將3片iso檔合併成一個iso檔的方法灌LINUX時常常要換片 不過現在DVD燒錄器越來越普遍 所以我就一直想把3個iso合併成一個然後用DVD燒錄器燒起來 以後只要放一片就ok了 以下是合併的步驟 1. 首先你必須要有一個很大的磁碟空間 大概要3.5g是free的 然後把你的3個iso檔放到這裡ex: shrike-i386-disk1.iso shrike-i386-disk2.iso shrike-i386-disk3.iso 2 照打下列指令 mkdir shrike-i386-disc{1,2,3} shrike-docs 這是建立 shrike-i386-disc{1,2,3} 和 shrike-docs 這4個目錄 3 將那3個iso檔掛載到建立好的shrike-i386-disc{1,2,3} 這3個目錄 mount -o ro,loop shrike-i386-disc1.iso shrike-i386-disc1 mount -o ro,loop shrike-i386-disc2.iso shrike-i386-disc2 mount -o ro,loop shrike-i386-disc1.iso shrike-i386-disc3 4 照打以下指令 cp -a shrike-i386-disc1/isolinux shrike-i386-disc1/.discinfo . 這是copy shrike-i386-disc1裡的isolinux和.discinfo這兩個檔案到此目錄 5 編輯.discinfo檔案 講第4行的 1 換成 1,2,3 以表示要用這三個disk iso來灌 6 照以下指令打(以下整個是一行指令) mkisofs -o shrike-i386-dvd.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL -x shrike-i386-disc1/.discinfo -x shrike-i386-disc1/isolinux -graft-points Psyche-i386-disc1 .discinfo=.discinfo isolinux/=isolinux RedHat/=shrike-i386-disc2/RedHat RedHat/=shrike-i386-disc3/RedHat docs/=Psyche-docs note: 1 以上的全部動作都必須在同一個資料夾內進行 也就是你放iso的地方 2 之後會產生一個很大的iso檔 檔名是 shrike-i386-dvd.iso 因為很大 加上本來的3個iso檔 所以要合併前一定要確認擁有足夠的空間 3 雖然現在慢慢都有dvd的iso檔 不過像比較舊的 redhat9 就沒有 所以提出來當作參考 ^^希望對各位會有幫助 以上的我已經試過了 結果是成功的 x0
|
引用 | 編輯
webber788
2005-05-21 11:23 |
2樓
▲ ▼ |
大大這個我已經找了很久了說,太感謝你了,
因為每一次,都要浪費3片光碟,真的很頭疼 有了這個方法,就只要一片,我先來試試看了! x0 |
引用 | 編輯
opa
2005-05-27 23:41 |
4樓
▲ ▼ |
我有來插花一下 國外看到的
#/bin/bash # by Chris Kloiber <ckloiber@redhat.com> # A quick hack that will create a bootable DVD iso of a Red Hat Linux # Distribution. Feed it either a directory containing the downloaded # iso files of a distribution, or point it at a directory containing # the "RedHat", "isolinux", and "images" directories. # This version only works with "isolinux" based Red Hat Linux versions. # Lots of disk space required to work, 3X the distribution size at least. # GPL version 2 applies. No warranties, yadda, yadda. Have fun. ##Roll your own DVD isos using my script. Get the latest CD isos into one directory, then run: # mkdvdiso.sh /path/to/the/cd/isos /location/and/name/of/dvd.iso # growisofs -Z /dev/scd0=/location/and/name/of/dvd.iso if [ $# -lt 2 ]; then echo "Usage: `basename $0` source /destination/DVD.iso" echo "" echo " The 'source' can be either a directory containing a single" echo " set of isos, or an exploded tree like an ftp site." exit 1 fi cleanup() { [ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit [ -d $LOOP ] && rm -rf $LOOP [ ${DVD:=~/mkrhdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit [ -d $DVD ] && rm -rf $DVD } cleanup mkdir -p $LOOP mkdir -p $DVD if [ !`ls $1/*.iso 2>&1>/dev/null ; echo $?` ]; then echo "Found ISO CD images..." CDS=`expr 0` DISKS="1" for f in `ls $1/*.iso`; do mount -o loop $f $LOOP cp -av $LOOP/* $DVD if [ -f $LOOP/.discinfo ]; then cp -av $LOOP/.discinfo $DVD CDS=`expr $CDS + 1` if [ $CDS != 1 ] ; then DISKS=`echo ${DISKS},${CDS}` fi fi umount $LOOP done if [ -e $DVD/.discinfo ]; then awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="$DISKS" $DVD/.discinfo > $DVD/.discinfo.new mv $DVD/.discinfo.new $DVD/.discinfo fi else echo "Found FTP-like tree..." rsync -avP --exclude SRPMS $1/* $DVD # cp -av $1/* $DVD [ -e $1/.discinfo ] && cp -av $1/.discinfo $DVD fi rm -rf $DVD/isolinux/boot.cat find $DVD -name TRANS.TBL | xargs rm -f # My thanks to Mubashir Cheema for suggesting this fix. # cd $DVD mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 8 -boot-info-table $DVD /usr/lib/anaconda-runtime/implantisomd5 --force $2 # Don't like forced mediacheck? Try this instead. # /usr/lib/anaconda-runtime/implantisomd5 --supported-iso --force $2 cleanup echo "" echo "Process Complete!" echo "" x0 |