PogoPlug折騰全過程--Debian系統

折騰了幾個星期,PogoPlug終於可以正式進入長期測試階段了(散花)....

下面記錄一下折騰的過程,以備日後參考。

 以下均爲使用TTL線,本地登錄模式操作。沒TTL線問題也不大,先到pogoplug官方網站把ssh打開,然後登入設備。

 

原版系統安裝更新busybox,安裝optware

mkdir /opt
cd /opt
wget http://busybox.net/downloads/binaries/latest/busybox-armv6l
tar -xOvzf ipkg-opt_*_arm.ipk ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable" >/opt/etc/ipkg/armel-feed.conf
echo "src native http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable" >>/opt/etc/ipkg/armel-feed.conf
export PATH=/opt/bin/:PATH
cd /etc/bin
mv wget wget.bak
ln -s busybox-armv6l wget //只更新wget


安裝必要軟件

/opt/bin/ipkg update
/opt/bin/ipkg install wget-ssl
/opt/bin/ipkg install e2fsprogs
/opt/bin/ipkg install tar
/opt/bin/ipkg install perl

 

安裝Debian 6.0,直接寫入olderzeus大神提供的back.dd文件。

killall hbwd
sleep 3
mount -t vfat /dev/sdb1 /tmp/.cemnt/mnt_sdb1
cd /tmp/.cemnt/mnt_sdb1
dd if=./back.dd of=/dev/sda


CPU超頻至850Mhz

寫入國外大神WarheadsSE在http://archlinuxarm.org/forum/viewtopic.php?f=29&t=2146提供的stage1.wrapped850到硬盤

 
修改disk_create裏面的#disk=/dev/sdX,改成自己的硬盤。例如我這裏就是sda,把stage1/stage1.wrapped850複製到oxnas_sata_boot,並更名爲stage1.wrapped。

註釋掉disk_create裏面寫uboot和內核的語句,因爲我要超頻,只需寫入stage1。uboot和內核已經在寫入back.dd的時候寫入過了。

附修改過的disk_create

#!/bin/sh

# uncomment line below and set to the correct disk
#disk=/dev/sda

if [ -z "${disk}" ] ; then
   echo "You must uncomment/set the 'disk' variable"
   exit -1
fi

workarea="."

stage1File=$workarea/stage1.wrapped
ubootFile=$workarea/u-boot.wrapped
kernelFile=$workarea/uImage

perl <<EOF | dd of="$disk" bs=512
    print "\x00" x 0x1a4;
    print "\x00\x5f\x01\x00";
    print "\x00\xdf\x00\x00";
    print "\x00\x80\x00\x00";
    print "\x00" x (0x1b0 -0x1a4 -12 );
    print "\x22\x80\x00\x00";
    print "\x22\x00\x00\x00";
    print "\x00\x80\x00\x00";
EOF

if [ -f $stage1File ];then
	echo "Writing stage 1"
	dd if=$stage1File    of="$disk" bs=512 seek=34
fi

#if [ -f $ubootFile ];then
#	echo "Writing uboot"
#	dd if=$ubootFile     of="$disk" bs=512 seek=154
#fi
#
#if [ -f $kernelFile ];then
#	echo "Writing kernel to "
#	dd if=$kernelFile of="$disk"1 bs=512 
#fi


修改權限,執行腳本。

cd /tmp/.cemnt/mnt_sdb1
cp -R oxnas_sata_boot ../
cd ..
chmod -R 777 oxnas_sata_boot
cd oxnas_sata_boot
./disk_create


到這裏總算完成大部分了,接下來。把硬盤剩下的空間分區

fdisk /dev/sda
依次輸入
p(查看當前硬盤分區)
n(新建分區)
p(分區類型:主分區)
3(分區序號)
開始地址(回車默認)
結束地址(回車默認)
w(保存)


格式化爲ext3格式,inode大小設置手動爲128,1T硬盤格式化後纔有924G,按默認設置(inode大小256)會只有915G,指定rootfs保留空間0%。保證空間最大化使用。

mkfs.ext3 -m 0 -I 128 /dev/sda3


同步內核,關機,插上硬盤再開機就能進入 Debian了,默認用戶名密碼均爲root

sync
poweroff


Enjoy!!

原文首發CSDN博客,轉載請保留作者和出處,謝謝。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章