[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

PXE CentOS 修復模式

這是一份快捷的教學文檔來透過你的 PXE 伺服器提供 CentOS 修復模式。

這篇文章假設你已經擁有:

1. 一台運作中的 pxelinux 式 PXE 伺服器

2. 一台運作中的 DHCP 伺服器。

在你的 PXE 伺服器上:

# mkdir -p /tftpboot/images/centos/4.4/

從首張光碟上的 /images/pxeboot/ 目錄內複製 vmlinuzinitrd.img 到 /tftpboot/images/centos/4.4/

1. 設定檔

Http 方式

建立一個 kickstart 設定檔(ks.cfg)並將它放置在你的網頁伺服器上。

# Kickstart configuration file CentOS 4.4 Rescue Mode
#
#System  language
#
lang en_US.UTF-8
#
#Language modules to install
#
langsupport --default=en_US.UTF-8 en_US.UTF-8
#
#System keyboard
#
keyboard us
#
#System mouse
#
mouse none
#
#Retrieve rescue system from NFS
#
# nfs --server=$yournfsserverip  --dir=/directory/that/contains/disc1/CentOS/RPMS/
#
#Retrieve rescue system from http
#
url --url http://$yourwebserver/directory/that/contains/disc1/CentOS/RPMS/
#
#Network information
#
network --bootproto=dhcp

PXE 選單內的記錄。

LABEL CentOS 4.4 Rescue via HTTP
        KERNEL images/centos/4.4/vmlinuz
        MENU LABEL ^CentOS 4.4 Rescue via HTTP
        APPEND initrd=images/centos/4.4/initrd.img ramdisk_size=10000 text rescue ks=http://$yourwebserver/path/to/your/ks.cfg

NFS 方式

建立一個 kickstart 設定檔(ks.cfg)並將它放置在你的 NFS 伺服器上。

# Kickstart configuration file CentOS 4.4 Rescue Mode
#
#System  language
#
lang en_US.UTF-8
#
#Language modules to install
#
langsupport --default=en_US.UTF-8 en_US.UTF-8
#
#System keyboard
#
keyboard us
#
#System mouse
#
mouse none
#
#Retrieve rescue system from NFS
#
nfs --server=$yournfsserverip  --dir=/directory/that/contains/disc1/CentOS/RPMS/
#
#Retrieve rescue system from http
#
# url --url http://$yourwebserver/directory/that/contains/disc1/CentOS/RPMS/
#
#Network information
#
network --bootproto=dhcp

PXE 選單內的記錄。

LABEL CentOS 4.4 Rescue via NFS
        KERNEL images/centos/4.4/vmlinuz
        MENU LABEL ^CentOS 4.4 Rescue via NFS
        APPEND initrd=images/centos/4.4/initrd.img ramdisk_size=10000 text rescue ks=nfs:$yournfsserverip:/path/to/your/ks.cfg

Translation of revision 15


2023-09-11 07:23