{"id":54,"date":"2005-08-04T21:54:06","date_gmt":"2005-08-04T11:54:06","guid":{"rendered":""},"modified":"2011-03-20T20:23:26","modified_gmt":"2011-03-20T09:23:26","slug":"installing-gentoo","status":"publish","type":"post","link":"https:\/\/riscy.biz\/index.php\/2005\/08\/04\/installing-gentoo\/","title":{"rendered":"Installing Gentoo"},"content":{"rendered":"<p>\nWell I have decided to have a play with a Linux distribution. I chose<br \/>\nGentoo because of the flexibility and the fact that it has a good user<br \/>\nsupport base.<\/p>\n<p>I<br \/>\nhave started using Gentoo for a LAMP based web server at work. I am<br \/>\ngoing to use Drupal as my CMS because of its flexibility and also ease<br \/>\nof use. Obviously I like Drupal (why else would my Blog use it)<\/p>\n<p>One<br \/>\nthing I have found is that installing Gentoo is not as easy as I<br \/>\nexpected. The main difficulty I had was with installing it at work<br \/>\nbehind a firewall. I had the full installation CD, but I didn&#8217;t realise<br \/>\nI needed the packages as well&#8230;doh!<\/p>\n<p>Anyway just for other<br \/>\npeoples info these are the steps I followed to get my first Gentoo<br \/>\ninstall going. I think it is still a bit broken but I will add bits as<br \/>\nI go. I am doing the same thing at home because I want to build a HTPC<br \/>\nand use Gentoo with MythTV, I know there are easier ways but I think I<br \/>\nwill need some bleeding edge packages which won&#8217;t be included in the<br \/>\n&quot;nice&quot; distributions.<\/p>\n<ul>\n<li>Get a Gentoo minimal install CD<\/li>\n<li>Make sure you have a network connection to the Internet<\/li>\n<li>Boot from the CD<\/li>\n<li>Type gentoo at the prompt<\/li>\n<li>Set the harddisk up using<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">fdisk \/dev\/hda<\/font><br \/>We need to remove existing partitions<br \/><font face=\"courier new,courier,monospace\"><font color=\"#ff0000\">d<\/font> <font face=\"arial,helvetica,sans-serif\">then<font face=\"courier new,courier,monospace\"> <font color=\"#ff0000\">1<\/font><\/font><\/font><\/font><br \/>Do this for each existing partition<br \/>Now make the new Linux partitions<br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">n<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">p<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">1<\/font> then <font color=\"#ff0000\">press ENTER<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">+32M<\/font><br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">n<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">p<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">2<\/font> then <font color=\"#ff0000\">press ENTER<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">+512M<\/font><br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">n<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">p<\/font> then <font face=\"courier new,courier,monospace\" color=\"#ff0000\">3<\/font> then <font color=\"#ff0000\">press ENTER<\/font> then <font color=\"#ff0000\">press ENTER<\/font><br \/>Now write the changes<br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">w<\/font><br \/><font face=\"courier new,courier,monospace\"><\/font>Now we need to put the filesystem on<br \/>We will make the Boot and Root filesystems ext2<br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">mke2fs \/dev\/hda1<\/font><br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">mke2fs \/dev\/hda3<\/font><br \/>Set up the Swap<br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">mkeswap \/dev\/hda2<\/font><br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\">swapon \/dev\/hda2<\/font><\/p><\/blockquote>\n<ul>\n<li>Mount the disks<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">mount \/dev\/hda3 \/mnt\/gentoo<\/span><br \/><span class=\"input\">mkdir \/mnt\/gentoo\/boot<\/span><br \/><span class=\"input\">mount \/dev\/hda1 \/mnt\/gentoo\/boot<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>Make sure the date is set correctly<\/li>\n<li>Change to the new filesystem<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">cd \/mnt\/gentoo<\/font><\/p><\/blockquote>\n<ul>\n<li>&nbsp;Use the inbuild browser to get the list of Gentoo mirrors<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">links2 http:\/\/www.gentoo.org\/main\/en\/mirrors.xml<\/font><\/p><\/blockquote>\n<ul>\n<li>Get the latest stage3 from \/releases\/x86\/2005.0\/stages<\/li>\n<\/ul>\n<blockquote><p>It will be named something like stage3-x86-2005.0.tar.bz2<\/p><\/blockquote>\n<ul>\n<li>Unpack the downloaded stage<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">tar -xvjpf stage3-x86-2005.0.tar.bz2<\/font><\/p><\/blockquote>\n<ul>\n<li>From the same mirror used before get the latest portage snapshot in \/snapshots<\/li>\n<\/ul>\n<blockquote><p>It will be named something like portage-20050803.tar.bz2<\/p><\/blockquote>\n<ul>\n<li>Extract the files<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">tar -xvjf \/mnt\/gentoo\/portage-20050803.tar.bz2 -C \/mnt\/gentoo\/usr<\/font><\/p><\/blockquote>\n<ul>\n<li>You should edit your make.conf file with a command like:<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">nano -w \/mnt\/gentoo\/etc\/make.conf<\/font><br \/>But I will include more details later once I work out my optimal flag settings. -w is EXTREMELY IMPORTANT, it makes sure nano doesn&#8217;t use wordwrap. I will explain how to turn this off permanently later. Stupid default setting!<\/p><\/blockquote>\n<ul>\n<li>Copy you DNS info over to the new install<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">cp -L \/etc\/resolv.conf \/mnt\/gentoo\/etc\/resolv.conf<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>&nbsp;Mount the \/proc filesystem<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">mount -t proc none \/mnt\/gentoo\/proc<\/font><br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><\/font><\/p><\/blockquote>\n<ul>\n<li>Enter the newly install environment<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">chroot \/mnt\/gentoo \/bin\/bash<\/span><br \/><span class=\"input\">env-update<\/span><br \/><span class=\"input\">source \/etc\/profile<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>Now sync the portage tree<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge &#8211;sync<\/font><\/p><\/blockquote>\n<ul>\n<li>&nbsp;You should edit the USE variables in \/etc\/make.conf but once again I haven&#8217;t decided the best ones yet<\/li>\n<li>Go with a stage 3 install to make it quick \ud83d\ude42<\/li>\n<li>Upgrade the baselayout<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">rm \/etc\/conf.d\/net<\/span><span class=\"comment\"><\/span><br \/><span class=\"input\">touch \/etc\/nsswitch.conf<\/span><br \/><span class=\"input\">CONFIG_PROTECT=&quot;-*&quot; emerge baselayout<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>&nbsp;Set the timezone<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">ln -sf \/usr\/share\/zoneinfo\/Australia\/Melbourne \/etc\/localtime<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>&nbsp;Get the sources<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge gentoo-sources<\/font><br \/>maybe <font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge gentoo-dev-sources<\/font> might be required for bleeding edge<\/p><\/blockquote>\n<ul>\n<li>Manually configure the kernel<\/li>\n<\/ul>\n<blockquote>\n<pre><font size=\"4\" face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">cd \/usr\/src\/linux<\/span><br \/><span class=\"input\">make menuconfig<\/span><\/font><br \/><\/pre>\n<\/blockquote>\n<ul>\n<li>Defaults for menuconfig should work but I will put more details in here later<\/li>\n<li>Compile the kernel<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">make &amp;&amp; make modules_install<\/font><br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><\/font><\/p><\/blockquote>\n<ul>\n<li>Copy over the new kernel to the Boot partition<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">cp arch\/i386\/boot\/bzImage \/boot\/kernel-2.6.12-gentoo-r6<br \/>cp System.map \/boot\/System.map-2.6.12-gentoo-r6<br \/>cp .config \/boot\/config-2.6.12-gentoo-r6<\/font><\/p><\/blockquote>\n<ul>\n<li>Create \/etc\/fstab<\/li>\n<\/ul>\n<blockquote>\n<pre><font size=\"4\" face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">nano -w \/etc\/fstab<\/span><\/font><br \/><font size=\"4\" face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\"><\/span><\/font><font size=\"4\" face=\"arial,helvetica,sans-serif\">I will put details of my fstab file in here later, should be something like this:<\/font><br \/>\/dev\/hda1           \/boot       auto    noauto,noatime                 1 2<br \/>\/dev\/hda2           none        swap    sw                             0 0<br \/>\/dev\/hda3           \/           auto    noatime                        0 1<br \/>none                \/proc       proc    defaults                       0 0<br \/>none                \/dev\/shm    tmpfs   nodev,nosuid,noexec            0 0<br \/>\/dev\/cdroms\/cdrom0  \/mnt\/cdrom  auto    noauto,user                    0 0<br \/><\/pre>\n<\/blockquote>\n<ul>\n<li>\n<p>&nbsp;Set the hostname<span class=\"input\"><\/span><\/p>\n<p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">nano -w \/etc\/conf.d\/hostname<\/span><\/font>&nbsp;<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>Set the domain name<br \/><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">nano -w \/etc\/conf.d\/domainname<\/span><\/font><\/li>\n<li><span class=\"input\"><\/span>Use rc-update to put this script in the startup sequence<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">rc-update add domainname default<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>\n<p>&nbsp;Set the root password<\/p>\n<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\"><span class=\"input\">passwd<\/span><\/font><\/p><\/blockquote>\n<ul>\n<li>&nbsp;Edit \/etc\/rc.conf<\/li>\n<\/ul>\n<blockquote>\n<p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">nano -w \/etc\/rc.conf<\/font><\/p>\n<\/blockquote>\n<ul>\n<li>&nbsp;Install a system logger<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge syslog-ng<br \/>rc-update add syslog-ng default<\/font><\/p><\/blockquote>\n<ul>\n<li>Install cron<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge vixie-cron<br \/>rc-update add vixie-cron default<\/font><\/p><\/blockquote>\n<ul>\n<li>Install DHCP support<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge dhcpcd<\/font><\/p><\/blockquote>\n<ul>\n<li>Once I have sorted out the framebuffer I will post details for setting it up here<\/li>\n<li>Use GRUB as the boot loader, install it<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">emerge grub<\/font><\/p><\/blockquote>\n<ul>\n<li>Edit the config file<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">nano -w \/boot\/grub\/grub.conf<\/font><\/p><\/blockquote>\n<ul>\n<li>Make the grub.conf file look like this<\/li>\n<\/ul>\n<blockquote><p>default 0<br \/>timeout 0<br \/>title=Gentoo Linux<br \/>root (hd0,0)<br \/>kernel \/kernel-2.6.12-gentoo-r6 root=\/dev\/hda3<\/p><\/blockquote>\n<ul>\n<li>Further Grub setup required<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">cp \/proc\/mounts \/etc\/mtab<br \/>grub-install \/dev\/hda<\/font><\/p><\/blockquote>\n<ul>\n<li>Reboot (take the CD out)<\/li>\n<\/ul>\n<blockquote><p><font face=\"courier new,courier,monospace\" color=\"#ff0000\">exit<br \/>umount \/mnt\/gentoo\/boot \/mnt\/gentoo\/proc \/mnt\/gentoo<br \/>reboot<\/font><\/p><\/blockquote>\n<ul>\n<li>Yay it should work!<\/li>\n<\/ul>\n<blockquote><p><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\nWell I have decided to have a play with a Linux distribution. I chose<br \/>\nGentoo because of the flexibility and the fact that it has a good user<br \/>\nsupport base.<\/p>\n<p>I<br \/>\nhave started using Gentoo for a LAMP based web server at work. I am<br \/>\ngoing to use Drupal as my CMS because of its flexibility and also ease<br \/>\nof use. Obviously I like Drupal (why else would my Blog use it)<\/p>\n<p>One<br \/>\nthing I have found is that installing Gentoo is not as easy as I<br \/>\nexpected. The main difficulty I had was with installing it at work<br \/>\nbehind a firewall. I had the full installation CD, but I didn&#8217;t realise<br \/>\nI needed the packages as well&#8230;doh!<\/p>\n<p>Anyway just for other<br \/>\npeoples info these are the steps I followed to get my first Gentoo<br \/>\ninstall going. I think it is still a bit broken but I will add bits as<br \/>\nI go. I am doing the same thing at home because I want to build a HTPC<br \/>\nand use Gentoo with MythTV, I know there are easier ways but I think I<br \/>\nwill need some bleeding edge packages which won&#8217;t be included in the<br \/>\n&quot;nice&quot; distributions.<\/p>\n<p> <a href=\"https:\/\/riscy.biz\/index.php\/2005\/08\/04\/installing-gentoo\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[5,9],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-computers","tag-gentoo","tag-linux"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":0,"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/riscy.biz\/index.php\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}