- 論壇徽章:
- 0
|
需要備份主機(jī):192.168.1.10
ubuntu服務(wù)器:192.168.1.103,安裝dhcp、tftp、nfs
dhcp配置:
option domain-name "192.168.1.103";
option domain-name-servers 192.168.1.103;
default-lease-time 600;
max-lease-time 7200;
next-server 192.168.1.103;
filename "pxelinux.0";
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.105 192.168.1.109;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
}
nfs配置:
root@ubuntu:/etc# cat exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/nfs *(sync,rw)
tftp配置:
root@ubuntu:/etc# cat /etc/xinetd.d/tftp
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot/root
source = 11
cps = 100 2
flags = IPv4
}
root@ubuntu:/etc# cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot/root"
TFTP_ADDRESS="0.0.0.0:69"
#TFTP_OPTIONS="-l -c -s"
TFTP_OPTIONS="--secure -c"
tftp根目錄為:/tftpboot/root
該目錄下文件有:
root@ubuntu:/etc# ls /tftpboot/root/
chain.c32 filesystem.squashfs initrd.img ipxe.lkn mboot.c32 memdisk menu.c32 pxelinux.0 pxelinux.cfg vesamenu.c32 vmlinuz
其中:pxelinux.0 memdisk mboot.c32 chain.c32 menu.c32 是從ubuntu服務(wù)器本機(jī)的/usr/lib/syslinux下面拷貝的,
filesystem.squashfs initrd.img ipxe.lkn vesamenu.c32 vmlinuz是從clonezilla live景象中l(wèi)ive目錄下面拷貝過來,clonezilla版本為clonezilla-live-20121217-raring,
pxelinux.cfg目錄包含文件:
root@ubuntu:/tftpboot/root# ls pxelinux.cfg/
default default.bak graphics.conf tools
root@ubuntu:/tftpboot/root/pxelinux.cfg# cat default
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local
MENU TITLE Main Menu
MENU INCLUDE pxelinux.cfg/graphics.conf
MENU AUTOBOOT Starting Local System in 300 seconds
LABEL tools
MENU LABEL ^Setup ToolBox Menu
KERNEL menu.c32
APPEND pxelinux.cfg/tools
root@ubuntu:/tftpboot/root/pxelinux.cfg# cat graphics.conf
menu color tabmsg 37;40 #80ffffff #00000000
menu color hotsel 30;47 #40000000 #20ffffff
menu color sel 30;47 #40000000 #20ffffff
menu color scrollbar 30;47 #40000000 #20ffffff
MENU WIDTH 80
MENU MARGIN 22
MENU ROWS 6
MENU TABMSGROW 15
MENU CMDLINEROW 15
MENU ENDROW 24
MENU TIMEOUTROW 13
MENU VSHIFT 6
#MENU MASTER PASSWD yourpassword
#MENU PASSPROMPT Enter Password:
#MENU PASSWORDROW 12
#MENU PASSWORDMARGIN 26
NOESCAPE 0
ALLOWOPTIONS 0
root@ubuntu:/tftpboot/root/pxelinux.cfg# cat tools
MENU TITLE Setup ToolBox Menu
LABEL Main Menu
MENU LABEL ^Return to Main Menu
KERNEL menu.c32
APPEND pxelinux.cfg/default
LABEL Clonezilla
MENU LABEL ^Clonezilla Live
KERNEL vmlinuz
APPEND initrd=initrd.img boot=live union=aufs noswap noprompt vga=788 ocs_live_keymap=NONE ocs_lang=zh_CN.UTF-8 fetch=tftp://192.168.1.103/filesystem.squashfs
root@ubuntu:/tftpboot/root/pxelinux.cfg#
所有系統(tǒng)均是在vm虛擬機(jī)上,當(dāng)創(chuàng)建好另外一個虛擬機(jī),從pxe啟動之后,能夠讀到pxe的啟動文件,加載內(nèi)核,但是之后就報:waiting for live-config to be finished,然后停光標(biāo)停在那里就不動了。
這問題已經(jīng)折騰了我老多天。有使用clonezilla的兄弟們有沒有碰到過這問題?請幫忙,萬分感謝 |
|