<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Spind.net Blog &#187; Remote</title>
	<atom:link href="http://blog.spind.net/tag/remote/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.spind.net</link>
	<description>Stories from the trenches of System Administration</description>
	<lastBuildDate>Mon, 19 Dec 2011 09:21:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Reinstalling CentOS 5.6 remote</title>
		<link>http://blog.spind.net/2011/06/07/reinstalling-centos-5-6-remote/</link>
		<comments>http://blog.spind.net/2011/06/07/reinstalling-centos-5-6-remote/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 14:58:18 +0000</pubDate>
		<dc:creator>hc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reinstallation]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[VNC]]></category>

		<guid isPermaLink="false">http://blog.spind.net/?p=184</guid>
		<description><![CDATA[Download images and add entry to Grub boot loader. Make sure you put in the right networking values: 1234567891011121314151617cd /boot mkdir centos5-x86_64 cd centos5-x86_64 wget http://mirror.leaseweb.com/centos/5.6/os/x86_64/isolinux/initrd.img wget http://mirror.leaseweb.com/centos/5.6/os/x86_64/isolinux/vmlinuz /sbin/grubby &#160; --add-kernel /boot/centos5-x86_64/vmlinuz &#160; --initrd=/boot/centos5-x86_64/initrd.img &#160; --args=&#34;ip=x.x.x.x netmask=y.y.y.y gateway=z.z.z.z dns=n.n.n.n &#160; &#160; ksdevice=eth0 &#160; &#160; method=http://mirror.leaseweb.com/centos/5.6/os/x86_64/ &#160; &#160; lang=en_US &#160; &#160; keymap=us &#160; &#160; vnc &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Download images and add entry to Grub boot loader. Make sure you put in the right networking values:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:590px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /boot<br />
mkdir centos5-x86_64<br />
cd centos5-x86_64<br />
wget http://mirror.leaseweb.com/centos/5.6/os/x86_64/isolinux/initrd.img<br />
wget http://mirror.leaseweb.com/centos/5.6/os/x86_64/isolinux/vmlinuz <br />
/sbin/grubby<br />
&nbsp; --add-kernel /boot/centos5-x86_64/vmlinuz<br />
&nbsp; --initrd=/boot/centos5-x86_64/initrd.img<br />
&nbsp; --args=&quot;ip=x.x.x.x netmask=y.y.y.y gateway=z.z.z.z dns=n.n.n.n<br />
&nbsp; &nbsp; ksdevice=eth0<br />
&nbsp; &nbsp; method=http://mirror.leaseweb.com/centos/5.6/os/x86_64/<br />
&nbsp; &nbsp; lang=en_US<br />
&nbsp; &nbsp; keymap=us<br />
&nbsp; &nbsp; vnc<br />
&nbsp; &nbsp; vncpassword=foobar<br />
&nbsp; &nbsp; headless&quot;<br />
&nbsp; --title=&quot;CentOS Reinstall&quot;</div></td></tr></tbody></table></div>
<p>Assuming the new Grub entry is the first one (0), ask Grub to boot pick it next reboot:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:590px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">echo “savedefault --stage2=/boot/grub/stage2 --default=0 --once” | grub --batch</div></td></tr></tbody></table></div>
<p>Now cross your fingers, pray to your preferred deity or lack thereof and reboot. If your karma is good, the server should come up in a few minutes. Now connect to it with the VNC client of your choice. Example:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:590px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vncviewer x.x.x.x:1</div></td></tr></tbody></table></div>
<p>If you&#8217;re lucky, you should be presented with something along the lines of this:</p>
<p><img src="/uploads/2011/06/centos-reinstall-11-600x450.png" alt="" title="centos-reinstall-1" width="600" height="450" class="alignnone size-medium wp-image-190" /></p>
<p>Now it&#8217;s all up to you. Based on my experience, I recommend making good use of RAID and LVM and keep your /root and /home partitions separate, but it&#8217;s all up to you. Be careful though &#8211; once you&#8217;ve started messing with the partition table, your disk is wiped and there is no way back &#8211; you have to finish the installation before you can give the remote reinstall another go.</p>
<p><img src="/uploads/2011/06/centos-reinstall-2-600x450.png" alt="" title="centos-reinstall-2" width="600" height="450" class="alignnone size-medium wp-image-192" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spind.net/2011/06/07/reinstalling-centos-5-6-remote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 5 Remote Reinstall over VNC</title>
		<link>http://blog.spind.net/2010/01/14/centos-5-remote-reinstall-over-vnc/</link>
		<comments>http://blog.spind.net/2010/01/14/centos-5-remote-reinstall-over-vnc/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:26:57 +0000</pubDate>
		<dc:creator>hc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reinstall]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[VNC]]></category>

		<guid isPermaLink="false">http://blog.spind.net/?p=169</guid>
		<description><![CDATA[So you want to live your life on the edge, and do a remote reinstall of your server? The reasons can be many &#8211; maybe the server was compromised, or &#8211; like me &#8211; you just received a freshly installed new system with a horrible disk partitioning or maybe even the wrong choice of architecture. [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to live your life on the edge, and do a remote reinstall of your server? The reasons can be many &#8211; maybe the server was compromised, or &#8211; like me &#8211; you just received a freshly installed new system with a horrible disk partitioning or maybe even the wrong choice of architecture. I&#8217;ll show you how! <img src='http://blog.spind.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I just received my dedicated server at bulk price, but unfortunately also with a bulk installation of CentOS. It&#8217;s fitted with two 250G disks, yet there is no mirroring or anything installed. On top of this, this delicious 64-bit system was running a 32-bit operating system. I was not amused. Asking for a special reinstall would probably cost me a fortune in support, and even then I probably wouldn&#8217;t get it exactly like I wanted it.</p>
<p>Luckily most new Linux distributions feature remote installation via VNC. If the system is already running Linux &#8211; like this one &#8211; its both easy and safe to play around with this method. In this example, we&#8217;ll be installing CentOS 5.4 x86_64.</p>
<p>Step 1: Get a hold of the bootstrap files. This includes the Linux kernel image and the ramdisk image. Put these on your /boot partition:</p>
<div class="codebox">
$ cd /boot<br />
$ mkdir centos5-x86_64<br />
$ cd centos5-x86_64<br />
$ wget http://mirror.leaseweb.com/centos/5.4/os/x86_64/isolinux/vmlinuz<br />
$ wget http://mirror.leaseweb.com/centos/5.4/os/x86_64/isolinux/initrd.img
</div>
<p>Step 2: Add an entry to the Grub boot loader. Adjust values for network (ip, netmask, dns, gateway) and pick a better VNC password than me. Copy the &#8220;root (&#8230;)&#8221; line from a working entry:</p>
<div class="codebox">
title CentOS 5 VNC Install<br />
        root (hd0,0)<br />
        kernel /centos5-x86_64/vmlinuz vnc vncpassword=foobar headless ip=1.2.3.4 netmask=255.255.255.0 gateway=1.2.3.1 dns=2.3.4.5 ksdevice=eth0 method=http://mirror.leaseweb.com/centos/5.4/os/x86_64/ lang=en_US keymap=us<br />
        initrd /centos5-x86_64/initrd.img
</div>
<p>Step 3: Ask the Grub boot loader to boot your new entry next time, and only next time. This makes a lot of sense if your hosting facility allows you to power cycle the server remote &#8211; and they should. Really. If you can&#8217;t do this yourself, at least you can have some support drone push the reset button if the server doesn&#8217;t come up. Note what number your new entry in the Grub configuration file has. First one is 0, second is 1 etc. I had two entries already, so that made my new entry number 2:</p>
<div class="codebox">
$ echo &#8220;savedefault &#8211;stage2=/boot/grub/stage2 &#8211;default=2 &#8211;once&#8221; | grub &#8211;batch
</div>
<p>Step 4: Reboot and be patient. Some servers take up to five minutes to come back up &#8211; probably because of a BIOS misconfiguration. Anyway, reboot it:</p>
<div class="codebox">
$ reboot
</div>
<p>Step 5: Connect to your server with your favorite VNC client. Mine&#8217;s <a href="http://sourceforge.net/projects/cotvnc/">Chicken of the VNC</a> <img src='http://blog.spind.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  You&#8217;ll need to connect to port 5901, which in VNC-terms often is referred to as &#8220;Display 1&#8243;. Use the password you specified:</p>
<p><a href="/uploads/2010/01/vnc.png"><img src="/uploads/2010/01/vnc.png" alt="vnc" title="vnc" width="509" height="314" class="alignnone size-full wp-image-173" /></a></p>
<p>Step 6: Run the install <img src='http://blog.spind.net/wp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  After this, your neat remote installation will be wiped, so double check all your network settings.</p>
<p><a href="/uploads/2010/01/install.png"><img src="/uploads/2010/01/install-600x466.png" alt="install" title="install" width="600" height="466" class="alignnone size-medium wp-image-174" /></a></p>
<p>Good luck! <img src='http://blog.spind.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spind.net/2010/01/14/centos-5-remote-reinstall-over-vnc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

