Buffalo Linkstation HD 安裝Freelink筆記
改好這台NAS大概也有將近一年的時間
跑起來很穩,相當稱職
只是改機的過程麻煩了點,尤其對Linux苦手的我來說
網路上可以找到不少相關的改機文章,方法也好幾種
我一開始是用重開機即可進入原廠韌體的版本
但是不知為何就是不穩,有一次掛掉後很不爽
心一橫,決定試試Freelink這個改法
因為這一改下去,除非用原廠硬碟做鏡像拷貝,否則就是原廠韌體bye-bye了
心臟要大顆點才行
為了防範未然,我先讓機器回復原廠設定,然後拆下硬碟
用Acronis True Images將硬碟內容copy到新的500G硬碟中
接下來就是重頭戲了
以下是我的裝機過程,基本上是寫給自己看的
免得將來機器遭遇不測得重來時(希望不會有這一天)可以參考
1.用Acronis True Images將備用硬碟(2.05含Telnet)複製到新硬碟,開機IP:192.168.0.6
2.關閉防火牆,執行HD-HLAN FWUpdate.exe安裝freelink_mipsel-hdhlan-060810,密碼1021,做完會報錯,不用管
3.將本機IP改為192.168.11.x SSH連上LS,ip:192.168.11.150 , login: root , password: freelink
4.passwd ← 更改密碼
5.nano /etc/network/interfaces >> address 192.168.0.6 >> Reboot >>PC改回原IP
6.cat /etc/resolv.conf ← 檢視 DNS 設定
7.echo “nameserver 168.95.192.1” > /etc/resolv.conf ← 增加 DNS 伺服器
8.echo “gateway 192.168.0.1″ >> /etc/network/interfaces ← 設定閘道為 192.168.0.1
9.reboot
10.ping www.google.com.tw -c4 ← 測試是否可以連上網路
11.apt-get update ← 更新系統套件資訊
12.apt-get upgrade ← 升級系統套件(完成後debian4.0)
13.apt-get install ntpdate ← 校時伺服器
# ntpdate stdtime.gov.hk
# hwclock -w ← 把系統時間寫入硬體時鐘
# crontab -e
加入這行:
0 1 * * * ntpdate stdtime.gov.hk;hwclock -w
這是設定每日凌晨一點自動校對時鐘,但不知為何機器一直沒執行這條
————————————————–
14.apt-get install ssh ← 增加 SSH 伺服器
15.apt-get install htop ← 安裝進程查看器
16.adduser jeremy ← 新增使用者帳號
———————————————-
17.安裝語系套件:
apt-get install locales
裡面記得至少要選擇 en_US.UTF-8 UTF-8、zh_TW BIG5 和 zh_TW.UTF-8 UTF-8(用空白鍵選擇、Tab 鍵切換到 OK、Default Locale 選 zh_TW)。安裝完畢,可以 cat /etc/locale.gen 這個檔案內容對不對(如果要新增刪除其他語系,請用 dpkg-reconfigure locales)。接下來設定使用者使用的 Locale,輸入 nano ~/.bashrc,增加下面這兩行:
export LC_ALL=zh_TW.UTF-8
export LANG=zh_TW.UTF-8
locale ← 檢視語系設定
———————————————–
18.時區設定:
tzconfig選Asia,Taipei
———————————————–
19.安裝vsftpd
apt-get install vsftpd
nano /etc/vsftpd.conf ← 改設定檔
anonymous_enable=NO
ftp_banner=Welcome to Jeremy’s FTP service
———————————————–
20.安裝Samba
apt-get install samba
nano /etc/samba/smb.conf
[global]
dos charset = CP950
display charset = UTF-8
unix charset = UTF-8
workgroup = HOME
server string = Linkstation
socket options = IPTOS_THROUGHPUT TCP_NODELAY SO_RCVBUF=8192
large readwrite = yes
getwd cache = yes
##### Authentication #####
security = SHARE
[share]
comment = share folder
hide files = /Cam/
path = /mnt/hda/share
guest ok = yes
writable = yes
browsable = yes
force create mode = 664
force directory mode = 775
/etc/init.d/samba restart ← 重開Samba
chmod 777 /mnt/hda/share ← 設定目錄權限
21.移動/home及/usr
DIR=”$(mount | grep hda3 | awk ‘{print $3}’)”
cp -Rdp /home ${DIR}
rm -R /home
ln -s ${DIR}/home /home
cp -Rdp /usr ${DIR}
rm -R /usr
ln -s ${DIR}/usr /usr
———————————————–
常用指令
df -h ← 檢查硬碟掛載資訊
htop ← 檢視系統狀態
nano /etc/samba/smb.conf ← 改Samba設定檔
/etc/init.d/samba restart ← 重開Samba
nano /etc/vsftpd.conf ← 改vsftpd設定檔
/etc/init.d/vsftpd restart ← 重開vsftpd
testparm ← 檢查Samba設定值
cd /var/log >> more messages ← 檢視系統log檔
cd /var/log/more >> more log.smbd ← 檢視Samba log檔
date ← 查詢系統時間
rm -r /mnt/hda/share/xxx ← 刪除目錄
以上改機方法多半參考自:這裡的討論文章
這台機器就負責家中的媒體存放中心跟對外的FTP server
500G應該夠用很久了
至於養動物抓檔案…還是別太操他吧
近期留言