Upgrade FreeBSD from 9.2 to 10.0

剛剛在翻FreeBSD Man Pages的時候意外發現10.0開始的uname多了不同的參數

  • -K Write the FreeBSD version of the kernel.
  • -U Write the FreeBSD version of the user environment.

剛好手上有份程式需要取一些環境資訊,所以想來試試看加上這兩個參數實際的輸出結果,順便紀錄一下升級過程

確認目前系統已經升級到最新的狀態
# freebsd-update fetch install
開始進行升級動作
# freebsd-update upgrade -r 10.0-RELEASE
沒想到…

Looking up update.tw.FreeBSD.org mirrors… none found.
Fetching metadata signature for 9.2-RELEASE from update.tw.FreeBSD.org… done.
Fetching metadata index… done.
Inspecting system… done.

The following components of FreeBSD seem to be installed:
kernel/generic src/src world/base world/doc world/games world/lib32

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for 10.0-RELEASE from update.tw.FreeBSD.org… done.
Fetching metadata index… fetch: http://update.tw.FreeBSD.org/10.0-RELEASE/amd64/t/22ddc0a585da6d2e29a6745f3c8182f9e987049aa120a0d28bd0ae57aa3b5126: Not Found
failed.

試了兩三次還是一樣,本來以為台灣freebsd mirror沒有提供完整的鏡像,不過開瀏覽器連上http://update.tw.freebsd.org/10.0-RELEASE/amd64/t/看起來卻能連的到,不知道問題在哪~之前patch升級也都沒問題呀! 只好先把update server改回預設的設定(參考“設定FreeBSD update&ports&package使用local mirror server”),然後就可以了@@”

#freebsd-update upgrade -r 10.0-RELEASE
Looking up update.FreeBSD.org mirrors… 5 mirrors found.
Fetching metadata signature for 9.2-RELEASE from update2.freebsd.org… done.
Fetching metadata index… done.
Inspecting system… done.

The following components of FreeBSD seem to be installed:
kernel/generic src/src world/base world/doc world/games world/lib32

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for 10.0-RELEASE from update2.freebsd.org… done.
Fetching metadata index… done.
Fetching 1 metadata patches. done.
Applying metadata patches… done.
Fetching 1 metadata files… done.
Inspecting system… done.
Fetching files from 9.2-RELEASE for merging… done.
Preparing to download files… done.
Fetching 38462 patches…..10….20….30….40….50….60….70….80….90….100….110….120….130….140..
..150….160….170….180….190….200….210….220….230….240….250….260….270….280….290….

上面過程要等滿久的,可能一方面站台在國外的關係,總之等了很久,所以跑到一半就去吃飯了…

過程中可能會出現一些無法自動合併的更新,其實大部分都是comments的部分,很快就能處理好了

等這一段跑完就會出現提示訊息要跑一次freebsd-update install,這次跑完就可以做第一次重開機了

重開機後就重複最後兩個動作…再跑一次freebsd-update install,重開機…

開好之後檢查一下各service有正常起來,功能沒問題就可以先收工了~ (如果之前沒改用pkgng來館套件的話還要進行轉換就是了)

reference:
FreeBSD 10.0-RELEASE Installation Instructions

feedly.com被打爆了…

自從Google Reader關掉之後,各類RSS reader如雨後春筍般生出,其中一個有名的例子就是feedly,目前也算是我每天必定上來看看的網站之一。

今天傍晚一直到目前為止feedly都無法正常連上,取而代之的是Cloudflare的錯誤訊息頁面,稍早已經換成feedly自己的畫面了:feedly_down 連到部落格一看才發現多了這篇: http://blog.feedly.com/2014/06/11/denial-of-service-attack/

Denial of service attack

2:04am PST – Criminals are attacking feedly with a distributed denial of service attack (DDoS). The attacker is trying to extort us money to make it stop. We refused to give in and are working with our network providers to mitigate the attack as best as we can.

We are working in parallel with other victims of the same group and with law enforcement.

We want to apologize for the inconvenience. Please know that you data is safe and you will be able to re-access your feedly as soon as the attack is neutralized.

We will update this blog post as soon as we have more information:

Thank you for your understanding,

/Edwin and Seb


UPDATES:

6:25am PST – We’re making some changes to our infrastructure that will allow us to bring feedly back online. However, these things take some time to put into place and it may still be a few more hours before service is restored. Thank you so much for your patience and for sticking with us. Remember, none of your data was compromised or lost in this attack.

原來是被DDoS攻擊了… 差點以為feedly想吃錢烙跑,想說一掛就十個小時左右是怎樣? 不知道這次攻擊的目的是什麼,只能說希望feedly盡快恢復…

zip 壓縮演算法的選擇

最近這半年用到 zip 壓縮的次數變比較頻繁一點,為了節省空間、順便想比較一下使用不同演算法的壓縮率,所以寫一下這篇筆記…

一般常見的壓縮檔格式 (以 Windows 平台來說) 大致上就是 zip、7z、rar ,rar 算是在費時以及壓縮比來講最具經濟效益的一種格式,因為格式本身有專利、壓縮的功能本身是付費授權,且 Win ME 以後 Windows 系統已經內建了 zip 的壓縮、解壓縮功能(雖然是有夠陽春),不需要安裝額外的軟體,在 Windows 平台上公開交換檔案來說,zip 仍舊是一種非常常見的壓縮格式。

zip 畢竟是比較古老的格式(當然後面有出了改良後的版本 zipx、但一直沒有普及),最為人詬病的地方大概就是壓縮率非常的差勁(且不支援unicode檔名),自己手邊的檔案隨便抓一些壓縮後做比較,發現 zip 很容易就比 rar 或 7z 多占 50% 左右的空間 (當然還是要看裡面的檔案格式而定)。

一般壓縮軟體在壓縮檔案的時候大多只會提供使用者選擇壓縮檔的格式,但並不會提供壓縮演算法的選擇,而 7-zip 剛好有提供這樣的選項,於是就用 7-zip 來壓縮 zip 做個比較。

7-zip_zip_algorithm

閱讀全文

Linux Mint 17 “Qiana” Mate筆記及安裝紀錄(虛擬機)

Linux Mint 17 “Qiana” 按照原定計畫(無正式官方資料來源、參考資訊為 List of Linux Mint releases – Wikipedia) 在五月底(昨天)推出正式版了,初期只有 Cinnamon 以及 Mate 兩種桌面環境的版本,KDE 及 xfce 桌面環境的版本還得再多等一小段時間。奇妙的是這次官網上資訊截至目前為止都還沒有更新,只有 RC released 的消息,應該是太忙還沒更新吧。

科技網站 ZDNet 日前針對 Linux Mint 17 RC(release candidate) 候選發布版本發表了一篇 Mint 17: The best Linux desktop to date 來推薦這套作業系統,由於 Linux Mint 主要發行版都是基於Ubuntu的關係,這次的版本同樣和所基於的 Ubuntu 14.04 是所謂的 LTS(long-term support) 長期支援版本,擁有五年的後續支援,所以也是公司企業可以考量使用的版本。

剛好最近有些人問到推薦的 Linux distribution,個人在 Debian GNU/Linux系列遊走至目前為止的經驗,以 Desktop 來說,Linux Mint的使用者體驗真的不錯,這邊就記錄一下 Linux Mint 17 Mate的安裝過程,因為在虛擬機上記憶體比較小一點,這邊選的是32位元的 Mate 版本,如果記憶體有到4GB或是更大的容量則建議選擇64位元版本。

閱讀全文