Iomega ix2-dl 啓用 apt-get 支持

Iomega storcenter ix2/ix2-dl NAS 系統基於 debian,理論上支持 apt-get 包管理系統,不過仍需一番設置:

啓用SSH

參考iomega ix2 啓用 SSH & 安裝 Optware

創建必須的文件和目錄


mkdir /mnt/system/rootfs;
mkdir /mnt/system/rootfs/var;
mkdir /mnt/system/rootfs/var/lib/;
mkdir /mnt/system/rootfs/var/cache;
mkdir /mnt/system/rootfs/var/lib/apt;
mkdir /mnt/system/rootfs/var/cache/apt;
mkdir /mnt/system/rootfs/var/lib/apt/lists;
mkdir /mnt/system/rootfs/var/lib/apt/lists/partial;
mkdir /mnt/system/rootfs/var/cache/apt/archives;
mkdir /mnt/system/rootfs/var/cache/apt/archives/partial;
mkdir /mnt/system/rootfs/var/lib/aptitude

鏈接到合適的路徑:
ln -s /mnt/system/rootfs/var/lib/apt/ /var/lib/apt
ln -s /mnt/system/rootfs/var/lib/aptitude/ /var/lib/aptitude
ln -s /mnt/system/rootfs/var/cache/apt/ /var/cache/apt

爲什麼不直接創建文件到合適的路徑而要用軟鏈接呢?因爲/var目錄下的文件重啓後會丟失。
當然,這樣每次重啓後還是要建立軟鏈接,需要將相關命令寫入/etc/rc.local,此乃後話。

測試 apt-get

接下來運行apt-get update,順利連接到源並更新,但最後會報錯:
E: Could not open lock file /var/lib/dpkg/lock - open (2 No such file or directory)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

根據提示建立相應目錄和文件:
mkdir /mnt/system/rootfs/var/lib/dpkg
touch /mnt/system/rootfs/var/lib/dpkg/lock
ln -s /mnt/system/rootfs/var/lib/dpkg/ /var/lib/dpkg

再次運行apt-get update,這回又報錯:
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)
E: The package lists or status file could not be parsed or opened.

依然是缺文件,建立之:
touch /mnt/system/rootfs/var/lib/dpkg/status
最後再運行apt-get update,順利更新源,無報錯。
嘗試apt-get install transmission,提示一堆依賴。。。

使用 apt-get

apt-get安裝的包會放在/usr下,而/usr是/mnt/apps/usr的軟鏈接,
但Iomega ix2-dl的/mnt/apps一共只有600多M,只剩餘100M,顯然不夠。
所以要把/mnt/apps搞到別的地方,這也是後話,容我日後再說。

補充說明

本教程只是讓apt-get能運行,不保證後面不出問題,我自己還沒用它裝過東西。
畢竟 Iomega 系統只是精簡版 debian,一般的軟件可能還是通過 Optware 安裝靠譜,比如transmission。

“Iomega ix2-dl 啓用 apt-get 支持”的2个回复

  1. hello there and thank you for your info – I have certainly picked up anything new from right here. I did however expertise some technical issues using this website, as I experienced to reload the web site lots of times previous to I could get it to load properly. I had been wondering if your web host is OK? Not that I’m complaining, but sluggish loading instances times will very frequently affect your placement in google and can damage your quality score if advertising and marketing with Adwords. Anyway I am adding this RSS to my email and could look out for much more of your respective interesting content. Ensure that you update this again soon..

  2. hey there and thank you for your information – I have definitely picked up something new from right here. I did however expertise several technical issues using this website, as I experienced to reload the web site a lot of times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your high quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and could look out for a lot more of your respective exciting content. Make sure you update this again soon..

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.