<?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>IONCANNON &#187; Fedora</title>
	<atom:link href="http://www.ioncannon.net/tag/fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ioncannon.net</link>
	<description>Thoughts on Software Development and Engineering</description>
	<lastBuildDate>Tue, 03 Jan 2012 13:59:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<atom:link rel='hub' href='http://www.ioncannon.net/?pushpress=hub'/>
		<item>
		<title>Upgrade to Fedora 13 from Fedora 12</title>
		<link>http://www.ioncannon.net/system-administration/1136/upgrade-to-fedora-13-from-fedora-12/</link>
		<comments>http://www.ioncannon.net/system-administration/1136/upgrade-to-fedora-13-from-fedora-12/#comments</comments>
		<pubDate>Thu, 27 May 2010 10:53:40 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=1136</guid>
		<description><![CDATA[After a week delay Fedora 13 has been released and it is time to upgrade of course. As always there are a decent number of features in this release but here are a few that stand out to me: boot.fedoraproject.org &#8211; A small bootable image to start the install from. IntelliJ IDEA &#8211; IntelliJ IDEA [...]]]></description>
			<content:encoded><![CDATA[<p>After a week delay <a href="http://docs.fedoraproject.org/en-US/Fedora/13/html/Release_Notes/index.html">Fedora 13</a> has been released and it is time to upgrade of course. As always there are a decent number of features in this release but here are a few that stand out to me:</p>
<ul>
<li><a href="http://boot.fedoraproject.org/">boot.fedoraproject.org</a> &#8211; A small bootable image to start the install from.</li>
<li><a href="https://fedoraproject.org/wiki/Features/IntelliJ_IDEA">IntelliJ IDEA</a> &#8211; IntelliJ IDEA community edition. I&#039;m glad to see my favorite IDE make it in along with Netbeans and Eclipse even if it is just the stripped down version.</li>
<li><a href="https://fedoraproject.org/wiki/Features/Python3F13">Python 3</a> &#8211; Running along side Python 2.</li>
<li><a href="https://fedoraproject.org/wiki/Features/NouveauDisplayPort">Nouveau DisplayPort</a> &#8211; Support for NVIDIA cards with a DisplayPort.</li>
<li><a href="https://fedoraproject.org/wiki/Features/RadeonDisplayPort">Radeon DisplayPort</a> &#8211; Support for Radeon cards with a DisplayPort.</li>
<li><a href="https://fedoraproject.org/wiki/Features/NetworkManagerCmdline">NetworkManager Command Line</a> &#8211; A command line interface for NetworkManager. As much as I find myself hating NetworkManager maybe this will help.</li>
<li><a href="http://library.gnome.org/misc/release-notes/2.30/">Gnome 2.30</a> &#8211; The latest stable version of Gnome.</li>
<li><a href="http://www.kde.org/announcements/announce-4.4.3.php">KDE 4.4</a> &#8211; The latest stable version of KDE.</li>
</ul>
<p>Check out the <a href="http://fedoraproject.org/wiki/Releases/13/FeatureList">Fedora 13 feature list<a> for all the major features in this release.</p>
<p><span id="more-1136"></span></p>
<p>I&#039;m continuing with the trend of using <a href="http://fedoraproject.org/wiki/Features/PreUpgrade">PreUpdate</a> to do the upgrade:</p>
<ol>
<li>Make sure you are using a Fedora 12 install. If you need instructions on getting to Fedora 12 then start with <a href="http://www.ioncannon.net/system-administration/719/upgrade-to-fedora-12-from-fedora-11/">upgrading from Fedora 11 to Fedora 12</a>.</li>
<li>yum clean all</li>
<li>yum update</li>
<li>Make sure you have plenty of space free in the /boot partition. I learned this lesson the last time I upgraded.</li>
<li>I always back up my xorg.conf file since because it seems to disappear sometimes.</li>
<li>preupgrade-cli &#034;Fedora 13 (Goddard)&#034; &#8211; My Fedora 12 to Fedora 13 upgrade weighed in at 1.0GB</li>
<li>reboot and wait</li>
</ol>
<p>No dependency issues when upgrading this time making it two in a row. I was tempted to try out the Nouveau NVIDIA drivers this time around but the driver from NVIDIA are not too hard to upgrade now so I haven&#039;t found a real reason. If you don&#039;t want to compile the NVIDIA drivers by hand you can get them from <a href="http://www.atrpms.net/">atrpms</a>, make sure to remove the Nouveau drivers first. The Fedora 13 version of <a href="http://www.virtualbox.org/wiki/Linux_Downloads">Virtualbox</a> was also needed.</p>
<p>I did run into a small issue with xorg after the upgrade. The NVIDIA driver requires the ignoreABI flag be sent to the X server on startup. I was able to modify startx but I always forget how to modify GDM. It turns out that you can also just put the flag in the xorg.conf file like this:</p>
<pre class="brush: plain; title: ; notranslate">
Section &quot;ServerFlags&quot;
        Option      &quot;ignoreABI&quot; &quot;true&quot;
EndSection
</pre>
<p>If you prefer the yum upgrade option here are the steps for that as well:</p>
<ol>
<li>yum clean all</li>
<li>yum update</li>
<li>rpm -Uvh http://mirrors.kernel.org/fedora/releases/13/Fedora/i386/os/Packages/fedora-release-13-1.noarch.rpm http://mirrors.kernel.org/fedora/releases/13/Fedora/i386/os/Packages/fedora-release-notes-13-3.fc13.noarch.rpm</li>
<li>yum clean all</li>
<li>yum -y update</li>
<li>You may need to resolve dependencies and then do another yum -y update or in my case I had to use &#8211;skip-broken to resolve some issues with packages I&#039;ve installed from atrpm.</li>
<li>reboot</li>
</ol>
<p>I needed to use the &#8211;skip-broken flag on yum this time but I didn&#039;t have to resolve any dependency issues. The resulting update was about 1.2G so it took a little while to apply. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/1136/upgrade-to-fedora-13-from-fedora-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building HipHop PHP for Fedora 12 on 64 bit and 32 bit Systems</title>
		<link>http://www.ioncannon.net/programming/918/building-hiphop-php-for-fedora-12-on-64-bit-and-32-bit-systems/</link>
		<comments>http://www.ioncannon.net/programming/918/building-hiphop-php-for-fedora-12-on-64-bit-and-32-bit-systems/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 11:14:04 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[hphp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=918</guid>
		<description><![CDATA[Now that Facebook has finally released the source for HipHop PHP it is time to give it a spin. Of course it is still a little rough around the edges so I figured I would toss together a quick howto on getting it to build. The first thing to note is that they are only [...]]]></description>
			<content:encoded><![CDATA[<p>Now that Facebook has finally released the source for <a href="http://github.com/facebook/hiphop-php/">HipHop PHP</a> it is time to give it a spin. Of course it is still a little rough around the edges so I figured I would toss together a quick howto on getting it to build.</p>
<p>The first thing to note is that they are only supporting 64 bit systems officially. Having said that it isn&#039;t too hard to modify the code to make it work on a 32 bit system although it may turn out that such early modifications are missing some fundamental bits on why they were only support 64 bit systems. I&#039;m going to assume at first that you are using a 64 bit system and then end with what you need if you are still using a 32 bit system.</p>
<p><span id="more-918"></span></p>
<p>I don&#039;t actually have a 64 bit system myself so I used an EC2 instance for the following instructions. To do the same start with Amazon&#039;s Basic 64-bit Fedora Core 8 (AMI Id: ami-86db39ef) instance (note that this is EBS backed so you will end up with an EBS volume after you start it) and then upgrade to Fedora 12 using my <a href="http://www.ioncannon.net/system-administration/894/fedora-12-bootable-root-ebs-on-ec2/">previous instructions on building a EBS bootable Fedora 12 instance</a>. You will need to remove a few packages to get the 64 bit version of Fedora 8 to upgrade that I didn&#039;t have to do for the 32 bit version, here are all the commands you need to get to a running 64 bit Fedora 12 instance (the entire upgrade takes about 20 minutes):</p>
<pre class="brush: bash; title: ; notranslate">
# Fedora 8 to Fedora 10
yum -y remove dmraid-1.0.0.rc14-4.fc8.i386 dmraid-1.0.0.rc14-4.fc8.i386 curl-7.18.2-7.fc8.i386
yum clean all
rpm -Uhv http://archive.kernel.org/fedora-archive/releases/10/Fedora/i386/os/Packages/fedora-release-10-1.noarch.rpm http://archive.kernel.org/fedora-archive/releases/10/Fedora/i386/os/Packages/fedora-release-notes-10.0.0-1.noarch.rpm
yum -y update

# Fedora 10 to Fedora 11
yum -y remove gpm-1.20.5-2.fc10.i386
yum clean all
rpm -Uvh http://mirrors.usc.edu/pub/linux/distributions/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-11-1.noarch.rpm http://mirrors.usc.edu/pub/linux/distributions/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-notes-11.0.0-2.fc11.noarch.rpm
yum -y update

# Fedora 11 to Fedora 12
yum -y remove cryptsetup-luks-1.0.6-7.fc11.i586
yum clean all
rpm -Uvh http://mirrors.kernel.org/fedora/releases/12/Fedora/i386/os/Packages/fedora-release-notes-12.0.0-4.fc12.noarch.rpm http://mirrors.kernel.org/fedora/releases/12/Fedora/i386/os/Packages/fedora-release-12-1.noarch.rpm
yum -y update

# Make sure the basics are installed
yum -y install gcc-c++ git
</pre>
<p>To start with there are some prerequisites you need. This can be taken care of in one command with yum:</p>
<pre class="brush: bash; title: ; notranslate">
yum -y install git cmake boost pcre-devel libicu-devel libmcrypt-devel oniguruma-devel mysql-devel gd-devel boost-devel libxml2-devel libcap-devel binutils-devel flex bison expat-devel
</pre>
<p>Next create a directory to hold everything in, change into that directory and create another directory to hold the customized libraries needed to compile HipHop PHP:</p>
<pre class="brush: bash; title: ; notranslate">
mkdir hiphop
cd hiphop
mkdir local
</pre>
<p>Next it is time to pull down the HipHop PHP source along with the source for some libraries it depends on (these all go into the hiphop directory created above):</p>
<pre class="brush: bash; title: ; notranslate">
git clone git://github.com/facebook/hiphop-php.git

wget &quot;http://downloads.sourceforge.net/project/re2c/re2c/0.13.5/re2c-0.13.5.tar.gz?use_mirror=cdnetworks-us-2&quot;
wget &quot;http://www.threadingbuildingblocks.org/uploads/77/142/2.2/tbb22_20090809oss_src.tgz&quot;
wget http://curl.haxx.se/download/curl-7.20.0.tar.bz2
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz

tar xvjf curl-7.20.0.tar.bz2
tar xvzf libevent-1.4.13-stable.tar.gz
tar xvzf re2c-0.13.5.tar.gz
tar xvzf tbb22_20090809oss_src.tgz
</pre>
<p>Next the customized patches get applied to some of the library sources and each is built to install in the custom directory:</p>
<pre class="brush: bash; title: ; notranslate">
export CMAKE_PREFIX_PATH=`pwd`/local

cd tbb22_20090809oss
gmake
cp -Rp include/tbb/ /usr/include/
cp `pwd`/build/*_release/*.so /usr/lib/
ldconfig
cd ..

cd re2c-0.13.5
./configure --prefix=`pwd`/../local
make install
cd ..

cd libevent-1.4.13-stable
cp ../hiphop-php/src/third_party/libevent.fb-changes.diff .
patch &lt; libevent.fb-changes.diff
./configure --prefix=`pwd`/../local
make install
cd ..

cd curl-7.20.0
cp ../hiphop-php/src/third_party/libcurl.fb-changes.diff .
patch -p0 &lt; libcurl.fb-changes.diff
./configure --prefix=`pwd`/../local
make install
cd ..
</pre>
<p>There is one problem at this point that requires a little surgery on the HipHop PHP source itself. There is more about this in <a href="http://github.com/facebook/hiphop-php/issues#issue/6">issue #6</a> and once it gets fixed this won&#039;t need to be done. </p>
<pre class="brush: bash; title: ; notranslate">
cd hiphop-php
echo &quot;#ifndef LHASH&quot; &gt;&gt; src/cpp/ext/ext_openssl.h
echo &quot;#define LHASH LHASH_OF(CONF_VALUE)&quot; &gt;&gt; src/cpp/ext/ext_openssl.h
echo &quot;#endif&quot; &gt;&gt; src/cpp/ext/ext_openssl.h
</pre>
<p>And at last it is time to compile HipHop PHP itself:</p>
<pre class="brush: bash; title: ; notranslate">
git submodule init
git submodule update
export HPHP_HOME=`pwd`
export HPHP_LIB=`pwd`/bin
cmake .
make
</pre>
<p>It takes about 20 minutes to compile everything. Once the compile is done you are ready to roll. Check out the <a href="http://wiki.github.com/facebook/hiphop-php/running-hiphop">running HipHop wiki page</a> to learn how to run the resulting binary. One important thing to note is that you need to make sure you have the correct environment variables set when you go to compile things. I created a little file I can source with the following in it:</p>
<pre class="brush: bash; title: ; notranslate">
export HPHP_BASE=&lt;path to the first directory&gt;
export CMAKE_PREFIX_PATH=$HPHP_BASE/local
export HPHP_HOME=$HPHP_BASE/hiphop-php
export HPHP_LIB=$HPHP_HOME/bin
</pre>
<p>For those who just want it to go I&#039;ve put all of the above into one script that can be found <a href="http://www.ioncannon.net/examples/hiphopgo.sh">here</a>. If you are going from Fedora 8 to Fedora 12 on an EC2 node you can get a script for that <a href="http://www.ioncannon.net/examples/64bitfedora12ec2.sh">here</a>.</p>
<p>Now if you want to do this on a 32 bit Fedora 12 install you will need to modify the source first. The easiest way I know of doing this is to look at <a href="http://github.com/carsonmcdonald/hiphop-php/commit/792a37cb10514178341877c1425e2f3884898645">this commit log</a> or clone my version that can be found here:</p>
<pre class="brush: bash; title: ; notranslate">
git clone git://github.com/carsonmcdonald/hiphop-php.git
</pre>
<p>Please note that my version my not be up to date and the modifications to get the source to build on the 32 bit system may not be 100% correct. My goal was to get it to build and run on a 32 bit system but I don&#039;t have the time to very much more than that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/programming/918/building-hiphop-php-for-fedora-12-on-64-bit-and-32-bit-systems/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Fedora 12 Bootable Root EBS on EC2</title>
		<link>http://www.ioncannon.net/system-administration/894/fedora-12-bootable-root-ebs-on-ec2/</link>
		<comments>http://www.ioncannon.net/system-administration/894/fedora-12-bootable-root-ebs-on-ec2/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 12:30:13 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=894</guid>
		<description><![CDATA[I recently needed to create a clean EC2 AMI using a fairly new linux distro. It has been a while since I&#039;ve needed to create a new AMI so I also wanted to move away from the older pre-packaged AMI and boot using EBS. After taking a look at what was currently available publicly I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to create a clean EC2 AMI using a fairly new linux distro. It has been a while since I&#039;ve needed to create a new AMI so I also wanted to move away from the older pre-packaged AMI and boot using EBS. After taking a look at what was currently available publicly I decided I would just create my own EBS bootable AMI using Fedora 12. It wasn&#039;t all that complicated but there are a decent number of steps so I figured I would document them for anyone else who might want to give it a try.</p>
<p>I&#039;m going to assume you already understand how to do things like create instances, create EBS volumes and ssh into your running instance using key based authentication. I use the AWS management console for a lot of what follows with the exception of needing to register the AMI and for that you will need the <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351">Amazon EC2 API Tools</a> and <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=368">Amazon EC2 AMI Tools</a> </p>
<p><span id="more-894"></span></p>
<p>There are two ways to get to a bootable EBS backed Fedora 12 instance and they start off the same. The first thing to do is fire up the AMI named &#034;Basic Fedora Core 8 (AMI Id: ami-84db39ed)&#034; that is provided by Amazon.</p>
<p>Once the Fedora Core 8 EC2 instance is ready ssh into it. Fedora 12 requries a newer version of RPM to install so you now need to upgrade the instance to Fedora 10. This is pretty easy and can be done by following my instructions on <a href="http://www.ioncannon.net/system-administration/142/upgrading-from-fedora-9-to-fedora-10-with-yum/">upgrading from Fedora 9 to Fedora 10</a> (don&#039;t worry about skipping 9 it will work). Here are the commands needed to do the upgrade:</p>
<pre class="brush: bash; title: ; notranslate">
yum clean all
rpm -Uhv http://archive.kernel.org/fedora-archive/releases/10/Fedora/i386/os/Packages/fedora-release-10-1.noarch.rpm http://archive.kernel.org/fedora-archive/releases/10/Fedora/i386/os/Packages/fedora-release-notes-10.0.0-1.noarch.rpm
yum -y update
</pre>
<p>After a few minutes the instance will be upgraded and ready for the next step. This is where the two paths diverge depending on how you want the final product constructed. The options are to install Fedora 12 on a freshly minted volume or continue upgrading the instance you just created.</p>
<p><b>Upgrade path</b></p>
<p>I will start with the upgrade path since that is probably the easier of the two although may leave you with a messier instances after it is done. The next step for the upgrade path is to do what I outline in <a href="http://www.ioncannon.net/system-administration/358/upgrading-to-fedora-11-from-fedora-10/">upgrading from Fedora 10 to Fedora 11</a> and <a href="http://www.ioncannon.net/system-administration/719/upgrade-to-fedora-12-from-fedora-11/">upgrading from Fedora 11 to Fedora 12</a>. Here are the commands all in one place to make it easy:</p>
<pre class="brush: bash; title: ; notranslate">
yum clean all
rpm -Uvh http://mirrors.usc.edu/pub/linux/distributions/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-11-1.noarch.rpm http://mirrors.usc.edu/pub/linux/distributions/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-notes-11.0.0-2.fc11.noarch.rpm
yum -y update
yum clean all
rpm -Uvh http://mirrors.kernel.org/fedora/releases/12/Fedora/i386/os/Packages/fedora-release-notes-12.0.0-4.fc12.noarch.rpm http://mirrors.kernel.org/fedora/releases/12/Fedora/i386/os/Packages/fedora-release-12-1.noarch.rpm
yum -y update
</pre>
<p>Once you have everything upgraded to Fedora 12 you will have a 15G root partition that has less than 2G used. This may not suite your needs very well if you really don&#039;t need that extra 13G but thankfully if you want to shrink the root EBS partition you can. </p>
<p>I found some instructions in this article on <a href="http://www.elastician.com/2009/12/creating-ebs-backed-ami-from-s3-backed.html">EBS backed AMI</a>s that describes using the following command to copy the entire file system over. Assuming you have created a smaller volume and attached it to the instance as sdh you should be able to do something like the following to copy everything to the new volume:</p>
<pre class="brush: bash; title: ; notranslate">
mkfs.ext3 /dev/sdh
mount /dev/sdh /mnt
tar cpS / | cpipe -vt -b 1024 | gzip -c | tar zxpS -C /mnt
rm -rf /mnt/mnt/*
rm -rf /mnt/proc/*
umount /mnt
</pre>
<p>One thing to note in the above is that the entire sdh drive is formatted for the file system (you will actually get a prompt asking if that is ok). As far as I can tell this is the way it has to be or the instance will not boot correctly. I assume this is because the root device is hidden behind a partition already as /dev/sda1 and so shouldn&#039;t have a second partition table.</p>
<p>Skip to the common part now to learn how to make the final bootable AMI.</p>
<p><b>From scratch path</b></p>
<p>This path is similar to and mostly an update/extension to my post on creating a <a href="http://www.ioncannon.net/system-administration/128/how-to-create-a-fedora-7-instance-for-ec2/">Fedora 7 AMI setup</a>. I&#039;m going to leave out most of the details and just provide you with a script that will take an empty volume (assumed to be attached as /dev/sdh) and turn it into a bootable EBS backed Fedora 12 volume. Download the script <a href="http://www.ioncannon.net/examples/createfedora12bootebs.sh">createfedora12bootebs.sh</a> instead of trying to cut and paste the following, it gets formatted in such a way as to lose a newline that is important. Please note that you will need at least 1G of space on the given volume.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

echo &quot;y&quot; | mkfs.ext3 /dev/sdh
mount /dev/sdh /mnt

mkdir /mnt/dev
mkdir /mnt/proc
mkdir /mnt/etc

for i in console null zero ; do /sbin/MAKEDEV -d /mnt/dev -x $i ; done

cat &lt;&lt;EOL &gt; /mnt/etc/fstab
/dev/sda1               /                       ext3    defaults 1 1
none                    /dev/pts                devpts  gid=5,mode=620 0 0
none                    /dev/shm                tmpfs   defaults 0 0
none                    /proc                   proc    defaults 0 0
none                    /sys                    sysfs   defaults 0 0
/dev/sdc1               /mnt                    ext3    defaults 0 0
/dev/sdc2               swap                    swap    defaults 0 0
EOL

mount -t proc none /mnt/proc

cat &lt;&lt;EOL &gt; /tmp/yumec2.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
exclude=*-debuginfo
gpgcheck=0
obsoletes=1
reposdir=/dev/null

[base]
name=Fedora 12 – i386 – Base
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&amp;arch=i386
enabled=1

[updates-released]
name=Fedora 12 – i386 – Released Updates
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&amp;arch=i386
enabled=1
EOL

yum -c /tmp/yumec2.conf --installroot=/mnt -y groupinstall Base
yum -c /tmp/yumec2.conf --installroot=/mnt -y install openssh-server

yum -c /tmp/yumec2.conf --installroot=/mnt -y clean packages

echo &quot;UseDNS no&quot; &gt;&gt; /mnt/etc/ssh/sshd_config
echo &quot;PermitRootLogin without-password&quot; &gt;&gt; /mnt/etc/ssh/sshd_config

cp /etc/rc.local /mnt/etc/
cp /etc/sysconfig/network /mnt/etc/sysconfig/network
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /mnt/etc/sysconfig/network-scripts/ifcfg-eth0
cp /usr/local/sbin/* /mnt/usr/local/sbin/
cp -Rp /lib/modules/2.6.21.7-2.fc8xen/ /mnt/lib/modules/

echo &quot;/sbin/MAKEDEV /dev/urandom&quot; &gt;&gt; /mnt/etc/rc.sysinit
echo &quot;/sbin/MAKEDEV /dev/random&quot; &gt;&gt; /mnt/etc/rc.sysinit
echo &quot;/sbin/MAKEDEV /dev/sdc&quot; &gt;&gt; /mnt/etc/rc.sysinit
echo &quot;/sbin/MAKEDEV /dev/sdc1&quot; &gt;&gt; /mnt/etc/rc.sysinit
echo &quot;/sbin/MAKEDEV /dev/sdc2&quot; &gt;&gt; /mnt/etc/rc.sysinit

cat &lt;&lt;EOF &gt;&gt; /mnt/etc/rc.sysinit
# The following will partition the local drive and set up swap
cat &lt;&lt;EOL | fdisk /dev/sdc
n
p
1
1
+140G
n
p
2

w
EOL
mkswap /dev/sdc2
EOF

mv /mnt/lib/tls /mnt/lib/tls.disabled
echo &quot;hwcap 0 nosegneg&quot; &gt;&gt; /mnt/etc/ld.so.conf.d/kernelcap-2.6.21.7-2.fc8.conf

chroot /mnt chkconfig --level 2345 NetworkManager off
chroot /mnt chkconfig --level 2345 network on

sync
umount /mnt/proc
umount /mnt
</pre>
<p><b>Common wrap up</b></p>
<p>At this point you will need to create a snapshot of the volume that was created for one of the paths above. Once the snapshot is available you will need to then register the snapshot as an AMI that is bootable from EBS. To do that you would issue something like the following command substituting the correct data in where it relates to your volume and snapshot.</p>
<pre class="brush: bash; title: ; notranslate">
ec2-register -n &quot;AMIName&quot; -d &quot;AMI Description&quot; --block-device-mapping /dev/sdc=ephemeral0 --snapshot your-snapname --architecture i386 --kernel aki-a71cf9ce --ramdisk ari-a51cf9cc
</pre>
<p>One thing to note in this command is the &#8211;block-device-mapping option. That option is what gives you access to the local drive on your node once it is booted. This gives you extra storage for things you don&#039;t need to keep after the life of the running node. In the from scratch option I&#039;m turning part of the local drive into swap as well as creating a partition that could be used as a large temporary storage. If you want to know more details on the ephermeral storage look at <a href="http://developer.amazonwebservices.com/connect/thread.jspa?messageID=155916">this post</a></p>
<p>After all that you should have a bootable EBS backed Fedora 12 install to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/894/fedora-12-bootable-root-ebs-on-ec2/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Upgrade to Fedora 12 from Fedora 11</title>
		<link>http://www.ioncannon.net/system-administration/719/upgrade-to-fedora-12-from-fedora-11/</link>
		<comments>http://www.ioncannon.net/system-administration/719/upgrade-to-fedora-12-from-fedora-11/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 11:56:18 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=719</guid>
		<description><![CDATA[Fedora 12 was just released and it is time to upgrade again of course. I almost thought this was going to be a version to yawn at but then I saw that there was going to be a new version of Fedora based on Moblin and it seemed exciting again. Of course that isn&#039;t the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://docs.fedoraproject.org/release-notes/f12/en-US/html/">Fedora 12</a> was just released and it is time to upgrade again of course. I almost thought this was going to be a version to yawn at but then I saw that there was going to be a new version of Fedora based on <a href="http://moblin.org/">Moblin</a> and it seemed exciting again. Of course that isn&#039;t the only thing being upgraded in the latest version of Fedora. Some of the more notable changes in this version:</p>
<ul>
<li>Updated window managers <a href="http://www.fedoraproject.org/wiki/Features/Gnome2.28">Gnome 2.28</a>, <a href="http://www.fedoraproject.org/wiki/Features/KDE43">KDE 4.3</a> and <a href="http://www.fedoraproject.org/wiki/Features/FedoraMoblin">Fedora Moblin</a></li>
<li><a href="http://fedoraproject.org/wiki/Features/Presto">Delta RPM support</a></li>
<li><a href="http://www.fedoraproject.org/wiki/Features/F12X86Support">i686 as the base architecture</a></li>
<li>Lots of virtualization changes: <a href="http://www.fedoraproject.org/wiki/Features/KSM">KSM</a>, <a href="http://www.fedoraproject.org/wiki/Features/KVM_Huge_Page_Backed_Memory">KVM huge page support</a>, <a href="http://www.fedoraproject.org/wiki/Features/KVM_NIC_Hotplug>KVM NIC hotplug</a>, <a href="http://www.fedoraproject.org/wiki/Features/KVM_qcow2_Performance">KVM QCow2 performance improvements</a>, <a href="http://www.fedoraproject.org/wiki/Features/KVM_Stable_Guest_ABI">KVM Stable Guest ABI</a>, <a href="http://www.fedoraproject.org/wiki/Features/libguestfs">libguestfs</a>, <a href="http://www.fedoraproject.org/wiki/Features/Network_Interface_Management">Virtual network management</a> and <a href="http://www.fedoraproject.org/wiki/Features/VirtPrivileges">improved virtual privileges</a> to name a few</li>
<li>An easier to use bug reporting interface <a href="http://www.fedoraproject.org/wiki/Features/ABRTF12">Abrt 1.0</a></li>
<li><a href="http://www.fedoraproject.org/wiki/Features/BetterWebcamSupportF12">Better Webcam Support</a></li>
</ul>
<p>You can find the complete list of <a href="http://www.fedoraproject.org/wiki/Releases/12/FeatureList">Fedora 12 enhancements</a> as well if you want more details.</p>
<p><span id="more-719"></span></p>
<p>I&#039;m again starting with <a href="http://fedoraproject.org/wiki/Features/PreUpgrade">PreUpdate</a> since it worked well last time. The steps are pretty much the same as last time but I did have more problems after the upgrade:</p>
<ol>
<li>You have to be at Fedora11 before you try this. If you aren&#039;t there follow the <a href="http://www.ioncannon.net/system-administration/358/upgrading-to-fedora-11-from-fedora-10/">steps to get to Fedora11</a>.</li>
<li>yum clean all</li>
<li>yum udpate</li>
<li>Make sure to back up your xorg.conf since it can disappear with the upgrade.</li>
<li>preupgrade-cli &#034;Fedora 12 (Constantine)&#034; The total download for the upgrade from Fedora 11 to Fedora 12 was 1.1GB for me</li>
<li>After I rebooted the first time I got an error that the /boot directory didn&#039;t have enough space. It turns out I needed about 27M of free space so I ended up having to delete old kernels until I had 28M of free space.</li>
<li>reboot and wait</li>
</ol>
<p>I lucked out again and didn&#039;t have to remove anything to fix dependency issues. I recompiled my existing NVIDIA driver but I ran into an issue with the nouveau NVIDIA driver that comes with Fedora 12. I needed to remove the nouveau package, rebuild initrd and reboot before I could build the NVIDIA driver:</p>
<div class="codesnip-container" >
<div class="text codesnip" style="font-family:monospace;">yum remove xorg-x11-drv-nouveau.i686<br />
rm /boot/initramfs-2.6.31.5-127.fc12.i686.img<br />
mkinitrd /boot/initramfs-2.6.31.5-127.fc12.i686.img 2.6.31.5-127.fc12.i686</div>
</div>
<p>If that is too much work you can also get the NVIDIA driver from <a href="http://www.atrpms.net/">atrpms</a> but you will still need to remove the nouveau driver first. I also needed to pull down the Fedora 12 version of <a href="http://www.virtualbox.org/wiki/Linux_Downloads">Virtualbox</a> but so far that was all.</p>
<p>If you prefer the yum upgrade option here are the steps for that as well:</p>
<ol>
<li>yum clean all</li>
<li>yum update</li>
<li>rpm -Uvh http://mirrors.kernel.org/fedora/releases/12/Fedora/i386/os/Packages/fedora-release-notes-12.0.0-4.fc12.noarch.rpm http://mirrors.kernel.org/fedora/releases/12/Fedora/i386/os/Packages/fedora-release-12-1.noarch.rpm</li>
<li>yum clean all</li>
<li>yum -y update</li>
<li>You may need to resolve dependencies and then do another yum -y update</li>
<li>reboot</li>
</ol>
<p>I had to resolve dependencies to get this to work. I had to remove tigervnc-server-1.0.0-2.fc11.i586 and VirtualBox-3.0.10_54097_fedora11-1.i586. The resulting update was about 1.4G so it took a little while to apply.</p>
<p>I&#039;ve also put together a few <a href="http://www.ioncannon.net/projects/miscellaneous-projects/fedora-12-screenshots-and-videos/">videos and screenshots</a> if you want to get a quick preview of what the different versions available look like. You can also view the videos on Youtube: <a href="http://www.youtube.com/watch?v=W6rTVTyjQ1Q&#038;feature=player_embedded">Moblin</a>, <a href="http://www.youtube.com/watch?v=F0UlVnoUtbw&#038;feature=player_embedded">KDE</a> and <a href="http://www.youtube.com/watch?v=GZ8tSxMJTr8&#038;feature=player_embedded">Gnome</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/719/upgrade-to-fedora-12-from-fedora-11/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgrading to Fedora 11 from Fedora 10</title>
		<link>http://www.ioncannon.net/system-administration/358/upgrading-to-fedora-11-from-fedora-10/</link>
		<comments>http://www.ioncannon.net/system-administration/358/upgrading-to-fedora-11-from-fedora-10/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 10:40:54 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/?p=358</guid>
		<description><![CDATA[It is time again to upgrade if you are using Fedora. Fedora 11 was released a few days ago and contains some nice enhancements. For people who can a complete re-install is probably best. One reason for that is the inclusion of ext4 in Fedora11. You won&#039;t get the benefit of ext4 unless you do [...]]]></description>
			<content:encoded><![CDATA[<p>It is time again to upgrade if you are using Fedora. <a href="http://docs.fedoraproject.org/release-notes/f11/">Fedora 11</a> was <a href="http://press.redhat.com/2009/06/09/fedora-11-rapid-innovation-available-today/">released</a> a few days ago and contains some nice <a href="http://fedoraproject.org/wiki/Fedora_11_tour">enhancements</a>.</p>
<p>For people who can a complete re-install is probably best. One reason for that is the inclusion of ext4 in Fedora11. You won&#039;t get the benefit of ext4 unless you do a fresh install or <a href="http://www.cyberciti.biz/tips/linux-convert-ext3-to-ext4-file-system.html">upgrade from ext3 to ext4</a>. If you read the <a href="http://docs.fedoraproject.org/install-guide/f11/en-US/html/ch-upgrade-x86.html">upgrade guide</a> that Fedora produces it recommends not doing an upgrade.</p>
<p><span id="more-358"></span></p>
<p>This time around I decided to go with <a href="http://fedoraproject.org/wiki/Features/PreUpgrade">PreUpdate</a> right off the bat and it worked great. Here are the condensed steps. I think this will be the last time I do an upgrade post since they have it down to almost nothing now.</p>
<ol>
<li>You have to be at Fedora10 before you try this. If you aren&#039;t there follow the <a href="http://www.ioncannon.net/system-administration/142/upgrading-from-fedora-9-to-fedora-10-with-yum/">steps to get to Fedora10</a>.</li>
<li>yum clean all</li>
<li>yum udpate</li>
<li>preupgrade-cli &#034;Fedora 11 (Leonidas)&#034;</li>
<li>reboot and wait</li>
</ol>
<p>It seems like the days of conflicts before upgrades are gone now so that is a good thing. I didn&#039;t have to remove anything to make dependencies work out. The only fallout I had from this upgrade was my NVIDIA configuration for xorg got wiped and I had to pull it from backup. So take note to back up your xorg.conf if you have a custom one.</p>
<p>Tags: <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/fedora" rel="tag"> fedora</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/358/upgrading-to-fedora-11-from-fedora-10/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to create a Fedora 7 Instance for EC2</title>
		<link>http://www.ioncannon.net/system-administration/128/how-to-create-a-fedora-7-instance-for-ec2/</link>
		<comments>http://www.ioncannon.net/system-administration/128/how-to-create-a-fedora-7-instance-for-ec2/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 15:38:34 +0000</pubDate>
		<dc:creator>carson</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/128/how-to-create-a-fedora-7-instance-for-ec2/</guid>
		<description><![CDATA[Now that Fedora 7 is out I figured it was time to update the EC2 instance howto. It is almost exactly the same as creating a FC6 instance so if you want to know the details you can reference that article. Here is an updated script for creating the AMI the only change between this [...]]]></description>
			<content:encoded><![CDATA[<p>Now that Fedora 7 is out I figured it was time to update the EC2 instance howto. It is almost exactly the same as <a href="http://www.ioncannon.net/system-administration/115/creating-your-own-fc6-instance-for-ec2/">creating a FC6 instance</a> so if you want to know the details you can reference that article.</p>
<p><span id="more-128"></span></p>
<p>Here is an updated script for creating the AMI the only change between this and the one for FC6 is the yum repo and the image name:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;"><span class="co0">#!/bin/sh</span></p>
<p><span class="kw2">dd</span> <span class="kw1">if</span>=<span class="sy0">/</span>dev<span class="sy0">/</span>zero <span class="re2">of</span>=fedora7-i386.img <span class="re2">bs</span>=1M <span class="re2">count</span>=1 <span class="re2">seek</span>=1024<br />
<span class="sy0">/</span>sbin<span class="sy0">/</span>mke2fs <span class="re5">-F</span> <span class="re5">-j</span> fedora7-i386.img</p>
<p><span class="kw2">mount</span> <span class="re5">-o</span> loop fedora7-i386.img <span class="sy0">/</span>mnt</p>
<p><span class="kw2">mkdir</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>dev<br />
<span class="kw2">mkdir</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>proc<br />
<span class="kw2">mkdir</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>etc<br />
<span class="kw1">for</span> i <span class="kw1">in</span> console null zero ; <span class="kw1">do</span> <span class="sy0">/</span>sbin<span class="sy0">/</span>MAKEDEV <span class="re5">-d</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>dev <span class="re5">-x</span> <span class="re1">$i</span> ; <span class="kw1">done</span></p>
<p><span class="kw2">cat</span> <span class="sy0">&lt;&lt;</span>EOL <span class="sy0">&gt;</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>etc<span class="sy0">/</span>fstab<br />
<span class="sy0">/</span>dev<span class="sy0">/</span>sda1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">/</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ext3 &nbsp; &nbsp;defaults 1 1<br />
none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="sy0">/</span>dev<span class="sy0">/</span>pts &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;devpts &nbsp;<span class="re2">gid</span>=5,<span class="re2">mode</span>=620 0 0<br />
none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="sy0">/</span>dev<span class="sy0">/</span>shm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tmpfs &nbsp; defaults 0 0<br />
none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="sy0">/</span>proc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proc &nbsp; &nbsp;defaults 0 0<br />
none &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="sy0">/</span>sys &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sysfs &nbsp; defaults 0 0<br />
<span class="sy0">/</span>dev<span class="sy0">/</span>sda2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">/</span>mnt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ext3 &nbsp; &nbsp;defaults 1 2<br />
<span class="sy0">/</span>dev<span class="sy0">/</span>sda3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swap &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;swap &nbsp; &nbsp;defaults 0 0<br />
EOL</p>
<p><span class="kw2">mount</span> <span class="re5">-t</span> proc none <span class="sy0">/</span>mnt<span class="sy0">/</span>proc</p>
<p><span class="kw2">cat</span> <span class="sy0">&lt;&lt;</span>EOL <span class="sy0">&gt;</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>yumec2.conf<br />
<span class="br0">&#91;</span>main<span class="br0">&#93;</span><br />
<span class="re2">cachedir</span>=<span class="sy0">/</span>var<span class="sy0">/</span>cache<span class="sy0">/</span>yum<br />
<span class="re2">debuglevel</span>=2<br />
<span class="re2">logfile</span>=<span class="sy0">/</span>var<span class="sy0">/</span>log<span class="sy0">/</span>yum.log<br />
<span class="re2">exclude</span>=<span class="sy0">*</span>-debuginfo<br />
<span class="re2">gpgcheck</span>=0<br />
<span class="re2">obsoletes</span>=1<br />
<span class="re2">reposdir</span>=<span class="sy0">/</span>dev<span class="sy0">/</span>null</p>
<p><span class="br0">&#91;</span>base<span class="br0">&#93;</span><br />
<span class="re2">name</span>=Fedora Core 6 &#8211; i386 &#8211; Base<br />
<span class="re2">mirrorlist</span>=http:<span class="sy0">//</span>mirrors.fedoraproject.org<span class="sy0">/</span>mirrorlist?<span class="re2">repo</span>=fedora-7<span class="sy0">&amp;</span><span class="kw2">arch</span>=i386<br />
<span class="re2">enabled</span>=1</p>
<p><span class="br0">&#91;</span>updates-released<span class="br0">&#93;</span><br />
<span class="re2">name</span>=Fedora Core 6 &#8211; i386 &#8211; Released Updates<br />
<span class="re2">mirrorlist</span>=http:<span class="sy0">//</span>mirrors.fedoraproject.org<span class="sy0">/</span>mirrorlist?<span class="re2">repo</span>=updates-released-f7<span class="sy0">&amp;</span><span class="kw2">arch</span>=i386<br />
<span class="re2">enabled</span>=1<br />
EOL</p>
<p>yum <span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>yumec2.conf <span class="re5">&#8211;installroot</span>=<span class="sy0">/</span>mnt <span class="re5">-y</span> groupinstall Base</p>
<p>yum <span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>yumec2.conf <span class="re5">&#8211;installroot</span>=<span class="sy0">/</span>mnt <span class="re5">-y</span> clean packages</p>
<p><span class="kw2">mv</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>lib<span class="sy0">/</span>tls <span class="sy0">/</span>mnt<span class="sy0">/</span>lib<span class="sy0">/</span>tls-disabled</p>
<p><span class="kw2">cat</span> <span class="sy0">&lt;&lt;</span>EOL <span class="sy0">&gt;&gt;</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>etc<span class="sy0">/</span>rc.local<br />
<span class="kw1">if</span> <span class="br0">&#91;</span> <span class="sy0">!</span> <span class="re5">-d</span> <span class="sy0">/</span>root<span class="sy0">/</span>.ssh <span class="br0">&#93;</span> ; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">mkdir</span> <span class="re5">-p</span> <span class="sy0">/</span>root<span class="sy0">/</span>.ssh<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">chmod</span> 700 <span class="sy0">/</span>root<span class="sy0">/</span>.ssh<br />
<span class="kw1">fi</span><br />
<span class="co0"># Fetch public key using HTTP</span><br />
curl http:<span class="sy0">//</span>169.254.169.254<span class="sy0">/</span>1.0<span class="sy0">/</span>meta-data<span class="sy0">/</span>public-keys<span class="sy0">/</span>0<span class="sy0">/</span>openssl <span class="sy0">&gt;</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>my-key<br />
<span class="kw1">if</span> <span class="br0">&#91;</span> <span class="re4">$?</span> <span class="re5">-eq</span> 0 <span class="br0">&#93;</span> ; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">cat</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>my-key <span class="sy0">&gt;&gt;</span> <span class="sy0">/</span>root<span class="sy0">/</span>.ssh<span class="sy0">/</span>authorized_keys<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">chmod</span> 600 <span class="sy0">/</span>root<span class="sy0">/</span>.ssh<span class="sy0">/</span>authorized_keys<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">rm</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>my-key<br />
<span class="kw1">fi</span><br />
<span class="co0"># or fetch public key using the file in the ephemeral store:</span><br />
<span class="kw1">if</span> <span class="br0">&#91;</span> <span class="re5">-e</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>openssh_id.pub <span class="br0">&#93;</span> ; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">cat</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>openssh_id.pub <span class="sy0">&gt;&gt;</span> <span class="sy0">/</span>root<span class="sy0">/</span>.ssh<span class="sy0">/</span>authorized_keys<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">chmod</span> 600 <span class="sy0">/</span>root<span class="sy0">/</span>.ssh<span class="sy0">/</span>authorized_keys<br />
<span class="kw1">fi</span><br />
EOL</p>
<p><span class="kw2">cat</span> <span class="sy0">&lt;&lt;</span>EOL <span class="sy0">&gt;&gt;</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>etc<span class="sy0">/</span>ssh<span class="sy0">/</span>sshd_config<br />
UseDNS &nbsp;no<br />
PermitRootLogin without-password<br />
EOL</p>
<p><span class="kw2">cat</span> <span class="sy0">&lt;&lt;</span>EOL <span class="sy0">&gt;</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>etc<span class="sy0">/</span>sysconfig<span class="sy0">/</span>network<br />
<span class="re2">NETWORKING</span>=<span class="kw2">yes</span><br />
<span class="re2">HOSTNAME</span>=localhost.localdomain<br />
EOL</p>
<p><span class="kw2">cat</span> <span class="sy0">&lt;&lt;</span>EOL <span class="sy0">&gt;</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>etc<span class="sy0">/</span>sysconfig<span class="sy0">/</span>network-scripts<span class="sy0">/</span>ifcfg-eth0<br />
<span class="re2">ONBOOT</span>=<span class="kw2">yes</span><br />
<span class="re2">DEVICE</span>=eth0<br />
<span class="re2">BOOTPROTO</span>=dhcp<br />
EOL</p>
<p><span class="kw2">sync</span><br />
<span class="kw2">umount</span> <span class="sy0">/</span>mnt<span class="sy0">/</span>proc<br />
<span class="kw2">umount</span> <span class="sy0">/</span>mnt</div>
</div>
<p>Tags: <a href="http://technorati.com/tag/ec2" rel="tag">ec2</a>, <a href="http://technorati.com/tag/fedora+7" rel="tag"> fedora 7</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ioncannon.net/system-administration/128/how-to-create-a-fedora-7-instance-for-ec2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

