{"id":62,"date":"2007-10-31T18:33:23","date_gmt":"2007-10-31T22:33:23","guid":{"rendered":"http:\/\/www.cchsu.com\/art-en\/2007\/10\/31\/62\/"},"modified":"2007-11-20T12:09:09","modified_gmt":"2007-11-20T16:09:09","slug":"my-gentoo-installation","status":"publish","type":"post","link":"http:\/\/www.cchsu.com\/art-en\/2007\/10\/31\/62\/","title":{"rendered":"My Gentoo Installation"},"content":{"rendered":"<p>I&#8217;ve downloaded Gentoo 2007.0 Live CD and burned it. My target PC is a P4 2.8GHz with Intel 865G chipset, which uses built-in VGA. There are two disks available and I plan to use LVM2 to make a good use for them. Boot into LiveCD and let the party begin. I&#8217;ve also have another computer handy to type this note and to refer following references.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.gentoo.org\/doc\/en\/handbook\/handbook-x86.xml\">Gentoo Installation<\/a><\/li>\n<li><a href=\"http:\/\/www.gentoo.org\/doc\/en\/lvm2.xml\">Gentoo LVM2 Installation<\/a><\/li>\n<\/ul>\n<p><u><strong>LiveCD tricks<\/strong><\/u><br \/>\nAfter booting into LiveCD, press <strong>Ctrl-Alt-F1<\/strong> to enter root console. Type <strong>passwd<\/strong> to change root password (we&#8217;ll need it). Press <strong>Alt-F7<\/strong> to switch back to the X window. Open an X terminal and su to root.<\/p>\n<p><u><strong>Disk partitioning and mounting<\/strong><\/u><br \/>\nUpdate: if you don&#8217;t want such trouble, Sabayon installs a pre-packaged Gentoo on LVM for you.\u00a0 However, you need to Google it and see if you like it.<\/p>\n<p>Update: My LVM structure\u00a0is updated to the simple one: throw everything into LVM except swap and boot.\u00a0 Dedicate swap partition has\u00a0minor performance advantage, and you definitely don&#8217;t want to mess up with sensitive GRUB.<\/p>\n<p>Here&#8217;re the steps<\/p>\n<ul>\n<li>use <strong>fdisk<\/strong> to create\n<ul>\n<li>\/dev\/hda1 (bootable, type 83, \/boot)<\/li>\n<li>\/dev\/hda2 (swap, type 82)<\/li>\n<li>\/dev\/hda3 (type 8e, LVM)<\/li>\n<li>\/dev\/hdb1 (type 8e LVM)<\/li>\n<\/ul>\n<\/li>\n<li>make file system\n<ul>\n<li><strong>mke2fs \/dev\/hda1<\/strong><\/li>\n<li><strong>mkswap \/dev\/hda2<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>finish section 2 in <a href=\"http:\/\/www.gentoo.org\/doc\/en\/lvm2.xml\">Gentoo LVM2 Installation<\/a> to setup your LVM2. Stop before mounting, we&#8217;ll mount later.<\/li>\n<li><strong>swapon \/dev\/hda2<\/strong><\/li>\n<li>Mount the file system. Be extremely careful about the order of mounting. They must be mounted in the order of directory structure.<\/li>\n<\/ul>\n<p><u><strong>Distro Installation<\/strong><\/u><br \/>\nI&#8217;ve opted to use LiveCD command line installer to do a network-less install in order to speed things up (select Advance Mode, Networkless). Bypass the disk partition and mounting part (we&#8217;ve already done it) and let it install. LiveCD will install a genkernel and GRUB. <strong>DO NOT REBOOT AFTER INSTALLATION.<\/strong> We need to chroot to the target partition and install some critical things that we need for LVM2.<\/p>\n<ul>\n<li>(optional) <strong>mirrorselect -i -r -o &gt;&gt; \/mnt\/gentoo\/etc\/make.conf<\/strong><\/li>\n<li>edit \/mnt\/gentoo\/etc\/make.conf, add <strong>FEATURES=&#8221;parallel-fetch&#8221;<\/strong>, tune the mirrors if needed<\/li>\n<li><strong>cp -L \/etc\/resolv.conf \/mnt\/gentoo\/etc<\/strong><\/li>\n<li>check if proc and dev are mounted, if not\n<ul>\n<li><strong>mount -t proc none \/mnt\/gentoo\/proc<\/strong><\/li>\n<li><strong>mount -o bind \/dev \/mnt\/gentoo\/dev<\/strong><\/li>\n<\/ul>\n<\/li>\n<li><strong>chroot \/mnt\/gentoo \/bin\/bash<\/strong><\/li>\n<li><strong>env-update<\/strong><\/li>\n<li><strong>source \/etc\/profile<\/strong><\/li>\n<li><strong>export PS1=&#8221;(chroot) $PS1<\/strong><\/li>\n<li><strong>emerge lvm2<\/strong> and edit \/etc\/fstab to make sure logical volumes are properly mounted<\/li>\n<li>you can also emerge some useful packages before reboot, e.g. vim, eix, gentoolkit, ncftp, screen<\/li>\n<li>before reboot, manually umount logical volumes and <strong>vgchange -a n<\/strong><\/li>\n<\/ul>\n<p><u><strong>Post-install configuration<\/strong><\/u><br \/>\nThe rest are quite simple if the reboot is sucessful *grin*. Do whatever the manual suggests and then starts from the poor 80&#215;25 text console.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve downloaded Gentoo 2007.0 Live CD and burned it. My target PC is a P4 2.8GHz with Intel 865G chipset, which uses built-in VGA. There are two disks available and I plan to use LVM2 to make a good use for them. Boot into LiveCD and let the party begin. I&#8217;ve also have another computer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/posts\/62"}],"collection":[{"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":0,"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cchsu.com\/art-en\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}