|
|
|
|
| |
 |
Triển khai toàn bộ hệ thống nhanh chóng với PXE Server
12:19 | 11/05/2011
PXE ( Preboot eXecution Environment hay Pre-execution Environment ) là môi trường để cài đặt và khởi động máy tính bằng network interface. Máy client sẽ lấy file cài đặt từ PXE server thông qua TFTP. Do đó, PXE là sự lựa chọn tốt nhất khi bạn cần cài đặt cho nhiều máy cùng lúc hoặc cho nhưng máy không có ổ đĩa CD/DVD.
|
1) Triển khai PXE server
Yêu cầu: PXE server ( CentOS ) + PXE client ( Card mạng có hỗ trợ boot code )
- Cài tftp-server, dhcp, httpd, syslinux.
- Sữa file cấu hình tftp
- Tạo file remap với nội dụng:
- Copy các file sau vào /tftpboot:
cp /usr/lib/syslinux/pxelinux.0 /tftpboot
cp /usr/lib/syslinux/menu.c32 /tftpboot |
- Tạo thư mục /pxelinux.cfg trong /tftpboot
- Tạo file default trong /pxelinux.cfg
prompt 1
default menu.c32
timeout 100
label Linux
kernel vmlinuz
append initrd=initrd.img ramdisk_size=9216 noapic acpi=off
label Window
kernel Boot/startrom.0
append – |
- Copy vmlinuz và initrd.img ( trong thư mục isolinux trên bộ đĩa cài linux ) vào /tftpboot/images/centos.
- Copy bộ đĩa cài đặt linux vào /tftpboot/centos
- Thêm các dòng sau vào file cấu hình dhcpd
allow booting;
allow bootp;
option option-128 code 128 = string;
option option-129 code 129 = text;
next-server 192.168.0.20;
filename "/pxelinux.0"; |
- Thêm các dòng sau vào file cấu hình httpd
<Directory /tftpboot/centos>
Options Indexes
AllowOverride None
</Directory>
|
- Cài và cấu hình samba
- Tạo thư mục /share
- Chép bộ cài đặt Windows vào /share
- Download Window AIK
- Cài .NET Framework, MSXML, Window AIK vào thư mực c:\waik
cd \waik\tools\petools\
copype.cmd x86 c:\win7pe
imagex /mountrw winpe.wim 1 mount |
- Tạo thư mục chứa file PXE
- Copy các file cần thiết vào thư mục c:\pxe
cd \win7pe\mount\windows\boot\pxe
copy * \pxe
cd \ win7pe\mount\windows\boot\fonts
copy wgl4_boot.ttf \pxe
cd \waik\tools\petools\x86\boot
copy boot.sdi \pxe
cd \ win7pe
copy winpe.wim \pxe |
- Tạo BCD file
cd win7pe\mount\windows\system32
bcdedit /createstore \pxe\BCD
bcdedit /store \pxe\bcd /create {ramdiskoptions} /d "Ramdisk options"
bcdedit /store \pxe\bcd /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store \pxe\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
bcdedit /store \pxe\BCD /create /d "MyWinPE Boot Image" /application osloader |
- Bạn sẽ được một dãy: {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx}
bcdedit /store \pxe\BCD /set {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx}systemroot \Windows
bcdedit /store \pxe\BCD /set {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx}detecthal Yes
bcdedit /store \pxe\BCD /set {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx}winpe Yes
bcdedit /store \pxe\BCD /set {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx}osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /set {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx}device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /create {bootmgr} /d "Windows VISTA BootManager"
bcdedit /store \pxe\BCD /set {bootmgr} timeout 30
bcdedit /store \pxe\BCD /displayorder {xxxxxxxx-xxxx-xxxx-xxxxxxxxxx} |
- Bây giờ, copy tất cả các file trong thư mục c:\pxe vào /tftpserver/Boot trên PXE server
- Trở lại PXE server, nhập lệnh sau để đổi tên file
cd /tftpboot/Boot
mv pxeboot.n12 startrom.0
mv bootmgr.exe ..
mv winpe.wim WinPE.wim |
2) Cài Đặt Windows Client từ PXE Server
- Nhập lệnh sau để client kết nối vào thư mục /share trên PXE server và lấy bộ cài đặt Windows
X:\Windows\system32>net use h: \\192.168.0.20\share
- Nhập username và password mà chúng ta đã tạo bước cài đặt và cấu hình Samba.
Username: kenhgiaiphapvn
Password: 123
- Quá trình cài đặt windows sẽ tự động được kích hoạt.
3) Cài đặt Linux Client từ PXE Server
Sự ra đời của PXE đã giúp cho việc cài đặt các máy clients (Linux + Windows) (của người quản trị) trở nên dễ dàng, tiết kiệm chi phí và thời gian. Nếu như trước kia, khi bạn cần cài đặt hệ điều hành cho hàng loạt máy tính, bạn phải burn rất nhiều đĩa để cài cho từng máy. Điều này khiến bạn mất khá nhiều thời gian và lãng phí. Giờ đây, bạn chỉ cần cài đặt một PXE server để client kết nối vào và lấy thông tin cài đặt.
Gia Hưng ( Nguồn: wiki.centos.org, linux-sxs.org )
|
| |
|
|
|
|
|
|
|
|
|
| Các
tin mới nhất :
|
-
Giải pháp chứng thực RADIUS sử dụng các công cụ miễn phí.
-
Triển khai toàn bộ hệ thống nhanh chóng với PXE Server
-
Giải pháp Data Replication ,High Availability và Disaster Recovery hiệu quả với SteelEye Datakeeper
-
Giải pháp Replicated trên Windows 2K3 và 2K8 với SteelEye DataKeeper Cluster Edittion
-
Cài đặt và sử dụng Zenoss trên Centos
-
Tổng quan về Zenoss
-
Cần sao lưu những gì trên hệ thống Linux Home Server?
-
Hoạch định kiến trúc “Vật lý” và “Luận lý” triển khai SharePoint theo mô hình Farm
-
Tìm hiểu hệ thống DNS ứng dụng công nghệ Anycast
-
Hệ thống tên miền DNS Việt Nam những điều bạn cần biết
|
|
|
| Các
tin liên quan :
|
-
Giải pháp Data Replication ,High Availability và Disaster Recovery hiệu quả với SteelEye Datakeeper
-
Giải pháp Replicated trên Windows 2K3 và 2K8 với SteelEye DataKeeper Cluster Edittion
-
Cài đặt và sử dụng Zenoss trên Centos
-
Tổng quan về Zenoss
-
Cần sao lưu những gì trên hệ thống Linux Home Server?
-
Hoạch định kiến trúc “Vật lý” và “Luận lý” triển khai SharePoint theo mô hình Farm
-
Tìm hiểu hệ thống DNS ứng dụng công nghệ Anycast
-
Hệ thống tên miền DNS Việt Nam những điều bạn cần biết
-
Tìm hiểu hệ thống tên miền (DNS – Domain Name System)
-
Giải pháp Webserver cho doanh nghiệp
|
Xem tiếp  |
|
|
|
|
 |
Bài
nhiều người đọc cùng chuyên mục
|
|
|
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|