| 1 | ''' Console Cloning ''' |
| 2 | |
| 3 | For some special projects and external sandboxes we needed to build a self contained console that ran all orbit services on a single machine. For efficient/reproducible console building we needed to use a different imaging tool than Frisbee because of Frisbee limitation to ext3. We also needed a network based OMF independent method of collecting the images (since the image would contain OMF services). |
| 4 | |
| 5 | For this setup we will use two pieces of software NFS and clonezilla and 2 machines. There may be other work able combinations but we have not tested them. |
| 6 | |
| 7 | NFS Server: |
| 8 | We're using the default NFS server that comes with Ubuntu 12.04 LTS (setup refrences located [https://help.ubuntu.com/community/SettingUpNFSHowTo here]) |
| 9 | {{{ |
| 10 | apt-get install nfs-kernel-server |
| 11 | }}} |
| 12 | |
| 13 | The following line in /etc/exports includes the paramters we specified so the live clonezilla instance could connect to it. |
| 14 | {{{ |
| 15 | /export/image/ *(rw,no_root_squash,async,insecure,no_subtree_check) |
| 16 | }}} |
| 17 | To load the console image, you will need to untar the current version of the clonezilla image directory that you will mount from the NFS server (/export/image/ in this case). The tar file can be located downloaded [ here]. Note the clonezilla tool doesn't make single file images like frisbee. It makes a whole directory instead, which are usually named by timestamps by default. (2013-07-25-19-img in this case). |
| 18 | |
| 19 | Image Machine: |
| 20 | |
| 21 | On the machine we're using to write the we'll need to start the clonezilla live instance. The main clonezilla documentation is located [http://clonezilla.org/clonezilla-live.php here], the current download page is [http://clonezilla.org/downloads.php here]. When creating the console disk image we used clonezilla-live-2.1.2-20-i486.iso as the iso basis for our Live USB key. This version is now replaced and isn't on the webpage (might be in an archive). The newer version ''should'' be compatible with images made before. |
| 22 | |
| 23 | There are several discussion on how to build the live usb located [http://clonezilla.org/liveusb.php here]. However I used [http://www.linuxliveusb.com/ lili] on a windows machine. You could also just burn the iso onto a CD-R. Which ever method you choose, boot the machine into the live clonezilla session. We're now ready to begin the process. |
| 24 | |
| 25 | 1. Begin booting the image machine with the clonezilla live USB (or CD if you went that route). |
| 26 | 1. You will be presented with a boot menu of boot choices, choose the one relevant for your setup. we used the VGA option. |
| 27 | 1. We answered Dont' touch keymap for the keymap question |
| 28 | 1. Once at the ncurses clonezilla menu, choose start clonezilla. |
| 29 | 1. Choose the device-image option (we want to use the network). |
| 30 | 1. Choose the NFS server option |
| 31 | 1. The tool will enumerate the network interfaces and then ask you which network interface you want to configure. On our consoles, we usually reserve eth1 for the control interface, and thus the network path to our repository is via that interface. Pick the interface that connects to the network your NFS server is on. |
| 32 | 1. Assuming you are using dhcp in your network choose dhcp, other wise manually specify the address (it's assumed that the NFS server is in the same subnet). |
| 33 | 1. Once you have an address, you will be prompted for the IP or hostname of your NFS server. Since this is a debian based live linux, you can press ctrl-alt-f2 to jump to another virtual console and check if there is connectivity between the Image machine and your NFS server (ping, host, etc... ) |
| 34 | 1. It will then ask you to specify the directory of you image repository. It will locally mount this to a very specfic directory name, however the remote mount point doesn't have to be named this. |
| 35 | 1. Once it mounts the image repository, it will then ask you if you want to go into beginner or expert mode. Choose beginner (expert mode just lets you specfiy all parameters as command line flags, instead of asking you). |
| 36 | 1. Choose restore Disk from the list of possible actions (NOT restore part) |
| 37 | 1. It will then enumerate all the choices it discovered from the NFS mount point (if this list is empty and every thing mounted correctly, enusre that the tar command extracted a directory into our NFS root, instead of placing the contents of said directory into your NFS root.) |
| 38 | 1. Choose the 2013-7-25-19 image. |
| 39 | 1. It will begin the image process and ask for several confirmations (say yes to all of them). |
| 40 | 1. Once complete choose to reboot (remember to remove the boot media before the machine comes up for the second time) |
| 41 | |
| 42 | The Image machine should now start up as a regular console. |
| 43 | |
| 44 | Post image steps: |
| 45 | 1. Configure /etc/dhcp/dhcpd.conf to reflect the MAC's of your locations nodes |
| 46 | 1. Check inventory database to ensure data integrity |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |