{"id":3,"date":"2008-10-21T13:30:10","date_gmt":"2008-10-21T11:30:10","guid":{"rendered":"http:\/\/evcz.tk\/blog\/?p=3"},"modified":"2013-10-28T11:28:09","modified_gmt":"2013-10-28T09:28:09","slug":"remote-centos-install","status":"publish","type":"post","link":"https:\/\/evcz.tk\/blog\/2008\/10\/21\/remote-centos-install\/","title":{"rendered":"Remote CentOS 6 install with VNC"},"content":{"rendered":"<p>*POST UPDATED &#8211; now referring to centos6*<br \/>\n<strong>I get in touch with many people related to centos reinstall&#8230; I&#8217;m aware in certain conditions it&#8217;s a pain to have it rolling properly&#8230;<br \/>\nI do this for work, just contact me if you want it done for a small fee \ud83d\ude09<\/strong><\/p>\n<p>There are some ISPs in the dedicated servers market that are offering <strong>crappy<\/strong> CentOS installs&#8230;<\/p>\n<p>With &#8220;crappy&#8221; I mean: broken\/modifed images&#8230;<\/p>\n<p>The worst example I had the opportunity to try was <a href=\"http:\/\/www.ovh.it\" target=\"_blank\">OVH<\/a>.<br \/>\nOVH is in general a very good dedicated hosting provider offering very nice services at an impressive low price&#8230; but they have the bad attitude to install custom operating systems that many times cannot be reverted back to the original kernels \ud83d\ude41<\/p>\n<p>One of them is their CentOS 5 install&#8230; Lucky for us it&#8217;s not a big problem as, most times, it&#8217;s possible to do a clean CentOS install \ud83d\ude09<\/p>\n<p><!--more--><\/p>\n<p>This is a simple procedure to do an official, <strong>clean<\/strong> install from the <em>genuine<\/em> CentOS disks \ud83d\ude42<\/p>\n<ol>\n<ol>\n<li>Install CentOS from the OVH manager with the <strong>default partitioning<\/strong> proposed by OVH<br \/>\n(this procedure will work with whatever operating system you want&#8230; i suggested centos so it will report &#8220;centos&#8221; also in the ovh manger \ud83d\ude1b make sure you are able to get grub working on the os you want to use \ud83d\ude09 )<\/li>\n<li>once everything is done log into the box via ssh as root<\/li>\n<li>issue these commands:\n<pre lang=\"bash\">yum update -y\r\nmkdir \/centos_install\r\ncd \/centos_install\r\nwget http:\/\/it.centos.contactlab.it\/6\/os\/x86_64\/images\/pxeboot\/initrd.img\r\nwget http:\/\/it.centos.contactlab.it\/6\/os\/x86_64\/images\/pxeboot\/vmlinuz\r\ncp vmlinuz \/boot\/vmlinuz.cent.pxe\r\ncp initrd.img \/boot\/initrd.img.cent.pxe<\/pre>\n<\/li>\n<li>Add to\/Edit the grub menu.lst entry to load the pxe kernel\n<pre lang=\"bash\">nano -w \/boot\/grub\/menu.lst<\/pre>\n<p>in that file paste:<\/p>\n<pre lang=\"bash\">title Centos Install (PXE)\r\nroot (hd0,0)\r\nkernel \/boot\/vmlinuz.cent.pxe vnc vncpassword=YOURPSW headless ip=YOURIP netmask=255.255.255.0 gateway=GATEWAYIP dns=8.8.8.8 ksdevice=eth0 method=http:\/\/it.centos.contactlab.it\/6\/os\/x86_64\/ lang=en_US keymap=us\r\ninitrd \/boot\/initrd.img.cent.pxe<\/pre>\n<\/li>\n<\/ol>\n<\/ol>\n<p><strong><br \/>\nreplace<\/strong><\/p>\n<ol>\n<ol>\n<ul>\n<li>YOURPSW with the VNC password you want setup (at least 6 chars long on centos5!)<\/li>\n<li>YOURIP with the ip of the box&#8230;<\/li>\n<li>GATEWAYIP with the gateway assigned to your boxHint: you can see the gateway ip by issuing\n<pre lang=\"bash\">route -n | grep UG<\/pre>\n<\/li>\n<\/ul>\n<\/ol>\n<\/ol>\n<p>once you have done this you need to count the number of times &#8220;title&#8221; appears in the file, press ctrl +x, and save the file<\/p>\n<ul>\n<li>type:\n<pre lang=\"bash\">grub<\/pre>\n<p>write in there:<\/p>\n<pre lang=\"bash\">savedefault --default=2 --once<\/pre>\n<p>replace <strong>2<\/strong> with the number of times &#8220;title&#8221; appeared in manu.lst <strong>minus one<\/strong> (if you counted 6 &#8220;title&#8221; entries&#8230; write 5 in here)\n<\/li>\n<li>\n<pre lang=\"bash\">reboot<\/pre>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>After issuing the reboot ping the box (should take max 2minutes to take up the network)&#8230; 30seconds (or more&#8230; depending how fast your box is) after it starts replying to the ping open a vnc client (on windows i suggest ultravnc) and connect to<\/p>\n<p>YOURIP:1<\/p>\n<p>put as password the one you placed as YOURPSW &#8230;<\/p>\n<p>install CentOS \ud83d\ude42<\/p>\n<p><a href=\"http:\/\/evcz.tk\/blog\/wp-content\/uploads\/2008\/10\/20986211xq2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-4\" title=\"20986211xq2\" src=\"http:\/\/evcz.tk\/blog\/wp-content\/uploads\/2008\/10\/20986211xq2-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p><strong>Tested on<\/strong>:<\/p>\n<p><span style=\"color: green;\"><strong>Success<\/strong><\/span><\/p>\n<ul>\n<li>OVH kimsufi reloaded (Intel Celeron 220)<\/li>\n<li>OVH kimsufi reloaded xl (Intel e2180, Asus P5VD2-VM)<\/li>\n<li><a href=\"http:\/\/img386.imageshack.us\/my.php?image=94391747nx8.png\" target=\"_blank\">OVH kimsufi reloaded xxl (Intel e7200, Intel DG31PR)<\/a><\/li>\n<li>OVH SP BestOF (Intel e6750)<\/li>\n<li>Keyweb KM 4400 DC (Intel e4500, Ati chipset IIRC)<\/li>\n<li>Intel i5 \/ p55 \/ e1000e eth<\/li>\n<li>OVH kimsufi Q-1T<\/li>\n<li>OVH kimsufi i7-2T (pxe kernel modification required: <a href=\"http:\/\/kbase.redhat.com\/faq\/docs\/DOC-17783\">instructions<\/a>, needs the eth attansic module)<\/li>\n<li>Dell R200<\/li>\n<li>Dell R410<\/li>\n<li>a lot others&#8230;.<\/li>\n<\/ul>\n<p><strong>Known problems<\/strong><\/p>\n<ul>\n<li>If you didn&#8217;t follow exactly the how-to and did a custom partioning with \/boot\/ partition on it&#8217;s own you will have to take away the \/boot\/ path from the menu.lst &#8230;<\/li>\n<li>OVH netboot kernels might no more be able to boot into your box (even without LVM&#8230; dunno&#8230; maybe I did a too &#8220;base&#8221; install&#8230;)<\/li>\n<li>keep a vnc password short&#8230; most clients cannot auth with long passwords<\/li>\n<li>some ISPs may block incoming vnc traffic in that case consider to use the <strong>vncconnect=host:port<\/strong> (instead of <strong>vnc<\/strong>) trigger to have the server connecting to your PC (documentation: <a href=\"http:\/\/dcantrel.fedorapeople.org\/doc\/vnc\/VNC_Whitepaper-vnc-connect-mode.html\">vncconnect<\/a> )<\/li>\n<li>I had big trouble with certain servers not being able to run the CentOS 5.5 pxe install&#8230; on those I had to fall-back using the 5.4 install.. in case you want to use them you can find everything in here: <a href=\"http:\/\/vault.centos.org\/5.4\/\">http:\/\/vault.centos.org\/5.4\/<\/a>: make sure to adjust also the mirror in the grub config file!<\/li>\n<\/ul>\n<p><strong>If not working<\/strong><\/p>\n<ul>\n<li>On certain images reference grub config file is \/boot\/grub\/grub.cfg instead of menu.lst<\/li>\n<li>If the box do not come up (ping) after the reboot&#8230; do a reimage and try over&#8230; double check the settings&#8230; expecially network settings.<\/li>\n<li>If the box does not works (not ping reply) and you are sure networking is set correctly try to boot vkvm to see if the PXE kernel is loaded properly to exclude any problem with the bootloader.<\/li>\n<\/ul>\n<p><strong>Random things<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/dcantrel.fedorapeople.org\/doc\/vnc\/VNC_Whitepaper-vnc-modes-in-anaconda.html\">http:\/\/dcantrel.fedorapeople.org\/doc\/vnc\/VNC_Whitepaper-vnc-modes-in-anaconda.html<\/a><\/li>\n<li><a href=\"http:\/\/fedoraproject.org\/wiki\/Anaconda\/Options\">http:\/\/fedoraproject.org\/wiki\/Anaconda\/Options<\/a><\/li>\n<li>in this example I used the 32bit image&#8230; 64bit is exactly the same, just change the image you fetch at the beginning from the CentOS mirror and the mirror path into the grub config \ud83d\ude09<\/li>\n<li>if you are running grub2 (like ubuntu 9.10) this is an example on how to set it up:\n<pre lang=\"bash\">sudo chmod +x \/etc\/grub.d\/40_custom\r\nsudo nano \/etc\/grub.d\/40_custom<\/pre>\n<p>place in there something like:<\/p>\n<pre lang=\"bash\">menuentry \"centos.pxe\" {\r\nset root=(md0)\r\nkernel \/boot\/vmlinuz.cent.pxe vnc vncpassword=YOURPSW headless ip=YOURIP netmask=255.255.255.0 gateway=GATEWAYIP dns=8.8.8.8 ksdevice=eth0 method=http:\/\/ftp.hosteurope.de\/mirror\/centos.org\/5\/os\/i386\/ lang=en_US keymap=us\r\ninitrd \/boot\/initrd.img.cent.pxe\r\n}<\/pre>\n<p>save and issue:<\/p>\n<pre lang=\"bash\">sudo update-grub2<\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>*POST UPDATED &#8211; now referring to centos6* I get in touch with many people related to centos reinstall&#8230; I&#8217;m aware in certain conditions it&#8217;s a pain to have it rolling properly&#8230; I do this for work, just contact me if you want it done for a small fee \ud83d\ude09 There are some ISPs in the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/evcz.tk\/blog\/2008\/10\/21\/remote-centos-install\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Remote CentOS 6 install with VNC&#8221;<\/span><\/a><\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5,9],"class_list":["post-3","post","type-post","status-publish","format-standard","hentry","category-howto","tag-centos","tag-vnc"],"_links":{"self":[{"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/posts\/3","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/comments?post=3"}],"version-history":[{"count":52,"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions\/254"}],"wp:attachment":[{"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/media?parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/categories?post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/evcz.tk\/blog\/wp-json\/wp\/v2\/tags?post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}