{"id":1297,"date":"2013-11-22T11:31:54","date_gmt":"2013-11-22T16:31:54","guid":{"rendered":"http:\/\/yuguangzhang.com\/blog\/?p=1297"},"modified":"2015-11-19T09:55:23","modified_gmt":"2015-11-19T14:55:23","slug":"how-to-clone-a-gentoo-workstation","status":"publish","type":"post","link":"http:\/\/yuguangzhang.com\/blog\/how-to-clone-a-gentoo-workstation\/","title":{"rendered":"How to Clone a Gentoo Workstation"},"content":{"rendered":"<p>Installing Gentoo Linux across all Pentium 4 machines for <a href=\"https:\/\/datamill.uwaterloo.ca\">DataMill<\/a> was an easy process. I copied an existing installation across hard drives. While installing Gentoo on the source machine, I had <em>-march=pentium4<\/em> in make.conf while I would recommend i686 or x86_64 for a generic install that can be copied over a large number of machines. I follow the same steps as <a href=\"http:\/\/www.gentoo-wiki.info\/HOWTO_Clone_a_Gentoo_Server_or_Workstation\">http:\/\/www.gentoo-wiki.info\/HOWTO_Clone_a_Gentoo_Server_or_Workstation<\/a>, with slight modifications.<br \/>\n<a href=\"http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010873.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010873-300x168.jpg\" alt=\"DataMill benchmark cluster\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-1300\" srcset=\"http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010873-300x168.jpg 300w, http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010873-1024x575.jpg 1024w, http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010873.jpg 1800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nOn the source machine, I boot up the <a href=\"http:\/\/www.sysresccd.org\/Download\">System Rescue CD<\/a> and resize the last partition of the install to fit the hard drive size. I also have netcat compiled and uploaded to my site. I run <\/p>\n<div class=\"code\">ifconfig -a<\/div>\n<p> to find out its ip address. Before I start the cloning process, I also change the hostname. <\/p>\n<div class=\"code\">\nmount \/dev\/sda3 \/mnt\/gentoo #sda4 is the partition for \/<br \/>\nvim \/mnt\/gentoo\/etc\/conf.d\/hostname<br \/>\numount \/mnt\/gentoo<br \/>\ndd if=\/dev\/sda conv=sync,noerror bs=1024 count=30000000 | .\/nc -l 0 -p 5000\n<\/div>\n<p>On the destination machine, I boot the Gentoo Live CD, download netcat, and listen to port 5000. <\/p>\n<div class=\"code\">\nnet-setup eth0 #your network interface may vary<br \/>\nwget http:\/\/yourdomain.com\/linux\/nc<br \/>\nchmod +x nc<br \/>\n.\/nc <strong>10.10.10.16<\/strong> 5000 | dd of=\/dev\/sda bs=1024\n<\/div>\n<p>Replace the IP address with the one you obtained from the source machine.<br \/>\n<a href=\"http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010872.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010872-300x168.jpg\" alt=\"Resize partition with System Rescue CD\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-1299\" srcset=\"http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010872-300x168.jpg 300w, http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010872-1024x575.jpg 1024w, http:\/\/yuguangzhang.com\/blog\/wp-content\/uploads\/2013\/11\/P1010872.jpg 1800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Gentoo Linux across all Pentium 4 machines for DataMill was an easy process. I copied an existing installation across hard drives. While installing Gentoo on the source machine, I had -march=pentium4 in make.conf while I would recommend i686 or x86_64 for a generic install that can be copied over a large number of machines. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-1297","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts\/1297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/comments?post=1297"}],"version-history":[{"count":1,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts\/1297\/revisions"}],"predecessor-version":[{"id":1441,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/posts\/1297\/revisions\/1441"}],"wp:attachment":[{"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/media?parent=1297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/categories?post=1297"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yuguangzhang.com\/blog\/wp-json\/wp\/v2\/tags?post=1297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}