close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_fs.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Aug 26, 2011, 2:16:36 PM (14 years ago)
- Author:
-
adherelinux
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v7
|
v8
|
|
| 1 | 1 | == qemu-pxe == |
| | 2 | |
| | 3 | 系統:Ubuntu10.10-i386 |
| | 4 | 硬體:Dell OPTIPLEX 980 |
| 2 | 5 | |
| 3 | 6 | 這邊我們引用Stan http://superstanwu.blog.ithome.com.tw/post/775/76131 [[br]] |
| … |
… |
|
| 74 | 77 | } |
| 75 | 78 | }}} |
| | 79 | |
| | 80 | 重新啟動tftp,dhcp |
| | 81 | {{{ |
| | 82 | sudo /etc/init.d/dhcp3-server start |
| | 83 | sudo /etc/init.d/tftpd-hpa start |
| | 84 | }}} |
| | 85 | |
| | 86 | 啟動NA讓tap0上的封包轉發到eth0 |
| | 87 | {{{ |
| | 88 | sudo bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward' |
| | 89 | iptables -F |
| | 90 | iptables -X |
| | 91 | iptables -t nat -F |
| | 92 | iptables -t nat -X |
| | 93 | iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT |
| | 94 | iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/24 -j MASQUERADE |
| | 95 | iptables -L |
| | 96 | }}} |
| | 97 | |
| | 98 | 利用qemu指令作網路開機 |
| | 99 | {{{ |
| | 100 | qemu -boot n -option-rom /usr/share/qemu/pxe-ne2k_pci.bin -m 512 -net nic -net tap,ifname=tap0,script=no |
| | 101 | }}} |