15 Oct 2012

djwong: (Default)
You are going to create a chroot on a VM host, then set up a PXE environment to net-boot the system. Let %CHROOT% be the chroot location on the host; %VM_NET_IP% be the IP address of the local VM network; %VM_NET_CIDR% be the CIDR of the local VM network; and %VM_NET_BRIDGE% be the name of the bridge that ties together the local VM network.

1. Use debootstrap to set up a chroot at %CHROOT%.
2. Add full set of Ubuntu repos to %CHROOT%.
3. Use djwong repo install.sh to install djwong package sources.
4. chroot %CHROOT% su - root
5. apt-get install djwong-mtr djwong-kernel-support
6. Install some sort of kernel.
7. Jump out to host.
8. virsh net-destroy default
9. virsh net-edit default
10. Add "<tftp root="%CHROOT%/boot/" />" as a child of the <ip> element.
11. Add "<bootp file="pxelinux.0" />" as a child of the <dhcp> element.
12. virsh net-start default
13. apt-get install nfs-kernel-server
14. Add "%CHROOT%/ %VM_NET_CIDR%(ro,sync,no_root_squash,no_subtree_check)" to /etc/exports. Do not be tempted to add "-H %VM_NET_IP%" to /etc/default/nfs-kernel-server; this will result in NFS3 being disabled due to braindead nfs init script!
15. /etc/init.d/nfs-kernel-server restart
16. ufw enable
17. ufw allow ssh
18. ufw allow cups
19. ufw allow in on %VM_NET_BRIDGE%
20. Create a VM with e1000 (not virtio-net) NIC, set to boot PXE.
21. Start VM.

Profile

djwong: (Default)
Bogus J. Simpson

May 2016

S M T W T F S
1234567
891011121314
15161718192021
2223242526 2728
293031    

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated 24 Aug 2025 03:23
Powered by Dreamwidth Studios