<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8755527</id><updated>2011-09-13T20:15:28.741+08:00</updated><title type='text'>The Grey Havens</title><subtitle type='html'>Still round the corner there may wait
  A new road or a secret gate;
And though I oft have passed them by,
  A day will come at last when I
Shall take the hidden paths that run
  West of the moon, East of the Sun.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8755527.post-116445544809379293</id><published>2006-11-25T19:45:00.000+08:00</published><updated>2006-11-25T19:56:30.970+08:00</updated><title type='text'>r4sus2-sources-2.6.18.ebuild</title><content type='html'>The reiser4 patch for 2.6.18 kernel is finally out! This ebuild is based on gentoo-sources-2.6.18-r3.ebuild, but I've removed the ultra1, sparc stuff. So it's again Gentoo-sources + Suspend2 + Reiser4. &lt;br /&gt;&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;# Copyright 1999-2006 Gentoo Foundation&lt;br /&gt;# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;# $Header: r4sus2-sources-2.6.18.ebuild, 2006/11/25 $&lt;br /&gt;&lt;br /&gt;ETYPE="sources"&lt;br /&gt;K_WANT_GENPATCHES="base extras"&lt;br /&gt;K_GENPATCHES_VER="4"&lt;br /&gt;R4V="-3"&lt;br /&gt;SUSPEND2_VERSION="2"&lt;br /&gt;&lt;br /&gt;inherit eutils kernel-2&lt;br /&gt;detect_version&lt;br /&gt;detect_arch&lt;br /&gt;&lt;br /&gt;KEYWORDS="~amd64 ~x86"&lt;br /&gt;HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches  http://www.suspend2.net http://www.namesys.com/v4/v4.html"&lt;br /&gt;&lt;br /&gt;DESCRIPTION="Full sources including the gentoo patchset, Software Suspend 2 and the Reiser4 patchset"&lt;br /&gt;&lt;br /&gt;SUSPEND2_SRC="suspend2-patches-${CKV}-${SUSPEND2_VERSION}.tar.bz2"&lt;br /&gt;SUSPEND2_URI="http://dev.gentoo.org/~phreak/distfiles/${SUSPEND2_SRC}"&lt;br /&gt;&lt;br /&gt;UNIPATCH_LIST="${DISTDIR}/${SUSPEND2_SRC} ${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;UNIPATCH_STRICTORDER="yes"&lt;br /&gt;&lt;br /&gt;SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${SUSPEND2_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;&lt;br /&gt;pkg_postinst() {&lt;br /&gt; postinst_sources&lt;br /&gt;&lt;br /&gt; echo&lt;br /&gt;&lt;br /&gt; einfo "For more info on this patchset, and how to report problems, see:"&lt;br /&gt; einfo "${HOMEPAGE}"&lt;br /&gt;}&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-116445544809379293?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/116445544809379293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=116445544809379293' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/116445544809379293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/116445544809379293'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/11/r4sus2-sources-2618ebuild.html' title='r4sus2-sources-2.6.18.ebuild'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-116072963645238911</id><published>2006-10-13T16:47:00.000+08:00</published><updated>2006-10-13T16:54:56.986+08:00</updated><title type='text'>How to generate binary packages on the LiveCD</title><content type='html'>In the LiveCD environment, open a terminal, type:&lt;br /&gt;&lt;pre&gt;$ equery files gentoolkit | grep qpkg&lt;/pre&gt;&lt;br /&gt;to find the correct &lt;span style="font-style: italic;"&gt;qpkg&lt;/span&gt; command. Then type:&lt;br /&gt;&lt;pre&gt;$ /usr/share/doc/gentoolkit-0.2.2/deprecated/qpkg/qpkg -I | less&lt;/pre&gt;&lt;br /&gt;Copy the output, one page at a time to a textfile, say &lt;span style="font-style: italic;"&gt;pkgs.txt&lt;/span&gt;. After you finish, open this textfile with &lt;span style="font-style: italic;"&gt;vim&lt;/span&gt;. Then copy the following string:&lt;br /&gt;&lt;pre&gt;$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj$xj&lt;/pre&gt;&lt;br /&gt;In the command mode, press &lt;span style="font-weight: bold;"&gt;Shift-Insert&lt;/span&gt; repeatedly until all the &lt;span style="font-weight: bold;"&gt;*&lt;/span&gt; at the end of each line disappear. Notice what the last line looks like. For 2006.1 LiveCD, it should be "&lt;span style="font-style: italic;"&gt;x11-wm/twm&lt;/span&gt;". If somehow it got truncated, press &lt;span style="font-weight: bold;"&gt;u&lt;/span&gt; to get it back. Save the file and exit.&lt;br /&gt;Then mount the relevant directory on the hardisk partition where you're going to install Gentoo, assuming you have already unpacked the snapshot on the LiveCD:&lt;br /&gt;&lt;pre&gt;# mount -o bind /mnt/gentoo/usr/portage /usr/portage&lt;/pre&gt;&lt;br /&gt;Then execute the following command:&lt;br /&gt;&lt;pre&gt;# for all x in `cat /path/to/pkgs.txt`; do quickpkg $x; done&lt;/pre&gt;&lt;br /&gt;Then you should be able to install these binary packages in the chroot environment by issuing commands like "&lt;span style="font-style: italic;"&gt;emerge -K packagename&lt;/span&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-116072963645238911?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/116072963645238911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=116072963645238911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/116072963645238911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/116072963645238911'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/10/how-to-generate-binary-packages-on.html' title='How to generate binary packages on the LiveCD'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-115624562350511618</id><published>2006-08-22T18:49:00.000+08:00</published><updated>2006-08-31T16:14:32.333+08:00</updated><title type='text'>Quota</title><content type='html'>1: Check kernel options.&lt;br /&gt;&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;File systems --&gt;&lt;br /&gt; [*] Quota support&lt;br /&gt; &lt; &gt;   Old quota format support&lt;br /&gt; &lt;*&gt;   Quota format v2 support&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;br /&gt;Usually I use Quota format v2, if compiled as a module, it is called "quota_v2".&lt;br /&gt;&lt;br /&gt;2: Check whether the "quota" package is installed.&lt;br /&gt;&lt;pre&gt;# emerge -av quota&lt;/pre&gt;&lt;br /&gt;3: Modify /etc/fstab file.&lt;br /&gt;To enable user quota support for that partition, add "usrquota" to the options such as below:&lt;br /&gt;&lt;pre&gt;/dev/hda6     /home           reiserfs            noatime,usrquota,grpquota   0 0&lt;/pre&gt;&lt;br /&gt;To enable group quota, add "grpquota" as well.&lt;br /&gt;&lt;br /&gt;4: Remount the partition that you have modified or added in quota support:&lt;br /&gt;&lt;pre&gt;# mount -o remount /home&lt;/pre&gt;&lt;br /&gt;If it does not work, reboot.&lt;br /&gt;&lt;br /&gt;5: Quota Check:&lt;br /&gt;&lt;pre&gt;# /sbin/quotacheck -cguvamf -F vfsv0&lt;/pre&gt;&lt;br /&gt;6: Rerun Quota Check for old version (optional)&lt;br /&gt;&lt;pre&gt;# /sbin/quotacheck -cguvamf -F vfsold&lt;/pre&gt;&lt;br /&gt;7: Turn on Quotas:&lt;br /&gt;&lt;pre&gt;# /sbin/quotaon -a&lt;/pre&gt;&lt;br /&gt;To see the report of quotas, issue this command:&lt;br /&gt;&lt;pre&gt;# repquota -as&lt;/pre&gt;&lt;br /&gt;To set a user quota, issue the following command:&lt;br /&gt;&lt;pre&gt;# setquota -u NAME BLOCK-SOFTLIMIT BLOCK-HARDLIMIT&lt;br /&gt;       INODE-SORFLIMIT INODE-HARDLIMIT -a&lt;/pre&gt;&lt;br /&gt;Where:&lt;br /&gt;NAME is the user&lt;br /&gt;BLOCK-SOFTLIMIT in kilobytes&lt;br /&gt;BLOCK-HARDLIMIT in kilobytes&lt;br /&gt;INODE-SORFLIMIT set it to 0 normally&lt;br /&gt;INODE-HARDLIMIT set it to 0 also&lt;br /&gt;&lt;br /&gt;Or use the "edquota" command:&lt;br /&gt;&lt;pre&gt;#  edquota -u USERNAME&lt;/pre&gt;&lt;br /&gt;Hard limit works only when grace period is set. It specifies the absolute limit on the disk usage, which a quota user can't go beyond his hard limit. Users are permitted to exceed their soft limits for a grace period that may  be  specified  per filesystem.  Once the grace period has expired, the soft limit is enforced as a hard limit. To set the grace period:&lt;br /&gt;&lt;pre&gt;# edquota -ut&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Check quota as a user:&lt;br /&gt;&lt;pre&gt;$ quota -s&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; "/etc/init.d/quota start" doesn't work, I don't know why. I have to add "/sbin/quotaon -a" to /etc/conf.d/local.start to activate quota on boot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-115624562350511618?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/115624562350511618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=115624562350511618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115624562350511618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115624562350511618'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/08/quota.html' title='Quota'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-115463203468100128</id><published>2006-08-04T02:21:00.000+08:00</published><updated>2006-08-04T03:08:45.450+08:00</updated><title type='text'>Make mplayerplug-in work with Opera</title><content type='html'>If you have installed mplayerplug-in (3.25) and Opera (9.00) from portage, you'll find that the plug-ins work with mozilla-firefox but not Opera. To make it work, you need to compile it manually. First, unpack the source somewhere:&lt;pre&gt;# tar xzvf /usr/portage/distfiles/mplayerplug-in-3.25.tar.gz -C /tmp&lt;br /&gt;# cd /tmp/mplayerplug-in&lt;/pre&gt;&lt;br /&gt;Then you need to edit a file:&lt;pre&gt;# nano -w plugingate/np_entry.cpp&lt;/pre&gt;Look for lines 108 and 109 - the ones like the following:&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;if(aNPNFuncs-&gt;size &lt; sizeof(NPNetscapeFuncs))          &lt;br /&gt;      return NPERR_INVALID_FUNCTABLE_ERROR;&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;Comment them out by inserting "//" in front of each line:&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;//if(aNPNFuncs-&gt;size &lt; sizeof(NPNetscapeFuncs))          &lt;br /&gt;//      return NPERR_INVALID_FUNCTABLE_ERROR;&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;Compile:&lt;pre&gt;# ./configure --enable-x &amp;&amp; make&lt;/pre&gt;To avoid mixing up the mplayerplug-ins in /opt/netscape/plugins (which work with mozilla-firefox), it's a good idea to install them in /opt/opera/lib/opera/plugins instead:&lt;pre&gt;# cp -vi *.so *.xpt /opt/opera/lib/opera/plugins&lt;/pre&gt;and link the other plug-ins in /opt/netscape/plugins there:&lt;pre&gt;# cd /opt/opera/lib/opera/plugins&lt;br /&gt;# ls /opt/netscape/plugins&lt;br /&gt;# ln -s /opt/netscape/plugins/flashplayer.xpt .&lt;br /&gt;# ln -s /opt/netscape/plugins/libflashplayer.so .&lt;br /&gt;# ln -s /opt/netscape/plugins/nphelix.so .&lt;/pre&gt;Then you need to prevent Opera from searching plug-ins in /opt/netscape/plugins. To do this, as a user:&lt;pre&gt;$ nano -w ~/.opera/pluginpath.ini&lt;/pre&gt;Change the value for "/opt/netscape/plugins=" to 2 or 0. &lt;br /&gt;&lt;br /&gt;To test it, start Opera, go to &lt;a href="http://www.apple.com/trailers/"&gt;http://www.apple.com/trailers/&lt;/a&gt;. If your mplayer has been compiled with right USE flags, you should be able to watch these trailers in Opera now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-115463203468100128?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/115463203468100128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=115463203468100128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115463203468100128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115463203468100128'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/08/make-mplayerplug-in-work-with-opera.html' title='Make mplayerplug-in work with Opera'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-115449746256677805</id><published>2006-08-02T13:39:00.000+08:00</published><updated>2006-08-24T02:47:33.763+08:00</updated><title type='text'>r4sus2-gentoo-sources-2.6.17.ebuild</title><content type='html'>Again with Gentoo-sources + Reiser4 + Software Suspend 2, it's based on gentoo-sources-2.6.17-r4.&lt;br /&gt;&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;# Copyright 1999-2006 Gentoo Foundation&lt;br /&gt;# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;# $Header: $&lt;br /&gt;&lt;br /&gt;ETYPE="sources"&lt;br /&gt;K_WANT_GENPATCHES="base extras"&lt;br /&gt;K_GENPATCHES_VER="5"&lt;br /&gt;R4V="-3"&lt;br /&gt;&lt;br /&gt;inherit kernel-2&lt;br /&gt;detect_version&lt;br /&gt;detect_arch&lt;br /&gt;&lt;br /&gt;KEYWORDS="~amd64 ~x86"&lt;br /&gt;HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches  http://www.suspend2.net http://www.namesys.com/v4/v4.html"&lt;br /&gt;&lt;br /&gt;DESCRIPTION="Full sources including the gentoo patchset, Software Suspend 2 and the Reiser4 patchset"&lt;br /&gt;&lt;br /&gt;SUSPEND2_VERSION="2.2.7.1"&lt;br /&gt;SUSPEND2_TARGET="2.6.17"&lt;br /&gt;SUSPEND2_SRC="suspend2-${SUSPEND2_VERSION}-for-${SUSPEND2_TARGET}"&lt;br /&gt;SUSPEND2_URI="http://www.suspend2.net/downloads/all/${SUSPEND2_SRC}.tar.bz2"&lt;br /&gt;&lt;br /&gt;UNIPATCH_LIST="${DISTDIR}/${SUSPEND2_SRC}.tar.bz2 ${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;UNIPATCH_STRICTORDER="yes"&lt;br /&gt;&lt;br /&gt;SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${SUSPEND2_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;&lt;br /&gt;pkg_postinst() {&lt;br /&gt; postinst_sources&lt;br /&gt;&lt;br /&gt; echo&lt;br /&gt;&lt;br /&gt; einfo "For more info on this patchset, and how to report problems, see:"&lt;br /&gt; einfo "${HOMEPAGE}"&lt;br /&gt;}&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-115449746256677805?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/115449746256677805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=115449746256677805' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115449746256677805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115449746256677805'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/08/r4sus2-gentoo-sources-2617ebuild.html' title='r4sus2-gentoo-sources-2.6.17.ebuild'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-115444621420592582</id><published>2006-08-01T22:40:00.000+08:00</published><updated>2006-08-02T01:07:31.420+08:00</updated><title type='text'>File security</title><content type='html'>&lt;span style="font-weight:bold;"&gt;File protection with chmod&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 400 file&lt;/span&gt; - To protect a file against accidental overwriting.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 500 directory&lt;/span&gt; - To protect yourself from accidentally removing, renaming or moving files from this directory.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 600 file&lt;/span&gt; - A private file only changeable by the user who entered this command.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 644 file&lt;/span&gt; - A publicly readable file that can only be changed by the issuing user.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 660 file&lt;/span&gt; - Users belonging to your group can change this file, others don't have any access to it at all.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 700 file&lt;/span&gt; - Protects a file against any access from other users, while the issuing user still has full access.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 755 directory&lt;/span&gt; - For files that should be readable and executable by others, but only changeable by the issuing user.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 775 file&lt;/span&gt; - Standard file sharing mode for a group.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod 777 file&lt;/span&gt; - Everybody can do everything to this file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Logging on to another group&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you type &lt;span style="font-weight:bold;"&gt;id&lt;/span&gt; on the command line, you get a list of all the groups that you can possibly belong to. When initially connecting to a Gentoo system, a user will normally belong to the &lt;span style="font-style:italic;"&gt;users&lt;/span&gt; group (the primary group for most users). To create new files that will belong to the groups other than the group &lt;span style="font-style:italic;"&gt;users&lt;/span&gt;, a user can use the &lt;span style="font-weight:bold;"&gt;newgrp&lt;/span&gt; command to log into any of these groups. For example, to create files that are owned by the group &lt;span style="font-style:italic;"&gt;audio&lt;/span&gt;, type:&lt;br /&gt;&lt;pre&gt;$ newgrp audio&lt;/pre&gt;without having to use &lt;span style="font-weight:bold;"&gt;chgrp&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Sticky bit mode&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When applied to a directory, it means a user can only change files in this directory when s/he is the user owner of the file or when the file has appropriate permissions. This feature is used on directories like &lt;span style="font-weight:bold;"&gt;/var/tmp&lt;/span&gt;, that have to be accessible for everyone, but where it is not appropriate for users to change or delete each other's data. The sticky bit is indicated by a &lt;span style="font-style:italic;"&gt;t&lt;/span&gt; at the end of the file permission field:&lt;br /&gt;&lt;pre&gt;$ ls -ld /var/tmp&lt;br /&gt;drwxrwxrwt  9 root root 280 Aug  1 16:58 /var/tmp&lt;/pre&gt;The sticky bit is set using the command &lt;span style="font-weight:bold;"&gt;chmod o+t directory&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SGID (set group ID) on a directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the standard way of sharing files in UNIX. Every file created in the directory will have the same group owner as the directory itself (while normal behavior would be that new files are owned by the users who create them). This way, users don't need to worry about file ownership when sharing directories:&lt;br /&gt;&lt;pre&gt;$ mkdir ~/music&lt;br /&gt;$ chgrp audio ~/music&lt;br /&gt;$ chmod 775 ~/music&lt;/pre&gt;This will enable other users who belong to the &lt;span style="font-style:italic;"&gt;audio&lt;/span&gt; group to write to the directory. But the files created will belong to the &lt;span style="font-style:italic;"&gt;users&lt;/span&gt; group instead of the &lt;span style="font-style:italic;"&gt;audio&lt;/span&gt; group. The solution is to set the SGID bit and all files subsequently placed there will have the group id of the directory automatically:&lt;br /&gt;&lt;pre&gt;$ chmod g+s ~/music&lt;/pre&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; Files that are being moved to an SGID directory but were created elsewhere keep their original user and group owner.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-115444621420592582?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/115444621420592582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=115444621420592582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115444621420592582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/115444621420592582'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/08/file-security.html' title='File security'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-114820878226656089</id><published>2006-05-21T18:43:00.000+08:00</published><updated>2006-05-21T22:21:17.366+08:00</updated><title type='text'>Gentoo-sources + Reiser4 + Software Suspend 2</title><content type='html'>The ebuild is based on gentoo-sources-2.6.16-r7, but I've removed the ultra1, sparc stuff. I call it r4sus2-gentoo-sources. To install:&lt;br /&gt;&lt;pre&gt;# mkdir -p /usr/local/portage/sys-kernel/r4sus2-gentoo-sources&lt;/pre&gt;&lt;br /&gt;Copy the following r4sus2-gentoo-sources-2.6.16.ebuild to the directory just created:&lt;br /&gt;&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;# Copyright 1999-2006 Gentoo Foundation&lt;br /&gt;# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;# $Header: $&lt;br /&gt;&lt;br /&gt;ETYPE="sources"&lt;br /&gt;K_WANT_GENPATCHES="base extras"&lt;br /&gt;K_GENPATCHES_VER="9"&lt;br /&gt;R4V="-2"&lt;br /&gt;inherit kernel-2&lt;br /&gt;detect_version&lt;br /&gt;detect_arch&lt;br /&gt;&lt;br /&gt;KEYWORDS="~amd64 ~x86"&lt;br /&gt;HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.suspend2.net http://www.namesys.com/v4/v4.html"&lt;br /&gt;&lt;br /&gt;DESCRIPTION="Full sources including the Gentoo patchset, Software Suspend 2 and the Reiser4 patchset"&lt;br /&gt;&lt;br /&gt;SUSPEND2_VERSION="2.2.5"&lt;br /&gt;SUSPEND2_TARGET="2.6.16.9"&lt;br /&gt;SUSPEND2_SRC="suspend2-${SUSPEND2_VERSION}-for-${SUSPEND2_TARGET}"&lt;br /&gt;SUSPEND2_URI="http://www.suspend2.net/downloads/all/${SUSPEND2_SRC}.tar.bz2"&lt;br /&gt;&lt;br /&gt;UNIPATCH_LIST="${DISTDIR}/${SUSPEND2_SRC}.tar.bz2 ${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;UNIPATCH_STRICTORDER="yes"&lt;br /&gt;&lt;br /&gt;RDEPEND="${RDEPEND}&lt;br /&gt;                &gt;=sys-apps/suspend2-userui-0.6.1&lt;br /&gt;                &gt;=sys-power/hibernate-script-1.12"&lt;br /&gt;&lt;br /&gt;SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${SUSPEND2_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;&lt;br /&gt;pkg_postinst() {&lt;br /&gt;        postinst_sources&lt;br /&gt;&lt;br /&gt;        echo&lt;br /&gt;&lt;br /&gt;        einfo "For more info on this patchset, and how to report problems, see:"&lt;br /&gt;        einfo "${HOMEPAGE}"&lt;br /&gt;}&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;br /&gt;Then&lt;br /&gt;&lt;pre&gt;# echo 'sys-kernel/r4sus2-gentoo-sources ~x86' &gt;&gt; /etc/portage/package.keywords&lt;br /&gt;# ebuild /usr/local/portage/sys-kernel/r4sus2-gentoo-sources/r4sus2-gentoo-sources-2.6.16.ebuild digest&lt;br /&gt;# USE="symlink" emerge -av r4sus2-gentoo-sources&lt;/pre&gt;&lt;br /&gt;If you just want Reiser4, don't want Software Suspend 2, you can change the ebuild to the following:&lt;br /&gt;&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;# Copyright 1999-2006 Gentoo Foundation&lt;br /&gt;# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;# $Header: $&lt;br /&gt;&lt;br /&gt;ETYPE="sources"&lt;br /&gt;K_WANT_GENPATCHES="base extras"&lt;br /&gt;K_GENPATCHES_VER="9"&lt;br /&gt;R4V="-2"&lt;br /&gt;inherit kernel-2&lt;br /&gt;detect_version&lt;br /&gt;detect_arch&lt;br /&gt;&lt;br /&gt;KEYWORDS="~amd64 ~x86"&lt;br /&gt;HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.namesys.com/v4/v4.html"&lt;br /&gt;&lt;br /&gt;DESCRIPTION="Full sources including the Gentoo patchset and the Reiser4 patchset"&lt;br /&gt;&lt;br /&gt;UNIPATCH_LIST="${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;&lt;br /&gt;SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"&lt;br /&gt;&lt;br /&gt;pkg_postinst() {&lt;br /&gt;        postinst_sources&lt;br /&gt;&lt;br /&gt;        echo&lt;br /&gt;&lt;br /&gt;        einfo "For more info on this patchset, and how to report problems, see:"&lt;br /&gt;        einfo "${HOMEPAGE}"&lt;br /&gt;}&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-114820878226656089?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/114820878226656089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=114820878226656089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/114820878226656089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/114820878226656089'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/05/gentoo-sources-reiser4-software.html' title='Gentoo-sources + Reiser4 + Software Suspend 2'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-114519486356557581</id><published>2006-04-16T21:22:00.000+08:00</published><updated>2006-06-17T02:36:05.416+08:00</updated><title type='text'>Ebuild for gretl</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/6235/609/1600/gretl.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/6235/609/320/gretl.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Gnu Library gretl is a cross-platform software package for econometric analysis, written in the C programming language, &lt;a href="http://gretl.sourceforge.net/"&gt;http://gretl.sourceforge.net/&lt;/a&gt;. It is not in portage yet, and for a long time I couldn't get it installed on my Gentoo system (which is why I had that Debian excursion). Now finally I did it and with an ebuild! &lt;br /&gt;&lt;br /&gt;The ebuild is based on Dan's attempt (&lt;a href="http://bugs.gentoo.org/show_bug.cgi?id=39966"&gt;http://bugs.gentoo.org/show_bug.cgi?id=39966&lt;/a&gt;) and should work on a stable Gentoo system. Here's the content:&lt;br /&gt;&lt;blockquote&gt;&lt;hr /&gt;&lt;pre&gt;# Copyright 1999-2006 Gentoo Foundation&lt;br /&gt;# Distributed under the terms of the GNU General Public License v2&lt;br /&gt;# $Header: $&lt;br /&gt;&lt;br /&gt;inherit eutils gnome2&lt;br /&gt;DESCRIPTION="gretl is a cross-platform software package for econometric analysis"&lt;br /&gt;HOMEPAGE="http://gretl.sourceforge.net/"&lt;br /&gt;SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"&lt;br /&gt;LICENSE="GPL-2"&lt;br /&gt;SLOT="0"&lt;br /&gt;KEYWORDS="~x86"&lt;br /&gt;IUSE="gmp gnome gtk2 gtkextra ole2 readline sourceview"&lt;br /&gt;DEPEND="x11-libs/gtk+&lt;br /&gt;   dev-libs/libxml2&lt;br /&gt;   sci-visualization/gnuplot&lt;br /&gt;   sci-libs/lapack&lt;br /&gt;   media-libs/gdk-pixbuf&lt;br /&gt;   sourceview? (x11-libs/gtksourceview)&lt;br /&gt;   readline? (sys-libs/readline)&lt;br /&gt;   gnome? (gnome-base/gnome)&lt;br /&gt;   gmp? (dev-libs/gmp)&lt;br /&gt;   !gtk2 (&lt;br /&gt;      ole2? (dev-libs/libole2)&lt;br /&gt;   )"&lt;br /&gt;RDEPEND=""&lt;br /&gt;&lt;br /&gt;src_compile() {&lt;br /&gt;   local myconf&lt;br /&gt;   if ! use gtk2 ; then&lt;br /&gt;      ewarn "Running ${PN} without GTK+-2.0 reduces functionality"&lt;br /&gt;      myconf="${myconf} --without-gtk2"&lt;br /&gt;      if ! use ole2 ; then&lt;br /&gt;          myconf="${myconf} --without-libole2"&lt;br /&gt;      fi&lt;br /&gt;      if ! use gtkextra ; then&lt;br /&gt;          myconf="${myconf} --without-gtkextra"&lt;br /&gt;      fi&lt;br /&gt;   fi&lt;br /&gt;   if ! use gnome ; then&lt;br /&gt;       myconf="${myconf} --without-gnome"&lt;br /&gt;   fi&lt;br /&gt;   econf  || die "configure failed"&lt;br /&gt;   emake || die "emake failed"&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;src_install() {&lt;br /&gt;   make check&lt;br /&gt;   if use gnome ; then&lt;br /&gt;      gnome2_src_install          gnome_prefix=${D}/usr          langdir=${D}/usr/share/gtksourceview-1.0/language-specs&lt;br /&gt;   else&lt;br /&gt;      make   prefix=${D}/usr           bindir=${D}/usr/bin           mandir=${D}/usr/share/man           infodir=${D}/usr/share/info           datadir=${D}/usr/share           gretldir=${D}/usr/share/gretl           localedir=${D}/usr/share/locale           langdir=${D}/usr/share/gtksourceview-1.0/language-specs          libdir=${D}/usr/$(get_libdir)           sysconfdir=${D}/etc          install || die&lt;br /&gt;   fi&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;br /&gt;Before you install it, don't forget to:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# ebuild /usr/local/portage/sci-mathematics/gretl/gretl-1.5.1.ebuild digest&lt;/pre&gt;&lt;hr /&gt;&lt;/blockquote&gt;&lt;br /&gt;first.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-114519486356557581?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/114519486356557581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=114519486356557581' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/114519486356557581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/114519486356557581'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/04/ebuild-for-gretl.html' title='Ebuild for gretl'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-114458804686687083</id><published>2006-04-09T20:28:00.000+08:00</published><updated>2006-04-27T16:20:49.646+08:00</updated><title type='text'>Put portage stuff on LVM</title><content type='html'>Recently I installed LVM2 on /dev/hda3.&lt;br /&gt;First use fdisk to change partition type for /dev/hda3 to 8e (Linux LVM)(turns out this is unnecessary when using LVM 2, but still a good thing for disk management).&lt;br /&gt;Recompile kernel:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;hr /&gt;Device Drivers  ---&gt;&lt;br /&gt; Multi-device support (RAID and LVM)  ---&gt;&lt;br /&gt;   [*] Multiple devices driver support (RAID and LVM)&lt;br /&gt;   &lt; &gt;   RAID support&lt;br /&gt;   &lt;*&gt;   Device mapper support&lt;br /&gt;   &lt; &gt;     Crypt target support&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;If "Device mapper support" is compiled as a module, add the module "dm-mod" to /etc/modules.autoload.d/kernel-2.6.&lt;br /&gt;Install the lvm2 package:&lt;br /&gt;&lt;pre&gt;# emerge lvm2&lt;/pre&gt;&lt;br /&gt;Edit /etc/lvm/lvm.conf, find the line:&lt;br /&gt;&lt;pre&gt; filter = [ "a/.*/" ]&lt;/pre&gt;&lt;br /&gt;Replace it with the following one to scan /dev/hda and /dev/hdb and reject anything else:&lt;br /&gt;&lt;pre&gt; filter = [ "a|/dev/hd[ab]|", "r/.*/" ]&lt;/pre&gt;&lt;br /&gt;Then reboot. Now prepare the partition:&lt;br /&gt;&lt;pre&gt;# pvcreate /dev/hda3&lt;/pre&gt;&lt;br /&gt;This creates a volume group descriptor at the start of the /dev/hda3 partition.&lt;br /&gt;Create a volume group named "vg":&lt;br /&gt;&lt;pre&gt;# vgcreate vg /dev/hda3&lt;/pre&gt;&lt;br /&gt;Create the logical volumes (just like creating partitions with fdisk):&lt;br /&gt;&lt;pre&gt;# lvcreate -L3G -nportage  vg&lt;br /&gt;# lvcreate -L3G -nccache vg&lt;br /&gt;# vgdisplay vg | grep Free&lt;br /&gt;Free  PE / Size       667 / 2.61 GB&lt;br /&gt;# lvcreate -l 667 vg -n tmp (let "tmp" take up all the rest)&lt;/pre&gt;&lt;br /&gt;Now you should see portage, ccache and tmp in /dev/vg/&lt;br /&gt;Create filesystems on the logical volumes:&lt;br /&gt;&lt;pre&gt;# mkreiserfs /dev/vg/portage&lt;br /&gt;# mkreiserfs /dev/vg/ccache&lt;br /&gt;# mkreiserfs /dev/vg/tmp&lt;/pre&gt;&lt;br /&gt;Move the stuff in /usr/portage, /var/tmp/ccache and /var/tmp/portage to another place and mount the logical volumes, then move the stuff back:&lt;br /&gt;&lt;pre&gt;# mv /usr/portage/* /root/portage&lt;br /&gt;# mv /var/tmp/ccache/* /root/ccache&lt;br /&gt;# mv /var/tmp/portage/* /root/tmp&lt;br /&gt;# mount /dev/vg/portage /usr/portage&lt;br /&gt;# mount /dev/vg/tmp /var/tmp/portage&lt;br /&gt;# mount /dev/vg/ccache /var/tmp/ccache&lt;br /&gt;# mv /root/portage/* /usr/portage&lt;br /&gt;# mv /root/ccache/* /var/tmp/ccache&lt;br /&gt;# mv /root/tmp/* /var/tmp/portage&lt;/pre&gt;&lt;br /&gt;Add the following lines to /etc/fstab:&lt;br /&gt;&lt;pre&gt;# Logical volumes&lt;br /&gt;/dev/vg/portage    /usr/portage      reiserfs  noatime   0 0&lt;br /&gt;/dev/vg/ccache     /var/tmp/ccache   reiserfs  noatime   0 0&lt;br /&gt;/dev/vg/tmp        /var/tmp/portage  reiserfs  noatime   0 0&lt;/pre&gt;&lt;br /&gt;Then if you restart your machine, all partitions will be automatically mounted.&lt;br /&gt;&lt;br /&gt;Here comes the nice things about LVM, shrink logical volume "portage":&lt;br /&gt;&lt;pre&gt;# umount /usr/portage/&lt;br /&gt;# resize_reiserfs -s-1500M /dev/vg/portage (First, resize the filesystem)&lt;br /&gt;# lvreduce -L-1500M /dev/vg/portage (resize the logical volume)&lt;br /&gt;# mount /usr/portage&lt;/pre&gt;&lt;br /&gt;To extend a logical volume, we do it in a slightly different order:&lt;br /&gt;&lt;pre&gt;# lvextend -L+1G /dev/vg/portage&lt;br /&gt;# resize_reiserfs -f /dev/vg/portage (no need to umount nor specify size this time)&lt;/pre&gt;&lt;br /&gt;To add another physical partition to the volume group "vg":&lt;br /&gt;&lt;pre&gt;# pvcreate /dev/hda9&lt;br /&gt;# vgextend vg /dev/hda9&lt;/pre&gt;&lt;br /&gt;then you should be able to create more logical volumes.&lt;br /&gt;&lt;br /&gt;Other useful commands:&lt;br /&gt;&lt;pre&gt;# umount /dev/vg/tmp &lt;br /&gt;# lvremove /dev/vg/tmp (remove a logical volume)&lt;br /&gt;# vgreduce vg /dev/hda9 (remove a physical volume from a group)&lt;br /&gt;# vgchange -a n vg (deactivate a volume group)&lt;br /&gt;# vgremove vg (remove a volume group)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;P.S. I'm now thinking about the following scheme for dealing with portage stuff:&lt;br /&gt;1) put /usr/portage on a reiserfs LV, perhaps 300MB is enough. &lt;br /&gt;&lt;br /&gt;2) put sources in a directory other than /usr/portage/distfiles, probably /var/distfiles (may be on an independent ext3 LV).&lt;br /&gt;&lt;br /&gt;3) put /var/tmp (which includes /var/tmp/ccache and /var/tmp/portage) on an ext2 LV, maybe 5G?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-114458804686687083?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/114458804686687083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=114458804686687083' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/114458804686687083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/114458804686687083'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/04/put-portage-stuff-on-lvm.html' title='Put portage stuff on LVM'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-113868867305389580</id><published>2006-01-31T14:08:00.000+08:00</published><updated>2006-02-07T20:16:53.623+08:00</updated><title type='text'>Install a Debian system in Gentoo</title><content type='html'>Prepare a spare partition and mount it somewhere, say /mnt/debinst. Install debootstrap and run it:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# emerge -av debootstrap&lt;br /&gt;# debootstrap --arch i386 sarge /mnt/debinst http://ftp.hk.debian.org/debian/&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;You can substitute any Debian archive mirror for &lt;span style="font-weight:bold;"&gt;http://ftp.hk.debian.org/debian/&lt;/span&gt; in the command above, preferably a mirror close to you network-wise. Mirrors are listed at &lt;a href="http://www.debian.org/misc/README.mirrors"&gt;http://www.debian.org/misc/README.mirrors&lt;/a&gt;. If you have a sarge Debian GNU/Linux CD mounted at /cdrom, you could substitute a file URL instead of the http URL: &lt;span style="font-weight:bold;"&gt;file:/cdrom/debian/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now chroot into the Debian system:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# chroot /mnt/debinst /bin/bash&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Prepare a /etc/fstab and mount proc:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# nano -w /etc/fstab&lt;br /&gt;# mount -t proc proc /proc&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;To configure networking, edit /etc/network/interfaces (take a look at /usr/share/doc/ifupdown/examples/network-interfaces.gz):&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;&lt;span style="font-weight:bold;"&gt;cat &gt; /etc/network/interfaces &lt;&lt; "EOF"&lt;/span&gt;&lt;br /&gt;######################################################################&lt;br /&gt;# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)&lt;br /&gt;# See the interfaces(5) manpage for information on what options are&lt;br /&gt;# available.&lt;br /&gt;######################################################################&lt;br /&gt;&lt;br /&gt;# We always want the loopback interface.&lt;br /&gt;#&lt;br /&gt;auto lo&lt;br /&gt;iface lo inet loopback&lt;br /&gt;&lt;br /&gt;# To use dhcp:&lt;br /&gt;#&lt;br /&gt; auto eth0&lt;br /&gt; iface eth0 inet dhcp&lt;br /&gt;&lt;br /&gt;# An example static IP setup: (broadcast and gateway are optional)&lt;br /&gt;#&lt;br /&gt;# auto eth0&lt;br /&gt;# iface eth0 inet static&lt;br /&gt;#     address 192.168.0.42&lt;br /&gt;#     network 192.168.0.0&lt;br /&gt;#     netmask 255.255.255.0&lt;br /&gt;#     broadcast 192.168.0.255&lt;br /&gt;#     gateway 192.168.0.1&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;EOF&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;and /etc/hostname:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# echo DebianHostName &gt; /etc/hostname&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Set your timezone, add a normal user, and choose your apt sources by running:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# /usr/sbin/base-config new&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;To configure locale settings and upgrade glibc:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# apt-get install locales&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Install a kernel:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# apt-cache search kernel-image&lt;br /&gt;# apt-get install kernel-image-2.X.X-arch-etc&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;You should add modules you want automatically loaded to /etc/modules.&lt;br /&gt;Now install a couple of system tools:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# apt-get install grub reiserfsprogs hdparm sudo hotplug&lt;br /&gt;(If you want to install grub, do the following:)&lt;br /&gt;# grub-install /dev/hda&lt;br /&gt;# update-grub&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Install some X stuff:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# apt-get install x-window-system-core kde-core mozilla-firefox&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Now add an entry for your newly installed Debian system in your grub.conf and reboot!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-113868867305389580?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/113868867305389580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=113868867305389580' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/113868867305389580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/113868867305389580'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2006/01/install-debian-system-in-gentoo.html' title='Install a Debian system in Gentoo'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-113558667364238401</id><published>2005-12-26T16:41:00.000+08:00</published><updated>2005-12-26T16:44:33.653+08:00</updated><title type='text'>Config files for mlterm</title><content type='html'>&lt;span style="font-weight:bold;"&gt;/etc/mlterm/main&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;use_combining=true&lt;br /&gt;font_size_range=5-50&lt;br /&gt;scrollbar_view_name=sample&lt;br /&gt;use_scrollbar=true&lt;br /&gt;scrollbar_mode=right&lt;br /&gt;mod_meta_mode=8bit&lt;br /&gt;use_bidi=true&lt;br /&gt;copy_paste_via_ucs=true&lt;br /&gt;compose_dec_special_font=true&lt;br /&gt;termtype=mlterm&lt;br /&gt;icon_path=/usr/share/pixmaps/mlterm-icon-wmaker.png&lt;br /&gt;# logsize=128&lt;br /&gt;fontsize=14&lt;br /&gt;use_anti_alias=true&lt;br /&gt;# tabsize=8&lt;br /&gt;use_xim=true&lt;br /&gt;open_xim_in_startup=true&lt;br /&gt;# use_login_shell=false&lt;br /&gt;# ptys=1&lt;br /&gt;# bel_mode=sound&lt;br /&gt;use_transbg = true&lt;br /&gt;brightness=80&lt;br /&gt;# big5_buggy=false&lt;br /&gt;# not_use_unicode_font=false&lt;br /&gt;# only_use_unicode_font=false&lt;br /&gt;# iso88591_font_for_usascii=false&lt;br /&gt;# col_size_of_width_a=1&lt;br /&gt;fg_color=white&lt;br /&gt;bg_color=black&lt;br /&gt;encoding=UTF-8&lt;br /&gt;# fontsize=16&lt;br /&gt;wall_picture = &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;/etc/mlterm/aafont&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;##&lt;br /&gt;## Anti-aliased font settings for non-UTF8 encodings&lt;br /&gt;##&lt;br /&gt;&lt;br /&gt;ISO8859_1=Bitstream Vera Sans Mono-iso10646-1;&lt;br /&gt;ISO8859_2=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_3=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_4=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_5=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_7=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_9=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_10=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_13=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_14=FreeMono-iso10646-1;&lt;br /&gt;ISO8859_15=FreeMono-iso10646-1;&lt;br /&gt;KOI8_R=Nimbus Mono L-iso10646-1;&lt;br /&gt;KOI8_U=Nimbus Mono L-iso10646-1;&lt;br /&gt;JISX0208_1978=Kochi Gothic-iso10646-1;&lt;br /&gt;JISX0208_1983=Kochi Gothic-iso10646-1;&lt;br /&gt;JISX0208_1990=Kochi Gothic-iso10646-1;&lt;br /&gt;KSX1001_1997=dotum-iso10646-1;&lt;br /&gt;BIG5=PMingLiu-iso10646-1;&lt;br /&gt;GB2312_80=SimSun-iso10646-1;&lt;br /&gt;GBK=SimSun-iso10646-1;&lt;br /&gt;&lt;br /&gt;##&lt;br /&gt;## Anti-aliased font settings for UTF8&lt;br /&gt;##&lt;br /&gt;&lt;br /&gt;## settings for UTF8 singlewidth (non-east Asian) characters&lt;br /&gt;&lt;br /&gt;# This contains many characters including Latin, Greek, and Cyrillic.&lt;br /&gt;# If you are willing to use UTF-8, you prefer to be able to use many&lt;br /&gt;# characters, don't you?&lt;br /&gt;ISO10646_UCS2_1=FreeMono-iso10646-1;&lt;br /&gt;# If you use UTF-8 but the range of characters is limited to ISO-8859-1,&lt;br /&gt;# you may use the following line instead of the above line.&lt;br /&gt;#ISO10646_UCS2_1=Courier 10 Pitch-iso10646-1;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## settings for UTF8 doublewidth (east Asian) characters&lt;br /&gt;#&lt;br /&gt;# Since there are no TrueType fonts available which contains&lt;br /&gt;# all of east Asian characters so far, you have to choose&lt;br /&gt;# one of the following lines.&lt;br /&gt;&lt;br /&gt;# Japanese speakers may want to enable the following setting.&lt;br /&gt;ISO10646_UCS2_1_BIWIDTH=Kochi Gothic-iso10646-1;&lt;br /&gt;&lt;br /&gt;# Korean speakers may want to enable the following setting.&lt;br /&gt;#ISO10646_UCS2_1_BIWIDTH=dotum-iso10646-1;&lt;br /&gt;&lt;br /&gt;# Traditional Chinese speakers may want to enable the following setting.&lt;br /&gt;#ISO10646_UCS2_1_BIWIDTH=AR PL Mingti2L Big5-iso10646-1;&lt;br /&gt;&lt;br /&gt;# Simplified Chinese speakers may want to enable the following setting.&lt;br /&gt;#ISO10646_UCS2_1_BIWIDTH=AR PL SungtiL GB-iso10646-1;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-113558667364238401?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/113558667364238401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=113558667364238401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/113558667364238401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/113558667364238401'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2005/12/config-files-for-mlterm.html' title='Config files for mlterm'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-113536218789780526</id><published>2005-12-24T01:59:00.000+08:00</published><updated>2005-12-24T02:48:59.253+08:00</updated><title type='text'>Things about Bash</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Key combinations in Bash&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+a&lt;/span&gt; - Move cursor to the beginning of the command line.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+c&lt;/span&gt; - End a running program and return the prompt.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+d&lt;/span&gt; - Log out of the current shell session, equal to typing &lt;span style="font-weight:bold;"&gt;exit&lt;/span&gt; or &lt;span style="font-weight:bold;"&gt;logout&lt;/span&gt;.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+e&lt;/span&gt; - Move cursor to the end of the command line.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+h&lt;/span&gt; - Generate backspace character.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+l&lt;/span&gt; - Clear this terminal.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+r&lt;/span&gt; - Search command history.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+u&lt;/span&gt; - Cut everything on the current line before the cursor.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+w&lt;/span&gt; - Delete the word on the left of the cursor.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+y&lt;/span&gt; - Paste text that was cut using ctrl-u.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ctrl+z&lt;/span&gt; - Suspend a program.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ArrowLeft&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;ArrowRight&lt;/span&gt; - Move the cursor one place to the left or right on the command line, so that you can insert characters at other places than just at the beginning and the end.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ArrowUp&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;ArrowDown&lt;/span&gt; - Browse history. Go to the line that you want to repeat, eventually edit details, and press &lt;span style="font-style:italic;"&gt;Enter&lt;/span&gt; to save time.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Shift+PageUp&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;Shift+PageDown&lt;/span&gt; - Browse terminal buffer (to see text that has "scrolled off" the screen).&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Tab&lt;/span&gt; - Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Tab Tab&lt;/span&gt; - Shows file or command completion possibilities.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;About apropos&lt;/span&gt;&lt;br /&gt;The command&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# /usr/sbin/makewhatis&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;makes the database for tools like &lt;span style="font-style:italic;"&gt;apropos&lt;/span&gt; and &lt;span style="font-style:italic;"&gt;whatis&lt;/span&gt; from all of your manfiles. &lt;span style="font-style:italic;"&gt;Apropos&lt;/span&gt; can then tell you programs whose manfiles include your specified word, and &lt;span style="font-style:italic;"&gt;whatis&lt;/span&gt; prints out the summary of the program you specify.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-113536218789780526?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/113536218789780526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=113536218789780526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/113536218789780526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/113536218789780526'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2005/12/things-about-bash.html' title='Things about Bash'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-110421781402155665</id><published>2004-12-28T15:06:00.000+08:00</published><updated>2005-10-11T22:33:01.373+08:00</updated><title type='text'>Install Gentoo on Dell 700m</title><content type='html'>I first built a base system for the laptop on my AMD desktop.  I want to use the '-march=pentium-m' CFLAGS, which means you need gcc-3.4.x.  So before bootstrapping, I did:&lt;br /&gt;&lt;br /&gt;# emerge --nodeps --oneshot linux26-headers &lt;br /&gt;# USE="bootstrap" emerge --nodeps --oneshot gcc &lt;br /&gt;&lt;br /&gt;Another way to build a clean and stable toolchain:&lt;br /&gt;&lt;br /&gt;# emerge linux26-headers &amp;&amp; emerge linux26-headers glibc &amp;&amp; emerge glibc binutils gcc &amp;&amp; emerge binutils gcc&lt;br /&gt;&lt;br /&gt;Take a look at: &lt;a href="http://forums.gentoo.org/viewtopic.php?t=282474"&gt;An emerge wrapper for correctly building the toolchain&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NIC: b44, mii may also needed&lt;br /&gt;Alsa: snd_intel8x0&lt;br /&gt;USB mouse, hardisk: usbcore,ehci_hcd,usbhid,uhci_hcd,ohci_hcd,usb_storage&lt;br /&gt;&lt;br /&gt;1280x800 resolution:&lt;br /&gt;Modeline:&lt;br /&gt;Need 855resolution patch &lt;a href="http://bugs.gentoo.org/show_bug.cgi?id=66147"&gt;&lt;/a&gt;&lt;br /&gt;framebuffer: 1024x768 only; grub.conf line: video=vesa:1024x768-32@75&lt;br /&gt;&lt;br /&gt;dri: need i915&lt;br /&gt;&lt;br /&gt;CPU Frequency scaling: enable ('ondemand' cpufreq policy governor) AND (Use ACPI tables to decode valid frequency/voltage pairs) in kernel&lt;br /&gt;&lt;br /&gt;Suspend to disk: swsusp2 works with 2.6.9-nitro4&lt;br /&gt;&lt;br /&gt;Fonts: for best shape, emerge freetype-2.1.7 from glc; Chinese bold fonts may look blue-tinted, disable anti-alias for SimSun will fix it.&lt;br /&gt;&lt;br /&gt;Watching DVDs with mplayer entails adding "-monitoraspect 1.6 (or 1280:800)" as an option.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-110421781402155665?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/110421781402155665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=110421781402155665' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/110421781402155665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/110421781402155665'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/12/install-gentoo-on-dell-700m.html' title='Install Gentoo on Dell 700m'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-110292230444992660</id><published>2004-12-13T15:13:00.000+08:00</published><updated>2006-08-21T20:38:37.063+08:00</updated><title type='text'>Gentoo hardisk install on a windows only machine</title><content type='html'>Let's say you only have windows on your machine, no floppy, no cdrom drive, and no vmware installed. But I assume you have successfully installed and set up &lt;a href="http://sarovar.org/projects/grub4dos"&gt;Grub for DOS&lt;/a&gt;。&lt;br /&gt;&lt;br /&gt;You need to have a vfat partition (which is also useful for exchanging files between linux and windows). After downloading the 2005.1 LiveCD iso, extract the files and directories from the LiveCD iso (using programs like ultraiso) and copy them over to the vfat partition.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Edit:&lt;/span&gt;It turns out Grub-for-DOS also works for ntfs partitions. Details please see: &lt;a href="http://forums.gentoo.org/viewtopic-p-3525073.html#3525073"&gt;http://forums.gentoo.org/viewtopic-p-3525073.html#3525073&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next, set up a Grub entry like this: &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;title Gentoo Livecd&lt;br /&gt;root (hd0,4)&lt;br /&gt;kernel /isolinux/gentoo root=/dev/ram0 init=/linuxrc looptype=squashfs loop=/livecd.squashfs cdroot=/dev/hda5 vga=791 splash=silent,theme:livecd-2005.1 CONSOLE=/dev/tty1&lt;br /&gt;initrd /isolinux/gentoo.igz&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;If it's necessary, append the kernel options as listed in the isolinux/F*.msg files. &lt;br /&gt;&lt;br /&gt;Knoppix can be used as a substitute (if you want a graphic environment while you install Gentoo). Take the 3.6 CD as an example, extract and copy over the 'isolinux' directory (it's in the boot directory) to a vfat partition, you also need to copy over the 'KNOPPIX' directory which is quite big. Then write your grub entry like this: &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;title Knoppix26 From HD &lt;br /&gt;root (hd0,6) &lt;br /&gt;kernel /isolinux/linux26 ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 nomce BOOT_IMAGE=knoppix &lt;br /&gt;initrd /isolinux/minirt26.gz&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now boot with the Grub entry 'Gentoo Livecd'. After getting into a root shell, you may proceed as described in the handbook. Note that the stuff in /mnt/cdrom are just the files and directories on that vfat partition (here /dev/hda5)&lt;br /&gt;&lt;br /&gt;The following scripts are useful for automatic installation, make adjustments if necessary.&lt;br /&gt;&lt;br /&gt;step1：&lt;br /&gt; &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;#hdparm -d 1 /dev/hda   #(Activate DMA)&lt;br /&gt;#mke2fs -j /dev/hda9   #(initialize the boot partition)&lt;br /&gt;#mkswap /dev/hda10   #(initialize the swap partition)&lt;br /&gt;swapon /dev/hda10   #(Activate the swap partition)&lt;br /&gt;#mke2fs -j /dev/hda3   #(if you want to use ext3 for your root partition)&lt;br /&gt;mkreiserfs -f /dev/hda3    #(if you want to use reiserfs)&lt;br /&gt;#mkfs.xfs -f /dev/hda3   #(if you want to use xfs)&lt;br /&gt;mount /dev/hda3 /mnt/gentoo   #(Mount the root partition)&lt;br /&gt;#mkdir /mnt/gentoo/boot   #(Create the boot mountpoint)&lt;br /&gt;#mount /dev/hda9 /mnt/gentoo/boot   #(Mount the boot partition)&lt;br /&gt;echo "Now set your system time!  For instance, to set the date to October 29th, 16:21 in the year 2005, type: date 102916212005"&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;step2：&lt;br /&gt; &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;cd /mnt/gentoo   #(Go to the mountpoint where the root partition has been mounted)&lt;br /&gt;tar xjvpf /mnt/cdrom/stages/stage3-x86-2005.1-r1.tar.bz2   #(Extract a stage3 tarball...)&lt;br /&gt;tar -xvjf /mnt/cdrom/snapshots/portage-20050709.tar.bz2 -C /mnt/gentoo/usr   #(unpack a portage tree)&lt;br /&gt;mkdir /mnt/gentoo/usr/portage/distfiles   #(Create a directory for distfiles)&lt;br /&gt;cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/   #(copy over distfiles)&lt;br /&gt;#nano -w /mnt/gentoo/etc/make.conf (Optional: edit make.conf)&lt;br /&gt;cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf   #(Copy over nameserver information)&lt;br /&gt;mount -t proc none /mnt/gentoo/proc   #(Mount the proc filesystem)&lt;br /&gt;mount -o bind /dev /mnt/gentoo/dev  #(Mount-bind the /dev filesystem)&lt;br /&gt;cp /mnt/cdrom/step3 /mnt/gentoo    #(Copy over the step3 script)&lt;br /&gt;echo "&lt;br /&gt;Now you can run step3!"&lt;br /&gt;chroot /mnt/gentoo /bin/bash   #(Chroot into the new environment)&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;step3：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;env-update &amp;&amp; source /etc/profile   #(Load the necessary variables)&lt;br /&gt;export PS1="(chroot) $PS1"&lt;br /&gt;emerge --metadata   #(Build the Portage cache to speed up future emerges)&lt;br /&gt;cp /usr/share/zoneinfo/Hongkong /etc/localtime   #(Set timezone information)&lt;br /&gt;#nano -w /etc/make.conf   #(Optional: edit make.conf)&lt;br /&gt;emerge genkernel   #(prepare to compile a kernel)&lt;br /&gt;USE="-doc symlink" emerge gentoo-sources   #(install a kernel source)&lt;br /&gt;genkernel --menuconfig all   #(save your config when exit)&lt;br /&gt;emerge coldplug   #(install coldplug)&lt;br /&gt;rc-update add coldplug default   #(Add it to the default runlevel)&lt;br /&gt;nano -w /etc/modules.autoload.d/kernel-2.6 #(List the modules you want automatically loaded)&lt;br /&gt;nano -w /etc/fstab    #(edit fstab)&lt;br /&gt;nano -w /etc/conf.d/hostname   #(Set the system hostname)&lt;br /&gt;nano -w /etc/conf.d/domainname   #(Set the system domainname and NIS domain name)&lt;br /&gt;rc-update add domainname default&lt;br /&gt;echo 'config_eth0=( "dhcp" )&lt;br /&gt;dhcp_eth0="nodns nontp nonis"' &gt;&gt; /etc/conf.d/net&lt;br /&gt;rc-update add net.eth0 default&lt;br /&gt;nano -w /etc/hosts&lt;br /&gt;echo "Have fun with Gentoo!&lt;br /&gt;" &gt;&gt; /etc/issue   #(Set the greeting message)&lt;br /&gt;echo "&lt;br /&gt;Now you need to set your root password!"&lt;br /&gt;passwd&lt;br /&gt;echo "tts/0" &gt;&gt; /etc/securetty   #(Let root to be able to log on through the serial console)&lt;br /&gt;nano -w /etc/rc.conf   #(Further system configurations)&lt;br /&gt;#nano -w /etc/conf.d/keymaps   &lt;br /&gt;nano -w /etc/conf.d/clock&lt;br /&gt;emerge syslog-ng   #(Installing a system logger)&lt;br /&gt;rc-update add syslog-ng default&lt;br /&gt;emerge slocate   #(Installing File Indexing tool)&lt;br /&gt;emerge reiserfsprogs   #(Installing File System Tools)&lt;br /&gt;#emerge xfsprogs&lt;br /&gt;emerge dhcpcd   #(Installing a DHCP Client)&lt;br /&gt;#emerge grub   #(If you want to keep your Grub-for-Dos，skip the following)&lt;br /&gt;#cat &gt; /boot/grub/grub.conf &lt;&lt; "EOF"&lt;br /&gt;#echo "default 0&lt;br /&gt;#timeout 15&lt;br /&gt;#color cyan/blue white/blue&lt;br /&gt;&lt;br /&gt;#title=Gentoo Linux 2.6.12-r10&lt;br /&gt;#root (hd0,2)&lt;br /&gt;#kernel /boot/kernel-genkernel-x86-2.6.12-gentoo-r10 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev&lt;br /&gt;#initrd /boot/initramfs-genkernel-x86-2.6.12-gentoo-r10&lt;br /&gt;#&lt;br /&gt;#title=Windows XP&lt;br /&gt;#rootnoverify (hd0,0)&lt;br /&gt;#makeactive&lt;br /&gt;#chainloader +1&lt;br /&gt;#EOF&lt;br /&gt;#grub&lt;br /&gt;echo "OK, your system is ready, now you may exit and reboot!"&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Copy these scripts onto that vfat partition, after booting into the livecd environment, type:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# /mnt/cdrom/step1&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Set up time for your environment as instructed, then&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# /mnt/cdrom/step2&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;When you see the message 'Now you can run step3!', you're in the chroot environment. Now execute the 'step3' script:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# /step3&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;You'll be promted to edit /etc/fstab, change root password, configure kernel and so on. Unless your machine is very slow, the whole installation process takes less than 1 hour. Try to keep things as simple as possible, once your base system is up, you can always take your time and configure it into anything you want it to be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-110292230444992660?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/110292230444992660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=110292230444992660' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/110292230444992660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/110292230444992660'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/12/gentoo-hardisk-install-on-windows-only.html' title='Gentoo hardisk install on a windows only machine'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-110006797691271616</id><published>2004-11-10T14:05:00.000+08:00</published><updated>2006-01-24T18:39:36.496+08:00</updated><title type='text'>Save diskspace by recompiling glibc</title><content type='html'>The idea is to keep the number of installed locales to the bare minimum.&lt;br /&gt;&lt;br /&gt;Ever since sys-libs/glibc-2.3.4.20040619-r2 has been in Portage, a USE-flag called userlocales was provided to make sure only those locales mentioned in /etc/locales.build are to be built and installed. As a side-effect, this also leads to a much faster emerge of glibc.&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code: Activate the userlocales USE flag especially for glibc&lt;/span&gt;&lt;hr /&gt;# echo 'sys-libs/glibc userlocales' &gt;&gt; /etc/portage/package.use&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now specify the locales you want to be able to use:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# nano -w /etc/locales.build&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;only add the locales you need, like this:&lt;br /&gt;&lt;br /&gt;en_HK.UTF-8/UTF-8&lt;br /&gt;en_HK/ISO-8859-1&lt;br /&gt;zh_CN.GB18030/GB18030&lt;br /&gt;zh_CN.GBK/GBK&lt;br /&gt;zh_CN.UTF-8/UTF-8&lt;br /&gt;zh_CN/GB2312&lt;br /&gt;zh_HK.UTF-8/UTF-8&lt;br /&gt;zh_HK/BIG5-HKSCS&lt;br /&gt;zh_TW.EUC-TW/EUC-TW&lt;br /&gt;zh_TW.UTF-8/UTF-8&lt;br /&gt;zh_TW/BIG5&lt;br /&gt;&lt;br /&gt;All those locales supported by glibc can be viewed by unpacking the source, the file is /var/tmp/portage/glibc-......../work/glibc-........../localedata/SUPPORTED.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;(Note: If this is the first time you compile glibc, skip the following steps). &lt;/span&gt;&lt;br /&gt;Now let's start compiling glibc:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# emerge -B glibc &lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Then use localepurge script to delete all the locale files (you need to emerge localepurge and configure /etc/locale.nopurge first): &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# localepurge &lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Finally, install the newly compiled glibc: &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;# emerge -k glibc&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-110006797691271616?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/110006797691271616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=110006797691271616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/110006797691271616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/110006797691271616'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/11/save-diskspace-by-recompiling-glibc.html' title='Save diskspace by recompiling glibc'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109902394777577058</id><published>2004-10-29T13:16:00.000+08:00</published><updated>2005-10-11T22:46:43.263+08:00</updated><title type='text'>Mutimedia stuff</title><content type='html'>To create avi or mpeg files from a DVD or VCD, first get disk info (such as titles, chapters, audio languages and subtitle languages) by using mplayer:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ mplayer dvd:// -v (-aop list=volume,extrastereo:volume=120 -vf lavcdeint)&lt;br /&gt;$ mencoder dvd://1 -chapter 20-22 -o tiger.avi -oac copy -ovc copy -alang en -slang zh&lt;br /&gt;$ mencoder vcd://1 -ss 00:02:23 -of mpeg -o output.mpeg -oac mp3lame -ovc copy -endpos 00:00:15&lt;br /&gt;$ mencoder dvd://1 -chapter 20 -o tiger.avi -oac mp3lame -ovc divx4 -aid 130 -sid 1 -endpos 50mb&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Type 'mencoder -ovc help' to find out available video codecs.&lt;br /&gt;A two pass procedure:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ mencoder dvd://1 -oac copy -aid 128 -o movie.avi -ovc lavc -lavcopts vcodec=mpeg4:vhq:vpass=1 -vf scale=640:480,crop=640:344:0:66,lavcdeint -vobsubout sub-en.txt -sid 1&lt;br /&gt;$ mencoder dvd://1 -oac mp3lame -o movie.avi -ovc lavc -lavcopts vcodec=mpeg4:vhq:vpass=2 -vf scale=640:480,crop=640:344:0:66,lavcdeint&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;To create a mpg file that plays a photo slideshow,type:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ img2mpg -d 4 -w sound.wav -o show.mpg -i /path/to/*.jpg &lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;To merge 2 avi files, type:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ avimerge -o big.avi -i small01.avi small02.avi&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;'Img2mpg' is one of the 'mjpegtools' while 'avimerge' belongs to 'transcode'; to verify, type:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ qpkg -fp img2mpg&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Note: img2mpg has been removed from mjpegtools &gt; -1.6.1.90, it seems it has been incorporated into digikamplugins.&lt;br /&gt;You must have installed 'gentoolkit' to use the 'qpkg' command.&lt;br /&gt;&lt;br /&gt;Extracting audio from VOBs/MPEGs/AVIs&lt;br /&gt;&lt;br /&gt;MPlayer can be used easily to extract sound. The -vo null options tells MPlayer not to show the video. &lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;VOB -&gt; AC3: &lt;br /&gt;$ mplayer -vo null -nogui -alang de -dumpaudio -dumpfile lang-de.ac3 *vob&lt;br /&gt;This will extract the German audio to a file called lang-de.ac3.&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;VOB -&gt; WAV: &lt;br /&gt;$ mplayer -vo null -nogui -aid 128 -ao pcm -aofile lang-de.wav *vob&lt;br /&gt;This will extract audio track no. 128, downmix the AC3 sound to PCM and write the results to lang-de.wav.&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;MPG -&gt; MP2: &lt;br /&gt;$ mplayer -vo null -nogui -dumpaudio -dumpfile audio.mp2 myvideo.mpg&lt;br /&gt;This will extract the audio to a file called audio.mp2.&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;AVI -&gt; WAV: &lt;br /&gt;mplayer -vo null -nogui -ao pcm -aofile audio.wav myvideo.avi&lt;br /&gt;This will extract the audio, convert it to PCM and write the resulting .WAV to audio.wav.&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;I'm not listing all possible options. Generally use -dumpaudio -dumpfile newaudio.extension if you want to extract the audio without processing and -ao pcm -aofile newaudio.wav if you want the WAV itself.  Here's a simple one-liner:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;mplayer -ao pcm -aofile audio.wav video.vob ; normalize audio.wav ; oggenc audio.wav audio.ogg&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;The following is a simple command to rip vob files from a dvd:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ mount /mnt/cdrom &amp;&amp; vobcopy /mnt/cdrom -l -n 1 -O . -t "vob"&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;It will create a vob directory in the current directory.  To convert these vob files into mpeg (from filename.vob to final.mpg):&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;$ tcextract -i filename.vob -t vob -x mpeg2 &gt; movie.m2v&lt;br /&gt;$ tcextract -i filename.vob -a 0 -x ac3 -t vob &gt; movie.ac3&lt;br /&gt;$ mplex -f 8 -o final.mpg movie.*&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Konqueror also works, just mount the DVD and copy the vob files.&lt;br /&gt;&lt;br /&gt;A ~/.asoundrc that works:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;Code:&lt;/span&gt;&lt;hr /&gt;pcm.mymixer { &lt;br /&gt;     type dmix &lt;br /&gt;     ipc_key 1024 &lt;br /&gt;     slave { &lt;br /&gt;         pcm "hw:0,0" &lt;br /&gt;         period_size 1024 &lt;br /&gt;         buffer_size 8192 &lt;br /&gt;     } &lt;br /&gt;     bindings { &lt;br /&gt;         0 0 &lt;br /&gt;         1 1 &lt;br /&gt;     } &lt;br /&gt; } &lt;br /&gt; &lt;br /&gt; pcm.!default { &lt;br /&gt;     type plug &lt;br /&gt;     slave.pcm "mymixer" &lt;br /&gt; } &lt;br /&gt; &lt;br /&gt;&lt;br /&gt; pcm.dsp0 { &lt;br /&gt;     type plug &lt;br /&gt;     slave.pcm "mymixer" &lt;br /&gt; } &lt;br /&gt; &lt;br /&gt; ctl.mixer0 { &lt;br /&gt;     type hw &lt;br /&gt;     card 0 &lt;br /&gt; } &lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109902394777577058?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109902394777577058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109902394777577058' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109902394777577058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109902394777577058'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/mutimedia-stuff.html' title='Mutimedia stuff'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109844101901909333</id><published>2004-10-22T18:29:00.000+08:00</published><updated>2004-10-22T18:30:19.020+08:00</updated><title type='text'>Schubert's Piano Sonata No.21 D960 </title><content type='html'>Today I bought Kovacevich's EMI recording of Schubert's greatest piano sonata. I've got several recordings of this sonata already, namely those of Kempff, Curzon and Richter; they are very different interpretations, now I've got one more. I always like Kovacevich's Beethoven, yet this is his first Schubert CD I've got.&lt;br /&gt;&lt;br /&gt;Among the great composers for the piano, Schubert was himself no virtuoso. This is reflected in the absence of bravura passages in his piano works which, perhaps with the exception of the &lt;span style="font-style:italic;"&gt;Wanderer Fantasy&lt;/span&gt;, make no great technical demands on a performer. This is not to say that his piano works are easy to perform. On the contrary, as most of his piano sonatas display a flexibility of structure and an adventurous handling of harmony and tone, they cause problems to many players. A good pianist can make a big difference to what a Schubert's sonata should sound like, this is especially the case with his late sonatas; those are long musical soliloquies that constantly repeat and reformulate themes as if they were persistent memories. They may sound terribly boring if the player cannot bring out the cogency of the longer spans; in the hands of a great player, however, they become the most sublime and breath-taking music. Kovacevich is certainly an artist of such caliber; his account sounds fresh and bold, yet not without introspectiveness; the tonal beauty and depths of feeling he brings to this sonata is very impressive indeed.&lt;br /&gt;&lt;br /&gt;His complete Beethoven cycle is available now, it's simply a matter of time before I grab a box; it costs about US$100, I guess I need to wait for a sale.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109844101901909333?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109844101901909333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109844101901909333' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109844101901909333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109844101901909333'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/schuberts-piano-sonata-no21-d960.html' title='Schubert&apos;s Piano Sonata No.21 D960 '/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109844085826579281</id><published>2004-10-22T18:10:00.000+08:00</published><updated>2005-01-09T19:35:37.356+08:00</updated><title type='text'>用dnscache做dns resolver</title><content type='html'>&lt;span style="font-weight: bold;"&gt;此文最初发表于LinuxSir论坛：&lt;a href="http://www.linuxsir.org/bbs/showthread.php?s=&amp;threadid=93585&amp;amp;highlight=djbdns"&gt;http://www.linuxsir.org/bbs/showthread.php?s=&amp;threadid=93585&amp;amp;highlight=djbdns&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;djbdns 是bind的最佳替代品；它比bind小，安全，容易设置。dnscache只是djbdns的一个组件，主要是用来处理user queries的caching DNS server。这有一篇文章是介绍djbdns的，是FreeBSD的设置，和gentoo是不大一样的：&lt;a href="http://ezine.daemonnews.org/200210/ezdjbdns.html"&gt;http://ezine.daemonnews.org/200210/ezdjbdns.html&lt;/a&gt;，不过可以了解一下原理。&lt;br /&gt;安装dnscache很简单：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码:&lt;/span&gt;&lt;hr /&gt;# emerge djbdns&lt;br /&gt;# dnscache-setup&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;dnscache会被(缺省)安装到/var/dnscache下，回答完一些有关ip的问题之后，会产生一个新的/etc/resov.conf，原本的会备份为resolv.conf.orig。然后启动服务：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码:&lt;/span&gt;&lt;hr /&gt;# /etc/init.d/svscan start&lt;br /&gt;# rc-update add svscan default&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;然后试一下：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码:&lt;/span&gt;&lt;hr /&gt;# host www.gentoo.org&lt;br /&gt;www.gentoo.org has address 199.246.73.203&lt;br /&gt;www.gentoo.org has address 198.63.211.235&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;注：host命令属于net-dns/bind-tools&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;cache 的大小是可以改的(缺省是1m)，只要修改/var/dnscache/env/CACHESIZE里的数字即可。 /var/dnscache/env/DATALIMIT也要做相应的改动，而且必须比CACHESIZE大。如果你的cache大小是10m，这10m 的DNS lookups会令到你经常去的网站的resolving的过程变得飞快！&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109844085826579281?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109844085826579281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109844085826579281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109844085826579281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109844085826579281'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/dnscachedns-resolver.html' title='用dnscache做dns resolver'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109819435616879790</id><published>2004-10-19T21:45:00.000+08:00</published><updated>2006-06-28T11:24:39.600+08:00</updated><title type='text'>有關系統備份</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;blockquote&gt;&lt;/blockquote&gt;此文最初發表於Gentoo台灣論壇: &lt;a href="http://forums.gentoo.org.tw/viewtopic.php?t=41975" gif=""&gt;http://forums.gentoo.org.tw/viewtopic.php?t=41975&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;大家都知道要做資料備份及設定檔的備份。但有沒有想過做整個系統的備份呢？例如自己不小心rm -rf或是chmod -R 777敲得太快後面打了/ 之後還沒來得及打目錄就按了Enter；系統被入侵；斷電導致整個硬碟完蛋；又或是系統被自己莫名其妙地搞壞了最終都不懂怎麼修復等等。這時候似乎只有重 裝了，但Gentoo重裝可不是一件輕鬆的事喔！如果你做了整個系統的備份就不用怕了！Windows裡有Ghost，linux下有Partimage和Mondorescue，但始終我還是覺得unix常見的工具反而是最具靈活性的。&lt;br /&gt;&lt;br /&gt;用LiveCD或Knoppix開機，並將根分區掛好：/mnt/gentoo。如果你的/boot，/usr用的是獨立的分區或硬碟，你必須把它們分別掛到/mnt/gentoo/boot ，/mnt/gentoo/usr等目錄裡。然後：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代碼:&lt;br /&gt;&lt;/span&gt;&lt;hr /&gt;# cd /mnt/gentoo&lt;br /&gt;# tar -cz --exclude-from /mnt/gentoo/root/exclude-list -iv * | split -a 1 &lt;br /&gt;-b 700m - /path/to/mybackup.tar.gz-&lt;hr /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;這樣會產生好幾個包mybackup.tar.gz-a， mybackup.tar.gz-b等等，每個最大700m（方便燒碟）。exclude-list可以事先寫好，類似這樣：&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;usr/portage/distfiles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;var/tmp/portage&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;home/yourusername/music&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;home/yourusername/video&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;並放到你的gentoo分區的/root裡。&lt;br /&gt;注意存放備份包的地方要有足夠的空間，如果在不同的分區，事先要掛好。&lt;br /&gt;還原的時候，先要在有關的分區上重建檔案系統，並象以上所說的那樣掛載好，然後：&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代碼:&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;# cd /mnt/gentoo&lt;br /&gt;# cat /path/to/mybackup.tar.gz-* | tar xzvpf&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;為什麼要用LiveCD啟動呢？這是因為運行中的系統並非靜態，不應該簡單地去tar根目錄；有的程序如partimage甚至要求卸載備份的分區。當然 也有可以在運行中的系統做完全備份的程序啦，Mondorescue就是一個例子；這些程序都頗為複雜，不過有興趣的朋友可以自己試試。&lt;br /&gt;&lt;br /&gt;我自己有個分區裝了個後備系統。這樣每當其他系統出了問題，我不至於沒機子用。這個後備系統我平時很少用，更不會去瞎调；但我機子的grub是從這裡裝 的，備份或搶修其他分區也是在這裡做的。這個後備系統本來是Knoppix的硬碟安裝（因為現在Knoppix硬碟安裝實在是太容易了），不過我已經把它 換成了gentoo了（已經有了備份就什麼都不用怕了）！&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LinuxSir論壇的gao_linfeng寫過一篇使用dd的備份方案挺有意思的: &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://bbs.linuxsir.org/showthread.php?s=&amp;threadid=113474"&gt;http://bbs.linuxsir.org/showthread.php?s=&amp;amp;threadid=113474&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;另外，如果想備份partition table，可以：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代碼:&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;# dd if=/dev/hda of=mbr.bak bs=512 count=1&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;還原：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代碼:&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;# dd of=/dev/hda if=mbr.bak bs=512 count=1&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109819435616879790?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109819435616879790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109819435616879790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109819435616879790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109819435616879790'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/blog-post_19.html' title='有關系統備份'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109806640740660286</id><published>2004-10-18T10:16:00.000+08:00</published><updated>2004-11-10T17:10:11.353+08:00</updated><title type='text'>win4lin在Gentoo Linux 2.6内核下的安装</title><content type='html'>&lt;span style="font-weight: bold;"&gt;此文最初發表於Gentoo官方論壇: &lt;a href="http://forums.gentoo.org/viewtopic.php?t=171727&amp;highlight="&gt;http://forums.gentoo.org/viewtopic.php?t=171727&amp;amp;highlight=&lt;/a&gt;&lt;br /&gt;此中文版轉自Gentoo中文社區，並經Hans Joanphan校定: &lt;a href="http://gentoo.linuxsir.org/doc/cn/win4lin.xml"&gt;http://gentoo.linuxsir.org/doc/cn/win4lin.xml&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 从Portage中安装win4lin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;如果你的内核选用win4lin-sources-2.6.7-r5，这个内核相对gentoo-dev-sources-2.6.7-r14要简陋一些，安装win4lin则可直接使用。&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 1.1: win4lin-sources-2.6.7-r5下的安装&lt;br /&gt;&lt;/span&gt;&lt;hr /&gt;# ACCEPT_KEYWORDS="~x86" emerge win4lin&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;注释：&lt;/span&gt;这个不推荐使用。&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 手动安装win4lin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;相对来说，内核gentoo-dev-sources-2.6.7-r14则比较常用些，打的补丁也比较多，功能比较丰富。但是portage中并不可以直接在这个基础上安炸win4lin，我们可以手动安装。&lt;br /&gt;&lt;br /&gt;首先从&lt;a href="http://www.netraverse.com/member/downloads/kernel_patch.php"&gt;这儿&lt;/a&gt;下载内核补丁：mki-adapter26_1_3_6.patch和Kernel-Win4Lin3-2.6.7.patch&lt;br /&gt;然后准备编译内核，先把内核源码备份一下，如下：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 2.1: 备份内核源码&lt;br /&gt;&lt;/span&gt;&lt;hr /&gt;# cd /usr/src&lt;br /&gt;# cp -a linux-2.6.7-gentoo-r14 win4lin&lt;br /&gt;# rm linux&lt;br /&gt;# ln -s win4lin linux&lt;br /&gt;# cd linux&lt;br /&gt;# nano -w Makefile&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;注释&lt;/span&gt;：修改“EXTRAVERSION = ”，比如改成“-win4lin-r14”之类以便识别&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;把下载的mki-adapter26_1_3_6.patch和Kernel-Win4Lin3-2.6.7.patch拷到目录下，然后给内核打补丁：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 2.2: 给内核打补丁&lt;/span&gt;&lt;hr /&gt;# patch -p1 &lt; Kernel-Win4Lin3-2.6.7.patch &gt; patch.log 2&gt;&amp;1&lt;br /&gt;# patch -p1 &lt; mki-adapter26_1_3_6.patch &gt;&gt; patch.log 2&gt;&amp;amp;1&lt;br /&gt;# less patch.log&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;如果patch.log里没错误，就可以开始编译kernel了。注意以下这些要编进kernel：  &lt;br /&gt;&lt;ul&gt; &lt;li&gt;Enable loadable module support&lt;/li&gt;&lt;li&gt;System V IPC&lt;/li&gt;&lt;li&gt;Kernel support for ELF binaries&lt;/li&gt;&lt;li&gt;Networking support&lt;/li&gt;&lt;li&gt;TCP/IP networking&lt;/li&gt;&lt;li&gt;ISO 9660 CD-ROM filesystem support&lt;/li&gt;&lt;li&gt;Include NeTraverse Win4Lin Support&lt;/li&gt; &lt;/ul&gt;   编译完成后，用新的内核重启。&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 配置win4lin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;如果你想确认win4lin是否已经正确的编入内核中，你可以：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 3.1: 确认win4lin是否编入内核&lt;/span&gt;&lt;hr /&gt;# modprobe mki-adapter&lt;br /&gt;# cat /proc/mki-adapter/version&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;注释：&lt;/span&gt;按照本文的安装方法，应该显示为1.3.6。如果在使用modprobe或cat发生错误，&lt;br /&gt;你新编译的内核可能未正确的编译好或启动。&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;确认win4lin已经编入内核后，便可以安装win4lin：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 3.2: 安装win4lin&lt;/span&gt;&lt;hr /&gt;# emerge -O win4lin&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;现在的稳定版是win4lin-5.1.1，可以到/var/db/pkg/app-emulation下看看。&lt;br /&gt;把windows CD放入光驱，进行初始设定：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 3.3: win4lin的初始化&lt;/span&gt;&lt;hr /&gt;# mount /mnt/cdrom&lt;br /&gt;# ebuild /var/db/pkg/app-emulation/win4lin-5.1.1/win4lin-5.1.1.ebuild config&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;注释：&lt;/span&gt;如果显示有问题可以先启动win4lin服务，&lt;br /&gt;# /etc/init.d/Win4Lin start&lt;br /&gt;然后用以上ebuild。。。那个指令再试一次。&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;完成之后，用一个有效的license号码代替/var/win4lin/install下license.lic里那个。然后便可以启动服务和安装windows：&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 3.4: 安装windows&lt;/span&gt;&lt;hr /&gt;# /etc/init.d/Win4Lin start   (或restart，如果你之前已经启动了服务的话)&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);"&gt;// 最好以普通用户身份安装windows&lt;/span&gt;&lt;br /&gt;$ installwindows&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;在询问网络的安装方式的时候，可以选择Winsock模式。接着就可以看到windows的安装画面了。最后将win4lin添加到默认运行级别中，即可每次电脑启动后直接使用你的win4lin了。&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style="font-family:verdana,arial,helvetica;"&gt;代码 3.5: 添加Win4lin到默认运行级别&lt;/span&gt;&lt;hr /&gt;# rc-update add Win4Lin default&lt;br /&gt;&lt;hr /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109806640740660286?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109806640740660286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109806640740660286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109806640740660286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109806640740660286'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/win4lingentoo-linux-26.html' title='win4lin在Gentoo Linux 2.6内核下的安装'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109799122872414971</id><published>2004-10-17T13:32:00.000+08:00</published><updated>2004-10-17T13:44:53.433+08:00</updated><title type='text'>Gentoo Linux</title><content type='html'>I've been using linux for quite some time now, Gentoo linux is my distribution of choice. Here's a screenshot of my KDE desktop:&lt;br /&gt;&lt;img src="http://www.linuxfans.org/nuke/desktop/screenshot/416682bb65eeesnapshot.png"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109799122872414971?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109799122872414971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109799122872414971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109799122872414971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109799122872414971'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/gentoo-linux.html' title='Gentoo Linux'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8755527.post-109799008916798333</id><published>2004-10-17T13:10:00.000+08:00</published><updated>2004-10-18T09:02:17.103+08:00</updated><title type='text'>Welcome to my blog!</title><content type='html'>So suddenly I've become a blogger!&lt;br /&gt;现在就开始我的博客生涯吧！&lt;br /&gt;現在就開始我的部落客生涯吧！&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8755527-109799008916798333?l=gentoo-hauser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gentoo-hauser.blogspot.com/feeds/109799008916798333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8755527&amp;postID=109799008916798333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109799008916798333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8755527/posts/default/109799008916798333'/><link rel='alternate' type='text/html' href='http://gentoo-hauser.blogspot.com/2004/10/welcome-to-my-blog.html' title='Welcome to my blog!'/><author><name>Hauser</name><uri>http://www.blogger.com/profile/12616750138672163830</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
