Show Table of Contents
6.2.3. 準備一個初始 RAM disk 的更新
重要
這是項進階程序,您只應在無法透過任何其它方式進行驅動程式更新的情況下進行這項程序。
Red Hat Enterprise Linux 安裝程式能在安裝程序進行早期時,由 RAM disk 為自己載入更新 — 您電腦記憶體中,某個能暫時性地作為磁碟的區域。您能使用此相同的功能來載入驅動程式更新。若要在進行安裝時執行一項驅動程式更新,您的電腦必須能夠由 preboot execution environment(PXE)伺服器開機,並且您的網路上必須要擁有有效的 PXE 伺服器。欲取得有關於在進行安裝時使用 PXE 上的相關指南,請參閱 章 30, 設定一個安裝伺服器。
若要能夠使用在您的 PXE 伺服器上的驅動程式更新:
- 請將驅動程式更新映像檔放置在您的安裝伺服器上。通常,您會藉由從一個 Red Hat 或是硬體供應商所提供的網路位置來將它下載至安裝伺服器上。驅動程式更新映像檔的名稱結尾會是
.iso。 - 請將驅動程式更新映像檔複製至
/tmp/initrd_update目錄中。 - 請將驅動程式更新映像檔重新命名為
dd.img。 - 請在指令列上切換至
/tmp/initrd_update目錄中、輸入下列指令,然後按下 Enter:find . | cpio --quiet -o -H newc | gzip -9 >/tmp/initrd_update.img
- 請將
/tmp/initrd_update.img這個檔案複製至存放了您希望使用來進行安裝的 target 的目錄中。此目錄位於/var/lib/tftpboot/pxelinux/目錄中。比方說,/var/lib/tftpboot/pxelinux/r6c/可能存放了 Red Hat Enterprise Linux 6 的 PXE target。 - 請編輯
/var/lib/tftpboot/pxelinux/pxelinux.cfg/default檔案使其包含一個含有您剛建立的初始 RAM disk 更新的項目,格式如下:label target-dd kernel target/vmlinuz append initrd=target/initrd.img,target/dd.img
target 代表您希望使用於安裝的目標。
欲學習如何在進行安裝時使用初始 RAM disk 更新,請參閱 節 6.3.4, “選擇一個包含了驅動程式更新的 PXE target”。
範例 6.1. 透過驅動程式更新映像檔來準備一項初始 RAM disk 更新
在此範例中,
driver_update.iso 是個您由網路上所下載至您 PXE 伺服器目錄中的一個驅動程式更新映像檔。您希望由 PXE 開機的目標位於 /var/lib/tftpboot/pxelinux/rhel6/ 中
請在指令列上切換至存放了該檔案的目錄上,並輸入下列指令:
$ cp driver_update.iso /tmp/initrd_update/dd.img $ cd /tmp/initrd_update $ find . | cpio --quiet -c -o -H newc | gzip -9 >/tmp/initrd_update.img $ cp /tmp/initrd_update.img /var/lib/tftpboot/pxelinux/rhel6/dd.img
請編輯
/var/lib/tftpboot/pxelinux/pxelinux.cfg/default 檔案並包含下列項目:
label rhel6-dd kernel rhel6/vmlinuz append initrd=rhe6/initrd.img,rhel6/dd.img

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.