看板 Linux 關於我們 聯絡資訊
※ [本文轉錄自 gholk 信箱] 蠻有趣的一篇文章,雖然實在超級舊了, 以前可能也有透過轉信轉到板上過, 只是被歷史壁吃掉了。 覺得很有趣所以分享過來。 作者: [email protected] 標題: [紀錄] Gentoo Linux 安裝實錄 時間: Sat May 12 11:50:19 2018 發信人: lloyd (HUANG YU HSIN) 看板: linux 日期: Sat Aug 17 18:46:22 2002 標題: [紀錄] Gentoo Linux 安裝實錄 修改: Sat Aug 17 18:54:47 2002 我真的該去睡覺了,但是我無法按捺著內心的激動 如果我不稱現在寫下來,我一定會偷懶而不寫 而且再過幾個小時,也許我睡醒之後就無法紀錄下我現在的心情 雖然我現在還沒安裝完畢但(就快要好了)(14:30), 我實在是太感動了,你一定無法想像我是如何的他媽的感動.. 來表達我此刻的心情。 真是宇宙無敵的變態級的偉大。 因為真的所有讚美的言詞都無法表達我內心的高興。 抓下來一個 16M 的 ISO 檔,我想恩好小的系統,應該跟 Debian 一樣 安裝好一個小系統然後上網抓檔案安裝(透過網路安裝) 光碟檔案內容 du -a 2 ./isolinux/boot.catalog 9 ./isolinux/isolinux.bin 1 ./isolinux/isolinux.cfg 1117 ./isolinux/kernel 1 ./isolinux/message.txt 7317 ./isolinux/rescue.gz 8448 ./isolinux 7962 ./stage1-ix86-1.2.tbz2 16412 . 開機之後..恩硬體偵測作的不錯能夠自動以 hardware screan 的方式 抓到我的網路卡。<--果然是網路安裝型 喔 busybox 喔還開了六個 console 。喔叫我看 install.txt .. 不錯嗎..有 telnet ifconfig route less fdisk 工具還真不少 這個小系統還真不賴。 nano <-- 這是什麼阿.. 喔一個小小的 全螢幕 editer.. 以下就引用 install.txt 作為說明..因為我也是照著他 setup by setup 作的 細節請上他的網站看,我就我覺得重要的說明 Code listing 1 # modprobe pcnet32 (replace pcnet32 with your NIC module) Code listing 2 # modprobe aic7xxx # modprobe sr_mod # modprobe sd_mod Code listing 3 # insmod pcmcia_core # insmod i82365 # insmod ds # cardmgr -f modprobe the aic7xxx SCSI driver Loading PCMCIA kernel modules 我網路卡直接就抓到了,我用 IDE 這些我都不用作了 5.Configure installation networking Code listing 5 # /sbin/ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK # /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1 我使用 static IP 設定網路 Code listing 6: /etc/resolv.conf template domain mydomain.com nameserver 10.0.0.1 nameserver 10.0.0.2 設定 DNS 這時候 nano 就派上用場了..自己寫一個 nameserver 168.95.1.1 Network testing Code listing 7: /sbin/ifconfig for a working network card eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::50:ba8f:617a/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0 TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0 collisions:1984 txqueuelen:100 RX bytes:485691215 (463.1 Mb) TX bytes:123951388 (118.2 Mb) Interrupt:11 很好網路會動了!!! 6.Set up partitions 用 fdisk 切割一下硬碟吧,喔 devfs 還真不賴喔,自動就將 device 造出來了。真好 光碟上的 kernel 支援XFS, ext2, ext3 (journaling) and ReiserFS. 這四種檔案格式 OK!自己動手規劃一下硬碟分割吧 Code listing 8 # mkswap /dev/hda2 格式化 swap You can use the mke2fs command to create ext2 filesystems: Code listing 9 # mke2fs /dev/hda1 格式化 ext2 To create an XFS filesystem, use the mkfs.xfs command: Code listing 10 # mkfs.xfs /dev/hda3 格式化 XFS Code listing 11 # mke2fs -j /dev/hda3 格式化 ext3 Code listing 12 # mkreiserfs /dev/hda3 格式化 Reiserfs 7.Mount partitions (掛上硬碟) Now, we'll activate our new swap, since we may need the additional virtual memory that provides later: Code listing 13 # swapon /dev/hda2 啟動 swap Next, we'll create the /mnt/gentoo and /mnt/gentoo/boot mountpoints, and we'll mount our filesystems to these mountpoints. Code listing 14 # mkdir /mnt/gentoo # mount /dev/hda3 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/hda1 /mnt/gentoo/boot 反正你怎麼切就怎麼 mount 8.Mounting the CD-ROM Even though we've booted from the CD-ROM, the CD-ROM itself is not mounted under our minimal Linux boot CD environment. We'll need to mount it so that we can access the compressed build image tarball contained on the CD-ROM. To mount the CD-ROM, one typically types: Code listing 15 # mount /dev/cdroms/cdrom0 /mnt/cdrom -o ro -t iso9660 掛上光碟機 ^^^^^^^^^^^^^^^^^^^^ 看看不錯吧 devfs 耶... 9.Unpack the stage you want to use Code listing 16 # cd /mnt/gentoo # tar -xvjpf /mnt/cdrom/stage?-*.tbz2 # mount -o bind /proc /mnt/gentoo/proc # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf 解開 stage1-ix86-1.2.tbz2 喔喔!!在安裝小系統了喔。 (非也非也這個說真的還稱不上小系統) 等一下說明。 掛上 proc 將 DNS 設定 copy 過去 4.0k ./tmp 4.0k ./var/tmp 4.0k ./var/cache/edb/dep 16k ./var/cache/edb 20k ./var/cache 72k ./var/db/pkg/sys-apps/baselayout-1.7.8-r1 76k ./var/db/pkg/sys-apps 116k ./var/db/pkg/sys-kernel/linux-headers-2.4.18 120k ./var/db/pkg/sys-kernel 92k ./var/db/pkg/sys-libs/glibc-2.2.5-r2 96k ./var/db/pkg/sys-libs 60k ./var/db/pkg/sys-devel/gcc-2.95.3-r5 60k ./var/db/pkg/sys-devel/binutils-2.11.92.0.12.3-r2 124k ./var/db/pkg/sys-devel 420k ./var/db/pkg 424k ./var/db 4.0k ./var/run 4.0k ./var/lock/subsys 8.0k ./var/lock 4.0k ./var/log/news 8.0k ./var/log 4.0k ./var/spool/locate 8.0k ./var/spool 4.0k ./var/lib/misc 8.0k ./var/lib 488k ./var 12k ./etc/env.d 4.0k ./etc/cron.hourly 4.0k ./etc/cron.daily 4.0k ./etc/cron.hourly 4.0k ./etc/cron.daily 4.0k ./etc/cron.weekly 4.0k ./etc/cron.monthly 12k ./etc/modules.d 16k ./etc/conf.d 8.0k ./etc/ppp 96k ./etc/init.d 12k ./etc/skel 4.0k ./etc/runlevels/default 4.0k ./etc/runlevels/boot 4.0k ./etc/runlevels/nonetwork 4.0k ./etc/runlevels/single 20k ./etc/runlevels 304k ./etc 920k ./sbin 4.4M ./usr/bin 148k ./usr/lib/python2.2/site-packages 120k ./usr/lib/python2.2/lib-old 304k ./usr/lib/python2.2/lib-tk 344k ./usr/lib/python2.2/test/output 112k ./usr/lib/python2.2/test/data 2.4M ./usr/lib/python2.2/test 472k ./usr/lib/python2.2/encodings 88k ./usr/lib/python2.2/email 196k ./usr/lib/python2.2/compiler 20k ./usr/lib/python2.2/hotshot 232k ./usr/lib/python2.2/distutils/command 600k ./usr/lib/python2.2/distutils 56k ./usr/lib/python2.2/xml/dom 12k ./usr/lib/python2.2/xml/parsers 68k ./usr/lib/python2.2/xml/sax 144k ./usr/lib/python2.2/xml 36k ./usr/lib/python2.2/curses 40k ./usr/lib/python2.2/plat-linux2 120k ./usr/lib/python2.2/config 980k ./usr/lib/python2.2/lib-dynload 7.8M ./usr/lib/python2.2 332k ./usr/lib/portage/bin 7.8M ./usr/lib/python2.2 332k ./usr/lib/portage/bin 8.0k ./usr/lib/portage/lib 344k ./usr/lib/portage 12k ./usr/lib/misc 28k ./usr/lib/find 12k ./usr/lib/awk 8.0k ./usr/lib/gcc-lib/i486-pc-linux-gnu/2.95.3/include/asm 8.0k ./usr/lib/gcc-lib/i486-pc-linux-gnu/2.95.3/include/gnu 180k ./usr/lib/gcc-lib/i486-pc-linux-gnu/2.95.3/include 2.9M ./usr/lib/gcc-lib/i486-pc-linux-gnu/2.95.3 2.9M ./usr/lib/gcc-lib/i486-pc-linux-gnu 2.9M ./usr/lib/gcc-lib 12M ./usr/lib 188k ./usr/sbin 36k ./usr/include/linux/byteorder 8.0k ./usr/include/linux/isdn 40k ./usr/include/linux/lockd 96k ./usr/include/linux/mtd 184k ./usr/include/linux/netfilter_ipv4 48k ./usr/include/linux/netfilter_ipv6 68k ./usr/include/linux/nfsd 68k ./usr/include/linux/raid 68k ./usr/include/linux/sunrpc 4.7M ./usr/include/linux 636k ./usr/include/asm 388k ./usr/include/sys 540k ./usr/include/bits 16k ./usr/include/gnu 28k ./usr/include/scsi 60k ./usr/include/net 64k ./usr/include/arpa 92k ./usr/include/netinet 24k ./usr/include/protocols 8.0k ./usr/include/netipx 8.0k ./usr/include/netash 12k ./usr/include/netax25 8.0k ./usr/include/netatalk 8.0k ./usr/include/netrom 8.0k ./usr/include/netpacket 8.0k ./usr/include/netrose 8.0k ./usr/include/neteconet 120k ./usr/include/rpc 272k ./usr/include/rpcsvc 8.0k ./usr/include/nfs 448k ./usr/include/python2.2 8.7M ./usr/include 4.0k ./usr/src 4.0k ./usr/portage 4.0k ./usr/X11R6/include/GL 8.0k ./usr/X11R6/include 4.0k ./usr/X11R6/share 4.0k ./usr/X11R6/lib 4.0k ./usr/X11R6/man 24k ./usr/X11R6 4.0k ./usr/share/man 4.0k ./usr/share/info 4.0k ./usr/share/doc 680k ./usr/share/misc 36k ./usr/share/bison 8.0k ./usr/share/terminfo/l 8.0k ./usr/share/terminfo/x 8.0k ./usr/share/terminfo/v 28k ./usr/share/terminfo 20k ./usr/share/tabset 780k ./usr/share 4.0k ./usr/local/games 4.0k ./usr/local/lib 4.0k ./usr/local/sbin 4.0k ./usr/local/share/doc 4.0k ./usr/local/share/man 12k ./usr/local/share 4.0k ./usr/local/bin 4.0k ./usr/local/src 36k ./usr/local 1.7M ./usr/i486-pc-linux-gnu/bin 88k ./usr/i486-pc-linux-gnu/lib/ldscripts 92k ./usr/i486-pc-linux-gnu/lib 4.0k ./usr/i486-pc-linux-gnu/include 1.8M ./usr/i486-pc-linux-gnu 28M ./usr 4.0k ./home 4.0k ./opt 4.0k ./root 4.0k ./proc 4.0k ./lib/dev-state 2.3M ./lib 4.0k ./mnt/floppy 4.0k ./mnt/cdrom 4.0k ./mnt/.init.d 16k ./mnt 4.0k ./dev/pts 4.0k ./dev/shm 28k ./dev 4.0k ./boot 1.9M ./bin 34M . 我本想將所有的檔案列上來,但是實在是太長了,簡單看一下吧! 明眼人一看,應該就知道我再說什麼了。 他沒有 kernel ,連要作開機的工具也沒有。夠扯吧! 一些簡單的工具,還都是 busybox 提供的, 不過重點來了,他可是有個 gcc compile 還有 python 34M大部份都被這兩個給吃掉了。 Code listing 17 # chroot /mnt/gentoo /bin/bash # env-update Regenerating /etc/ld.so.cache... # source /etc/profile chroot 到硬碟上,OK! 如果你要說可以 chroot 這樣也算是小系統。 那我也認了。:-) 算了這樣也算了。 設定一下環境,ldconfig 以及 path 等 shell 會用到的環境參數 10.Rsync Code listing 18 # emerge rsync 嘿嘿!遠端抓檔案了喔 rsync 資料回來了。抓 bin 執行檔?? 他去抓整個 portge 的 source tree 的 path。 怎麼樣,像不像 posts 啊!還真的很像。cvsup 嘿嘿 11.Progressing from stage1 to stage2 到現在你終於完成第一階段了,來來來還有第二階段喔 Code listing 19 # nano -w /etc/make.conf (Adjust these settings) 這個檔案就是 Gentoo 效能的魔力檔案,他用來設定你 CFLAGS CXFLAGS 的參數 檔案檢列如下 GENTOO_MIRRORS="http://www.ibiblio.org/gentoo" #SYNC="cvs://:pserver:[email protected]:/home/anoncvs" Uncomment to use Lukemftp for download # you need to merge lukemftp first! #FETCHCOMMAND='/usr/bin/lukemftp -s -a -o ${DISTDIR}/${FILE} ${URI}' #RESUMECOMMAND='/usr/bin/lukemftp -s -a -R -o ${DISTDIR}/${FILE} ${URI}' # Uncomment if you wanna use Prozilla for download # you need to merge prozilla first! #FETCHCOMMAND='/usr/bin/proz --no-getch -s ${URI} -P ${DISTDIR}' # Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries # will run on any x86 system) #CHOST="i686-pc-linux-gnu" #CFLAGS="-mcpu=i686 -O3 -pipe" #CXXFLAGS="-mcpu=i686 -O3 -pipe" # Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon exclusive (binaries # will use the P6 instruction set and only run on P6+ systems) CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -O3 -pipe" CXXFLAGS="-march=i686 -O3 -pipe" # Pentium/Pentium MMX+ exclusive (requires a Pentium Classic or K6 or beyond) #CHOST="i586-pc-linux-gnu" #CFLAGS="-march=i586 -O3 -pipe" #CXXFLAGS="-march=i586 -O3 -pipe" # PowerPC exclusive (requires a PPC) #CHOST="powerpc-unknown-linux-gnu" #CFLAGS="-O2 -pipe" #CXXFLAGS="-O2 -pipe" 怕太長了挑幾個重點 show 一下,mirror site 位置 cvs 的位置,抓檔用什麼工具抓,沒設定預設用 wget 還有 compile MAGIC 參數!!!!!!! 還滿多平台的 Code listing 20 # cd /usr/portage # scripts/bootstrap.sh 剛剛我有 rsync 抓 portage 所以現在這有資料了 這個 scripts 就是我剛剛前幾封 post 說的 gcc compile gcc 的動作 i486-gcc compile static binutils i486-gcc compile static i686-gcc static i686-gcc compile glibc <-- 我 build 到這裡應該有一半了吧, 的時候應該已經過了六個小時了 static i686-gcc compile shard i686-gcc 其實他還有 compile 一些檔案,但是我沒看清楚,映像中有 getext 等工具 有興趣的人自己去看 Code listing 22 # export CONFIG_PROTECT="" # emerge --pretend system [lists the packages to be installed] # emerge system check 一下你還有那些工具要 compile <-- 請注意,是 compile 而不是安裝 bin code。 emerge system 好吧抓檔案了開始 make 吧!!!! . ... .... 然後就是漫長的等待!!!!!!! 等這個 make 完大概已經 過了 10 小時了。 請注意!!!我們還沒有 kernel 耶!!!!!! 連 lilo 都還沒作。 再接再厲!! 13.Final steps: timezone Code listing 23 # ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime glibc 有了可以設定時區了<- 稿不好這時候才有 ln 這個工具也說不一定 :-) link 亞洲台北 14.Final steps: kernel and system logger Code listing 24 # emerge sys-kernel/gentoo-sources 抓 kernel source 回來酷吧! 全身上下全部都用 make 的。 你說夠不夠變態!! 真是完美的變態 Code listing 25 # cd /usr/src/linux # make menuconfig # make dep && make clean bzImage modules modules_install # mv /boot/bzImage /boot/bzImage.orig [if bzImage already exists] # cp /usr/src/linux/arch/i386/boot/bzImage /boot 不用講了吧 make kernel 啦 make menuconfig <-- 我小時候曾經 build ncouse lib 我記得這是很辛苦的一件事 不要想說他會幫你選好,自己好好選吧..可別偷懶到時候沒辦法開機,你就去哭吧 不過還好有救援光碟。不過還是好好選。既然是自己選 cpu 型號就要對喔 網路,硬碟,檔案系統。不要選 devfs <-- 千萬 他只有在安裝時才用這個。實際上應該是沒有。算啦老實一點 就是我對 devfs 沒把握。所以我沒選。但是我現在可是安裝成功了喔 ... 嘿嘿嘿嘿 Code listing 26 # emerge sys-apps/sysklogd # rc-update add sysklogd default or # emerge app-admin/syslog-ng # rc-update add syslog-ng default or # emerge app-admin/metalog # rc-update add metalog default 裝 syslog 挑一個作吧..我選 sysklog <--因為我認識他..嘿嘿 Code listing 27 # emerge sys-apps/dcron # crontab /etc/crontab or # emerge sys-apps/fcron # crontab /etc/crontab or # emerge sys-apps/vcron crontab 也挑一個來作吧.. 我還是第一次知道有這麼多 cron 管他我挑 dcron. using XFS, you should emerge the xfsprogs ebuild: Code listing 28 # emerge sys-apps/xfsprogs If you're using LVM, you should emerge the lvm-user ebuild: Code listing 29 # emerge --usepkg sys-apps/lvm-user 這兩個對我沒用..我沒作 16.Final steps: /etc/fstab 好像從 13 就是 Final steps <-- 他媽的 好像被媽媽騙著走,快到了快到了 Code listing 30 # /etc/fstab: static file system information. # # noatime turns of atimes for increased performance (atimes normally aren't # needed; notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail and tail freely. # <fs> <mountpoint> <type> <opts> <dump/pass> # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/BOOT /boot ext2 noauto,noatime 1 2 /dev/ROOT / ext3 noatime 0 1 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 proc /proc proc defaults 0 0 沒錯!!自己用 nano 改! 帥吧!!! Final steps: set the root password 媽媽還有多遠才會到阿??? 快了快了...... Before you forget, set the root password by typing: Code listing 31 # passwd 別忘記幫 root 改個密碼吧...沒改可是進不去 Final steps: /etc/hostname 媽媽人家我好累! 快到了快到了喝口水就到了!! Edit this file so that it contains your fully-qualified domain name on a single line, i.e. mymachine.mydomain.com. 幫你自己的機器取個名字吧... nano /etc/hostname 寫下你機器的名字吧。寶貝 其實還滿慶幸的他不是用 VI , nano 跟 emacse 有點像,賺到了。 Vi vim 派的改學 emacse 吧.. 不要再受 billy joy 毒害了。 Final steps: /etc/hosts 媽媽你騙我怎麼還沒到?? 好啦好啦快了快了 This file contains a list of ip addresses and their associated hostnames. It's used by the system to resolve the IP addresses of any hostnames that may not be in your nameservers. Here's a template for this file: Code listing 32 127.0.0.1 localhost # the next line contains your IP for your local LAN, and your associated machin e name 192.168.1.1 mymachine.mydomain.com mymachine 把自己機器的資料加進來吧... Final network configuration 媽媽怎麼還沒到?? 這個弄一弄待會就有車車坐了!! Add the names of any modules that are necessary for the proper functioning of your system to /etc/modules.autoload file (you can also add any options you need to the same line.) When Gentoo Linux boots, these modules will be automatically loaded. Of particular importance is your ethernet card module, if you happened to compile it as a module: Code listing 33: /etc/modules.autoload 3c59x 這個檔案用來自動 load modules 的.跟 debian 作法一樣.檔名不同罷了。 靠!自己編的當然就 build 死在 kernel 啦!我還在那傻勒!要就變態到極致。 Edit the /etc/conf.d/net script to get your network configured for your first boot: Code listing 34 # nano -w /etc/conf.d/net # rc-update add net.eth0 default 人客看一下吧,這到底像 FreeBSD 還是像 Slawkware 我覺得比較像 BSD # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.4 2002/05/12 21:48:18 azarah Exp $ # This is basically the ifconfig argument without the ifconfig $iface # iface_eth0="192.168.23.33 broadcast 192.168.23.255 netmask 255.255.252.0" #iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0" 怎樣一樣吧!!!漂亮 # For DHCP set iface_eth? to "dhcp" # For passing options to dhcpcd use dhcpcd_eth? # #iface_eth0="dhcp" #dhcpcd_eth0="..." # For adding aliases to a interface # #alias_eth0="192.168.0.3 192.168.0.4" # NB: The next is only used for aliases. # # To add a custom netmask/broadcast address to created aliases, # uncomment and change accordingly. # #broadcast_eth0="192.168.0.255" #netmask_eth0="255.255.255.0" # For setting the default gateway # gateway="eth0/192.168.23.26" 帥呆了!! Code listing 35: Multiple network interfaces # cd /etc/init.d # cp net.eth0 net.ethx # rc-update add net.ethx default 沒細查,看起來應該是設定 runlevel 用的 rc-update 沒錯,是 runlevel script.. If you have a PCMCIA card installed, have a quick look into /etc/init.d/pcmcia to verify that things seem all right for your setup, then add Code listing 36 depend() { need pcmcia } PCMCIA 閃一邊!不關我事。 Code listing 37: basic configuration # nano -w /etc/rc.conf 酷了吧!酷了吧!酷了吧! rc.conf 耶!!!!!!! 映像中好像 Slackware 好像也是同樣的作法,年代太久了記不清楚了! FreeBSD 我可以確定是這樣作的 對喔!! Slackware 是 BSD SYSV 各半。這個 Gentoo 也是!! # Copyright 1999-2001 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author: Daniel Robbins <[email protected]> # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/rc.conf,v 1.10 2002/04/28 08:18:00 azarah Exp $ # /etc/rc.conf: Global startup script configuration settings # Use KEYMAP to specify the default console keymap. There is a complete tree # of keymaps in /usr/share/keymaps to choose from. This setting is used by the # /etc/init.d/keymaps script. KEYMAP="us" # CONSOLEFONT specifies the default font that you'd like Linux to use on the # console. You can find a good selection of fonts in /usr/share/consolefonts; # you shouldn't specify the trailing ".psf.gz", just the font name below. # To use the default console font, comment out the CONSOLEFONT setting below. # This setting is used by the /etc/init.d/consolefont script (NOTE: if you do # not want to use it, run "rc-update del consolefont" as root). CONSOLEFONT="default8x16" # CONSOLETRANSALTION is the charset map file to use. Leave commented to use # the default one. Have a look in /usr/share/consoletrans for a selection of # map files you can use. #CONSOLETRANSLATION="8859-1_to_uni" # Set CLOCK to "UTC" if your system clock is set to UTC (also known as # Greenwich Mean Time). If your clock is set to the local time, then set CLOCK # to "local". This setting is used by the /etc/init.d/clock script. CLOCK="UTC" # Set protocols to the protocols that you plan to use. Gentoo Linux will only # enable module auto-loading for these protocols, eliminating annoying module # not found errors. # Num Protocol # 1: Unix # 2: IPv4 # 3: Amateur Radio AX.25 # 4: IPX # 5: DDP / appletalk # 6: Amateur Radio NET/ROM # 9: X.25 # 10: IPv6 # 11: ROSE / Amateur Radio X.25 PLP # 19: Acorn Econet # Most users want this: PROTOCOLS="1 2" #For IPv6 support: #PROTOCOLS="1 2 10" # What display manager do you use ? [ xdm | gdm | kdm ] #DISPLAYMANAGER=xdm # XSESSION is a new variable to control what window manager to start # default with X if run with xdm, startx or xinit. The default behavior # is to look in /etc/X11/Sessions/ and run the script in matching the # value that XSESSION is set to. The support scripts is smart enouth to # look in all bin directories if it cant find a match in /etc/X11/Sessions/, # so setting it to "enligtenment" can also work. This is basically used # as a way for the system admin to configure a default system wide WM, # allthough it will work if the user export XSESSION in his .bash_profile, etc. # # NOTE: this behaviour is overridden when a ~/.xinitrc or ~/.xsession exists # for the particular program run ( ~/.xinitrc for startx, ... ). # # Defaults depending on what you install currently include: # # Gnome - will start gnome-session # KDE - will start startkde # Xsession - will start a terminal and a few other nice apps #XSESSION=Gnome Final steps: configure GRUB 媽媽到了沒啦!我的手沒力氣了!!! 來來來你看你看 GRUB 外婆家不就在那邊嗎 媽媽怎麼不是 LILO 奶奶.. GRUB 婆婆是誰阿??? 我們為什麼要來 GRUB 婆婆家阿!!好遠喔! GRUB 婆婆比較漂亮阿! LILO 奶奶也很可愛阿! GRUB 婆婆家比較漂亮,反正過來玩玩看嗎? 喔!!! 怎麼辦沒用過耶,算了反正還有救援光碟。GRUB 婆婆我來了。 Code listing 38 # grub You'll be presented with the grub> grub command-line prompt. Now, you need to type in the right commands to install the GRUB boot record onto your hard drive. In my example configuration, I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands I want to type are: nano -w /boot/grub/menu.lst Code listing 39 grub> root (hd0,0) grub> setup (hd0) grub> quit Code listing 40 default 0 timeout 30 splashimage=(hd0,0)/boot/grub/splash.xpm.gz title=My example Gentoo Linux root (hd0,0) kernel /boot/bzImage root=/dev/hda3 # Below needed only for people who dual-boot title=Windows NT Workstation root (hd0,5) chainloader +1 不要問我..我照著打罷了。我也看不懂,反正 LILO 奶奶也蠻能幹的。管他,不喜歡換回來。 17.Installation complete! 媽的!怎麼還有。 Code listing 41 # exit // This exits the chrooted shell; you can also type ^D # cd / # umount /mnt/gentoo/boot # umount /mnt/gentoo/proc # umount /mnt/gentoo # reboot 退出 chroot , umount 所有的 partation . 重開機!!! == 完 == 不沒完!! 我的 GRUB 看來設定錯了,不過還好 GRUB 認得 file system 可以直接用檔名 load 進來開機。 哇靠!!抄 FreeBSD 也不用抄這麼像吧... 做完這些後你就有個自己 make 的系統!!全新的!!是金色的!!! 總共 約 /usr <-- 571M / <-- 53M 我做完 的時間大約是 (16:27) OK! 現在是 (18:10) 我大概是在今天早上 (01:00) 或 (0:10)十幾分開始的吧!! 我有 24-9+18=33 個小時沒睡覺了!! 安裝過程大約花了 15 個小時。時間不重要!! 重要的是我看見了一場很精彩的表演!! 真的這真的很精彩 這就很像我們在蓋大樓不是都會有在建築物上的高樓起重機嗎? 他會隨著樓層長高,三層三層爬高,到最後建築物蓋好了,高樓起重機 要能夠自身拆卸,並一部份一部份卸下來。這是有順序以及流程的。真是工藝上的結晶。 我收回我前幾封說的我會找時間用 debian 裝 starge1.tgbz2。 這部份交給其他網路上的英雄豪傑去試吧! 請原諒我... 謝謝 ..好累 因為以目前這樣的環境要到 X <--- 還好遠好遠好遠喔.... 我的機器又好慢好慢喔... --     ◢◣ □□□ ██ □□□□ □  ◢█□     造形.空間.秩序. □  ███◣      主從.對比.韻律 -- * Origin: 中山大學-美麗之島BBS * From: 211.20.240.115 [已通過認證] ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 轉錄者: gholk (140.116.1.136), 05/12/2018 15:32:41 ※ 編輯: gholk (140.116.1.136), 05/12/2018 15:34:11
debian99: 時間無價 我還是用debain就好了 這麼辛苦揪竟為了什麼 05/12 17:22
jimfan: 幾年前安裝過,很漫長而且疼苦的經驗 05/12 17:25
jimfan: 如果目的為了學習Linux倒是可以 05/12 17:26
OrzOGC: 比裝arch還硬,玩過一次就不想碰了 05/12 17:33
da21510: gentoo我用的很舒服耶 05/12 18:04
da21510: 重灌一次大概2小時搞定 05/12 18:04
ddtsatan: 推 05/12 18:10
POSIX: Gentoo 好用+1 05/12 19:03
Gold740716: posix 認證好用 05/12 19:15
Bellkna: 懶人如我還是繼續待在arch XD 05/12 19:16
a73126: 這個真的是很老的安裝流程了,竟然是從Stage1開始猛猛der 05/12 21:40
a73126: 現在難度減低一些,不過看到當年安裝iso只有16MB有點驚訝 05/12 21:40
chihungtzeng: Gentoo好用,現在安裝Gentoo也比當年容易得多 05/12 22:01
noonee: 好奇 這樣全部自己make的環境 速度會比較快嗎?快多少? 05/13 04:38
noonee: 遇到dependance 的機會如何? 05/13 04:38
noonee: 如果中途有軟體compile 不過怎麼辦? 05/13 04:39
a73126: 回樓上,Gentoo全系統套件基本上都是要Compile的,不會有 05/13 05:16
a73126: "中途"有軟體compile,dependency可以靠Gentoo的套件庫幫 05/13 05:16
a73126: 你,ebuild套件庫在維護相依性上很不錯,至於速度來說 05/13 05:17
a73126: 除非真的很細細調整,不然現在跟各大distribution差異其實 05/13 05:18
a73126: 拉不太開 05/13 05:18
noonee: 謝謝樓上回應 我所謂中途的意思是 一個一個compile到一半 05/13 08:59
noonee: 某一個就是compile 過不了 不是到半路才需要compile 05/13 08:59
noonee: 斷句是 中途(有軟體compile不過)怎麼辦? 05/13 09:00
noonee: 所以 如果compile不過怎麼辦? 05/13 09:01
noonee: 我自己自己功力不高 因為工作需要舊版的gcc 所以想在local 05/13 09:02
noonee: compile一個 結果跑到一半就爆錯掛了 也不知道怎麼辦 05/13 09:02
noonee: 所以無法想像一個從頭到尾compile的系統要如何自己一個處 05/13 09:03
noonee: 一個一個處理 05/13 09:03
noonee: 不過既然差異不大 我想我還是乖乖用debian 就好 05/13 09:04
POSIX: Gentoo official portage 放出來的 ebuild 基本上都測過 05/13 09:12
POSIX: package built from source 不僅僅只是為了 proformance 05/13 09:14
POSIX: 配上他的 portage system 讓你對 package 調教很方便 05/13 09:16
POSIX: dependency 也管理的很好,可以一直 rolling upgrade 05/13 09:18
POSIX: 說到底就是青菜蘿蔔吧,但我覺得Gentoo真很好用 >//////< 05/13 09:19
noonee: 抱歉這個我有點不懂 我自己就時常遇到 同一個軟體同版本 05/13 09:21
noonee: 在不同機器上就有時會compile不過 他是如何確保所有機器 05/13 09:22
noonee: 另外也是不太懂 compile的程式如何 rolling upgrade? 05/13 09:23
noonee: 啊 或許我先去google看看好了 05/13 09:23
POSIX: 我覺得你可以試著理解你的環境和你的程式是怎麼build起來 05/13 09:23
POSIX: 再來看 distribution 怎麼支援 05/13 09:24
noonee: 嗯嗯 謝謝! 05/13 09:24
Neisseria: 編譯參數配得好的話,會比一般編好的效能好一些 05/13 17:43
Neisseria: 如同樓上網友講的,太花時間了,很久沒碰這個了 05/13 17:43
tinlans: 現在編譯參數沒那麼難搞了,-O3 -march=native 就很強, 05/15 00:15
tinlans: 加上 -mtune=native 就差不多了。因為會充分利用 CPU 05/15 00:15
tinlans: 本身的指令集,跟為了相容於所有電腦而只用基本指令集 05/15 00:16
tinlans: 編譯出來的 binary 套件相比,速度當然有顯著差異。 05/15 00:16
tinlans: Gentoo 在升級的時候還是常會遇到不能自動解 dependency 05/15 00:18
tinlans: ,要善用 emerge --nodeps 去解,有時候是要求 use flags 05/15 00:19
tinlans: 的變更,這些認真看一下訊息都還簡單。大規模升級的時候 05/15 00:19
tinlans: 記得用 emerge --keep-going 先跳過編不過的之後再手動用 05/15 00:20
tinlans: ebuild 指令去慢慢一個一個處理。 05/15 00:20
tinlans: LDAP server 的升級一直很討厭,就是它會要求你把資料庫 05/15 00:21
tinlans: 路徑先清空,不然當場 error,不太懂這設計邏輯是什麼。 05/15 00:22
fourdollars: Gentoo 編 Kernel 的地方可以客製成該硬體專用 05/15 12:19
fourdollars: 少掉許多不需要的 kernel modules 大大加速開機流程 05/15 12:20
noonee: 謝謝樓上兩位的回應! 05/15 13:15
magelinus: 愛用Archlinux, 硬體太舊不允許就用Debian,最多只嘗 05/15 18:05
magelinus: 試到Crux。這個賤兔, 只能遠觀 ,實在沒那麼多美國時 05/15 18:05
magelinus: 間。 05/15 18:05
Bencrie: O3 不建議啦,有機會爆炸 XD 05/16 01:19
fourdollars: 我也不建議開 -O3 很容易有東西炸掉,要自己想辦法修 05/16 16:05
tinlans: O3 爆炸是幾年前的事情了 XD 05/16 17:24
tinlans: 現在這個年代是開 -flto 才會炸得跟當年 -O3 一樣 XD 05/16 17:26
tinlans: 我在 FreeBSD 和 Gentoo 開 -O3 編所有東西在 production 05/16 17:31
tinlans: environment 跑至少五年了,而且都有在更新啊 05/16 17:31
tinlans: 雖然 FreeBSD 那邊已經改用 Clang 了,和 GCC 不同回事 05/16 17:32
yumemi2001: 懷念 第一個開始用的linux就是gentoo 都要自己編kerne 05/18 16:39
Debian: 雖然拎北是Debian,但是如果你喜歡Gentoo又懶的編一波可以 05/20 14:19
Debian: 考慮試個Sabayon看看。 05/20 14:20
dyoll: 給了我力量! 簽名! 07/05 20:39