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博客,转载请保留作者和出处,谢谢。

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