Tag Archives: Gentoo

Gentoo ARM64 Docker Image

There is a long time no article about gentoo on my blog.

Today, I have a whim to do a gentoo ARM64 docker image, so, we have this article.

Please understand that ARM64 Gentoo is experimental, and might be different after a while.

Read more »

[Gentoo] Moved to eudev from udev

好久沒有寫 Gentoo 的文章了,畢竟除了一般性升級也懶得再動什麼,不過最近一次升級系統又爛了

所有的 network interface 變成 eth0/eth1 ….. ,不再是 predictable network interface names (可預測的網路介面名稱像是 ensp1 這樣的)

Read more »

[Gentoo] 裝 Brother HL-2240D Driver + Samba 分享

Linux 支援 Brother HD-2240D driver 可以用 Samba + CUPS 提供服務.

Read more »

udev 之後仍然想用原先的 network device rename 的方式修改 interface

Predictable Network Interface 這件事情出現之前, 很長一段時間, udev 起來之後, script 會自動產生 70-persistent-net.rules , 然後所有的 ethernet device 就會在裡面, 如果要改個順序ex: eth0->eth1 or eth1->net1, 就在裡面改就好了.

不過總之他們就是改了, 說什麼安全的問題啦, firewall 設定啦.

只是改了之後, 大家討論了很久, 也 try 了很久.
我也是這次因為一定要能動, 所以認真的研究了一下, 目前最安定的設定, 可以正確更改名稱的設定.
1. 在 kernel command line 加上 net.ifnames=0, 這樣就會變原來的 eth0… blah blah , 可是原先的更改名稱方式還是不能用.

Gentoo 使用者可以改 Kernel Config, 關掉這個選掉

Gentoo Linux  —>
[ ]   Linux dynamic and persistent device naming (userspace devfs) support

2. 請參照 Gentoo 文件 2.d. Network Interface Naming

# udevadm test-builtin net_id /sys/class/net/eth0 2>/dev/null
ID_NET_NAME_MAC=enxc80aa9429d76
ID_OUI_FROM_DATABASE=Quanta Computer Inc.

# vim /etc/udev/rules.d/70-net-name-use-custom.rules
# First one uses MAC information, and 70- number to be before other net rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="c8:0a:a9:42:9d:76", NAME="lan0"

# vim /etc/udev/rules.d/76-net-name-use-custom.rules
# Second one uses ID_NET_NAME_PATH information, and 76- number to be between
# 75-net-*.rules and 80-net-*.rules
SUBSYSTEM=="net", ACTION=="add", ENV{ID_NET_NAME_PATH}=="enp3s0", NAME="wifi0"

這樣就可以成功了.

[Gentoo] 電腦升級案 32bit -> 64bit Linux

最近發現有一台電腦己經有點舊了, 首先是電源供應器的風扇掛了, 這個電源供應該應該有十年了, 印像中還沒有支援新的 ATX 接頭, 當年好像是用很便宜的價格從瘋狂賣客買的.
將電源風扇換成磁浮風扇之後, 似乎有好一點, 不過問題是, 很難開機, 還好這一台是一開就不關的 Server.
但是最近工作型態改變, 而且我買了一個瓦特計(像這樣), 沒事就在量電腦的電量. 發現常常使用的測試用電腦瓦特數非常高, Intel Q6600 + ATI 4850 要耗用 200W 左右.

所以最近就在找下一代的解決方案. 目標高效低功耗PC.
Read more »

Gentoo 從 MySQL 5.1 升級 MariaDB 5.5.x

在 Oracle 吃掉 SUN 取得 MySQL 之後, 大家一直以為 Oracle 會砍掉 MySQL, 不過直到現在還是沒有動手, 但是仍然有點小動作讓人擔心, 像是移除 test case[1].

不過對於使用 MySQL 己久, 並且很熟悉 MySQL 生態的我們, 其實換 MySQL 並不是這麼迫切的事情, 畢竟還沒有到末日嘛.
不過該來的還是會來, 之前 Gentoo portage 出現 MySQL 5.5 升級的選項, 我一升級上去, MySQL 5.5 就動不了, 原因不明, 我也懶得查, 所以我暫時設 mask 暫時用舊版.
該來的還是會來, 最近的 Portage 似乎就有強迫要使用 5.5 的傾向了, Getoo MySQL 5.5 有提供 MySQL 和 MariaDB 的選項.

目前來看, 比起 MySQL, MariaDB 是比較好的選擇[2]. 至少應該不用怕 Oracle 砍掉這個 Product, 畢竟 Oracle 的主力是 Oracle 的 DB. 不是 MySQL.

查了一下, Gentoo 論壇[3]內似乎沒有關於升級到 MariaDB 的災情出現, 所以我也就有點放心的準備升級了. (常用 Gentoo 的就知道, 有時沒有這麼順利的事情呀)

不過隨手升了一下, 還真的很簡單, 以下是步驟
(1) Stop MySQL
$ /etc/init.d/mysql stop
(2) 移除 /etc/portage/package.mask 有關 virtual/mysql-5.5 那一行
(3) 安裝 MariaDB
$ emerge -aV MariaDB
(4) 升級 configure file.
$ etc-update
(5) 升級 MySQL DB
$ mysql_upgrade –password=
(6) 更新系統的 MySQL Library , 這是最難的, 不過會用 Gentoo 的就要自己解了
$ revdep-rebuild

目前看起來還算正常, 希望不要出什麼大問題才好.

[1] Oracle Makes More Moves To Kill Open Source MySQL
[2] MariaDB versus MySQL – Features
[3] MySQL –> MariaDB howto?

Gentoo 連 Hinet 的 Tunnel Broker

剛剛看到中研院的公告
【障礙說明】總辦事處區域網路故障說明
查了一下, 發現 ASCC 的 IPv6 Tunnel Broker 不能用了, 所以只好暫時跳到 Hinet 的 Tunnel Broker 去.

我是 Hinet 浮動 IP 的用戶, 所以只能使用 Hinet IPv6 Tunnel Broker.
請參考本站文章 Gentoo Gateway 連中研院的 IPv6 Tunnel Broker 安裝 go6 的 Gateway Software.

在 gw6c.conf 有四處要修改
[TEXT]
userid=
passwd=

server=203.74.21.88
auth_method=passdss-3des-1
[/TEXT]

這樣就可以從中研院跳到 Hinet 了.

Reference:
HiNet IPv6 Tunnel Broker服務使用說明

[Gentoo] Gentoo Source Kernel 升級的問題

記錄一下..
Read more »

Gentoo 常用指令

好像沒有整理一篇常用的指令, 開一篇新的

Read more »

Upgrading udev from 171 (or older) to 197

上次升到 udev + kernel 3.7.1, device 那邊怪怪的, 記錄一下, 以後碰到了可以查

Read more »