SyntaxHighlighter

2015年6月21日星期日

Arch Linux install procedure

2015-6-20
https://wiki.archlinux.org/

Pre-installation
fdisk
mkfs.ext4 -j /dev/sda1
mount /dev/sda1 /mnt
wifi-menu #connect to internet

Installation
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
# sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup
# rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist
pacstrap /mnt base

Configure the system
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt
echo computer_name > /etc/hostname
ln -sf /usr/share/zoneinfo/Asia/Chongqing /etc/localtime
vi /etc/locale.gen # uncomment en_US.UTF-8
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
mkinitcpio -p linux
pacman -S grub
grub-install --target=i386-pc --recheck --debug /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
passwd
pacman -S openssh
pacman -S wpa_actiond ifplugd wpa_supplicant dhcpcd dialog ppp #wifi-menu need
exit
umount -R /mnt
shutdown -r now

Configure after Arch install
systemctl enable sshd
wifi-menu -o #setup wifi after reboot
systemctl enable netctl
pacman -S net-tools #ifconfig netstat
systemctl enable systemd-timesyncd

Audio
pacman -S alsa-utils
useradd -m jejer
usermod -aG audio jejer
#alsamixer

X
pacman -S xorg-server # reinstall if you add user after xorg-server install
pacman -S ttf-droid # Chinese font
pacman -S tigervnc # for VNC server
vi ~/.vnc/xstartup
#!/bin/sh
export XKL_XMODMAP_DISABLE=1
exec startxfce4

xfce
pacman -S xfce4
startxfce4 #start X with xfce window manager manually

fcitx pinyin
pacman -S fcitx-im
pacman -S fcitx-configtool #configure for GTK
pacman -S fcitx-googlepinyin


PS:
setup proxy for some applications:
export ALL_PROXY="socks5://192.168.88.3:8080"

FIX Problem with pacman update - Signature is unknown trust
rm -R /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux


2015年6月5日星期五

Enable UTF-8 support for linkstation

Add LANG=en_US.UTF-8 in /root/.bashrc

-------------------
proftpd fix

1. create /root/ftpd.sh according to /etc/init.d/ftpd.sh
add function
force_utf8()
{
        if [ -f /etc/proftpd/proftpd.conf ]; then
                cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf.original
                sed -i -e 's/CP936/UTF-8/g' /etc/proftpd/proftpd.conf
        fi
        sync
        sleep 1
}

add force_utf8 call in start()

#! /bin/sh
#

KIND="FTPD"
FTPDOPTIONS=
RETVAL=0

if [ -f /etc/melco/info ]; then
        . /etc/melco/info
fi

configure()
{
        if [ -f /etc/linkstation_release ]; then
                ## configure files from Buffalo parameters.
                echo "configure ftpd"
                /usr/local/sbin/nas_configgen -c proftpd
                if [ $? -ne 0 ]; then
                        echo "$0 configure fail"
                        exit 1
                fi
        fi
        sync
        sleep 1
}

force_utf8()
{
        if [ -f /etc/proftpd/proftpd.conf ]; then
                cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf.original
                sed -i -e 's/CP936/UTF-8/g' /etc/proftpd/proftpd.conf
        fi
        sync
        sleep 1
}

start()
{
        if [ "$ftp" != "on" ] ; then
                echo "ftp is OFF"
                exit 0
        fi
        configure
        force_utf8
        echo -n $"Starting $KIND services: "
        /usr/local/sbin/proftpd $FTPDOPTIONS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ftpd || \
           RETVAL=1
        return $RETVAL
}

stop() {
        echo -n $"Shutting down $KIND services: "
        killall proftpd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ftpd
        echo ""
        return $RETVAL
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading proftpd.conf file: "
        killall -HUP proftpd
        RETVAL=$?
        echo
        return $RETVAL
}

#
# Usage statement.
#

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                restart
                ;;
        reload)
                reload
                ;;
        *)
                echo "usage: $0 {start|stop|restart|reload}"
                exit 1
                ;;
esac



2. create S99_fix_ftp.sh in /etc/rc.d/extensions.d
and chmod +x S99_fix_ftp.sh
root@ls-qvl:/etc/rc.d/extensions.d# cat S99_fix_ftp.sh
#! /bin/sh
#

/bin/cp /root/ftpd.sh /etc/init.d/ftpd.sh
/etc/init.d/ftpd.sh restart

2015年5月16日星期六

Custom Sleep for LS-QVL

1. Set linkstation to auto mode.
2. Add crontab to run this script every 2mins
*/2 * * * * /root/custom_sleep.sh

root@ls-qvl:~# cat custom_sleep.sh 
#!/bin/bash

################################################################################
#
# CUSTOM_SLEEP                                               by brumi 2010-07-16
#
################################################################################

# NOTE: please run this script every 2mins by crontab

# This cron-job is intended to be used as replacement for the provided standby-
# mechanism from buffalo. It checks for open connections and only when there are
# no open connections found for a certain period of time it will put the link-
# station into standby.



TIMEOUT=1800        # wait TIMEOUT seconds before going to standby

CONN_FILE=/var/run/connected        # file to store timestamp
LOG_FILE=/var/log/custom_sleep        # log-file
ENABLE_LOG='yes'                # enable logging [yes|no]


# ip addresses to exclude from the connection-check (i.e., local ones)
OWN_IPADDR=`/bin/ipaddr show eth0 | /bin/grep -o -e "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | /bin/sed s/"inet "//`
EXCLUDE_IPADDR=(${OWN_IPADDR} 0.0.0.0 127.0.0.1 239.255.255.250 192.168.88.255)
EXCLUDE_IPADDR_CT=5


# disable sleep in manual mode
auto_pwr_stat=`cat /proc/buffalo/gpio/switch/auto_power`
if [ "$auto_pwr_stat" != "on" ]; then
        if [ $ENABLE_LOG == 'yes' ]; then                           
                echo -n `date` >> $LOG_FILE
                echo ": custom_sleep: not in auto mode, exit" >> $LOG_FILE
        fi
        exit 0
fi


# do nothing if already sleeping
if [ -f /etc/linkstation_standby ]; then
        if [ $ENABLE_LOG == 'yes' ]; then
                echo -n `date` >> $LOG_FILE
                echo ": custom_sleep: already sleeping" >> $LOG_FILE
        fi
        exit 0
fi


# function to check if any clients are connected
connected () {
        CONN_IPADDR=`/bin/netstat -tna 2> /dev/null | /bin/sed s/"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"/"&\n"/ | /bin/grep -o -e "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"`
        for ip in $CONN_IPADDR
        do
                exclude=0
                for ((i=0;i<$EXCLUDE_IPADDR_CT;i++))
                do
                        if [ ${EXCLUDE_IPADDR[$i]} == $ip ]; then
                                exclude=1
                        fi
                done
                if [ $exclude -eq 0 ]; then
                        if [ $ENABLE_LOG == 'yes' ]; then
                                echo -n `date` >> $LOG_FILE
                                echo ": custom_sleep: active ip $ip" >> $LOG_FILE
                        fi
                        return 1
                fi
        done
        return 0
}

# check for connections and update $CONN_FILE
connected
if [ $? -eq 1 ]; then 
        if [ -f $CONN_FILE ]; then 
                rm $CONN_FILE
        fi
else
        if [ ! -f $CONN_FILE ]; then
                date +%s > $CONN_FILE        
        fi
fi        


# check when last connection was found
if [ -f $CONN_FILE ]; then 
        last_conn=`/bin/cat $CONN_FILE`
        comp_time=`/bin/date +%s`
        let "comp_time -= $TIMEOUT"
        if [ $last_conn  -gt $comp_time ]; then
                /usr/local/sbin/pwrmgr -c localhost act
                if [ $ENABLE_LOG == 'yes' ]; then
                        echo -n `date` >> $LOG_FILE
                        echo ": custom_sleep: wait-after-connection prevented standby" >> $LOG_FILE
                fi
                exit 0
        fi
else 
        /usr/local/sbin/pwrmgr -c localhost act
        if [ $ENABLE_LOG == 'yes' ]; then
                echo -n `date` >> $LOG_FILE
                echo ": custom_sleep: connections prevented standby" >> $LOG_FILE
        fi
        exit 0
fi

# no one busy -> clear timestamp and STANDBY
if [ $ENABLE_LOG == 'yes' ]; then
        echo -n `date` >> $LOG_FILE
        echo ": custom_sleep: going to standby" >> $LOG_FILE
fi
rm $CONN_FILE
/usr/local/sbin/pwrmgr -u

How to WOL:
1. Python2
#!/usr/bin/env python2
import socket
import time

bcast_addr = '192.168.88.255' # broadcast address for you network
target_mac = "4C:E6:76:E7:xx:xx" # colons are optional, case does not matter

mac = target_mac.replace(':', "")
mac_bytes = "".join([chr(int(mac[i:i+2], 16)) for i in range(0, len(mac), 2)])
WoL_packet = '\xff'*6 + mac_bytes * 16

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)

while 1:
    s.sendto(WoL_packet, (bcast_addr, 9))
    print "Sent paket!"
    time.sleep(180)
2. ArchLinux

  • pacman -S wol

3. dd-wrt router
  • Administration -- WOL -- Manual WOL, with port 9
4. Windows

2015年5月15日星期五

My LS-QVL Disk Info

+-------+-------+-------+-------+--------+----------------+
| disk1 | disk2 | disk3 | disk4 |  raid  |    purpose     |
+-------+-------+-------+-------+--------+----------------+
| sda1  | sdb1  | sdc1  | sdd1  | md0    | /boot          |
| sda2  | sdb2  | sdc2  | sdd2  | md1    | /              |
| sda3  | sdb3  | sdc3  | sdd3  | unused | unused         |
| sda4  | sdb4  | sdc4  | sdd4  | unused | unused         |
| sda5  | sdb5  | sdc5  | sdd5  | md10   | swap           |
| sda6  | sdb6  | sdc6  | sdd6  | mdx    | nas user space |
+-------+-------+-------+-------+--------+----------------+
http://ozh.github.io/ascii-tables/
root@ls-qvl:/etc# cat /proc/partitions
major minor  #blocks  name

  31        0        512 mtdblock0
   8       16  488386584 sdb
   8       17    1000448 sdb1
   8       18    5000192 sdb2
   8       19       1024 sdb3
   8       20       1024 sdb4
   8       21    1000448 sdb5
   8       22  473468928 sdb6
   8        0   31266648 sda
   8        1    1000448 sda1
   8        2    5000192 sda2
   8        3       1024 sda3
   8        4       1024 sda4
   8        5    1000448 sda5
   8        6   14485504 sda6
   8       48  244198584 sdd
   8       49    1000448 sdd1
   8       50    5000192 sdd2
   8       51       1024 sdd3
   8       52       1024 sdd4
   8       53    1000448 sdd5
   8       54  229328896 sdd6
   8       32  244198584 sdc
   8       33    1000448 sdc1
   8       34    5000192 sdc2
   8       35       1024 sdc3
   8       36       1024 sdc4
   8       37    1000448 sdc5
   8       38  229328896 sdc6
   9        0    1000384 md0
   9       10    1000436 md10
   9        1    4999156 md1
   9       22  473467768 md22
   9       21   14484408 md21
   9        2  229327736 md2
root@ls-qvl:/etc# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] 
md2 : active raid1 sdc6[0] sdd6[1]
      229327736 blocks super 1.2 [2/2] [UU]
--> raid nas user space
      
md21 : active raid1 sda6[0]
      14484408 blocks super 1.2 [2/1] [U_]
--> use raid1 but one drive as normal mode nas user space
      
md22 : active raid1 sdb6[0]
      473467768 blocks super 1.2 [2/1] [U_]
--> use raid1 but one drive as normal mode nas user space
      
md1 : active raid1 sda2[7] sdb2[6] sdc2[5] sdd2[4]
      4999156 blocks super 1.2 [4/4] [UUUU]
--> /
      
md10 : active raid1 sda5[7] sdb5[6] sdc5[5] sdd5[4]
      1000436 blocks super 1.2 [4/4] [UUUU]
--> swap
      
md0 : active raid1 sda1[0] sdb1[3] sdc1[2] sdd1[1]
      1000384 blocks [4/4] [UUUU]
--> /boot
      
unused devices: 
root@ls-qvl:/usr/local/bin# parted /dev/sda 
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: SSD32S  l @ P>$ = (scsi)
Disk /dev/sda: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  1026MB  1024MB  ext3         primary         --> /boot       [ext3]
 2      1026MB  6146MB  5120MB               primary         --> /           [ext3]
 3      6146MB  6147MB  1049kB               primary         --> unused
 4      6147MB  6148MB  1049kB               primary         --> unused
 5      6148MB  7172MB  1024MB               primary         --> swap        [swap]
 6      7172MB  22.0GB  14.8GB               primary         --> user_spaces [xfs]
root@ls-qvl:/usr/local/bin# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,barrier=0,data=writeback)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=4,mode=620)
/dev/ram1 on /mnt/ram type tmpfs (rw,relatime,size=15360k)
/dev/md0 on /boot type ext3 (rw,relatime,errors=continue,barrier=1,data=writeback)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/md2 on /mnt/array1 type xfs (rw,noatime,attr2,usrquota,grpquota)
/dev/md21 on /mnt/disk1 type xfs (rw,noatime,attr2,usrquota,grpquota)
/dev/md22 on /mnt/disk2 type xfs (rw,noatime,attr2,usrquota,grpquota)
root@ls-qvl:/usr/local/bin# ls -al /dev/root
lrwxrwxrwx    1 root     root            3 May 15 04:27 /dev/root -> md1
root@ls-qvl:/# blkid
/dev/sdb1: UUID="ae515ae8-a75a-5c1a-7611-9a37b19c2cdb" TYPE="mdraid" 
/dev/sdb5: TYPE="swap" 
/dev/sdc1: UUID="ae515ae8-a75a-5c1a-7611-9a37b19c2cdb" TYPE="mdraid" 
/dev/sdc5: TYPE="swap" 
/dev/sda1: UUID="ae515ae8-a75a-5c1a-7611-9a37b19c2cdb" TYPE="mdraid" 
/dev/sda5: TYPE="swap" 
/dev/md0: UUID="89f47586-b419-4ba5-af45-680c13d03442" TYPE="ext3" 
/dev/md10: TYPE="swap" 
/dev/md1: UUID="a068025a-a07d-4901-8a67-e702c0ae7427" TYPE="ext3" 
/dev/md21: UUID="dc3a01d0-38d0-4ac7-94c8-6cd19d4b3909" TYPE="xfs" 
/dev/md2: UUID="2b0d1f94-b8b1-40ab-bb4a-a0a638d70b3f" TYPE="xfs" 
/dev/sdd1: UUID="ae515ae8-a75a-5c1a-7611-9a37b19c2cdb" TYPE="mdraid" 
/dev/sdd5: TYPE="swap" 
/dev/md22: UUID="50bde03e-5983-4ddf-a97f-74b70c7aadd4" TYPE="xfs" 
root@ls-qvl:/# mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Fri Dec 31 23:49:39 1999
     Raid Level : raid1
     Array Size : 1000384 (977.10 MiB 1024.39 MB)
  Used Dev Size : 1000384 (977.10 MiB 1024.39 MB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu May 14 20:27:40 2015
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

           UUID : e85a51ae:1a5c5aa7:379a1176:db2c9cb1
         Events : 0.546

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       49        1      active sync   /dev/sdd1
       2       8       33        2      active sync   /dev/sdc1
       3       8       17        3      active sync   /dev/sdb1
root@ls-qvl:/# smartctl -A -i -d marvell /dev/sda
smartctl version 5.37 [arm-none-linux-gnueabi] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     SSD32S
Serial Number:    2013013000000016
Firmware Version: 120202
User Capacity:    32,017,047,552 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Fri May 15 16:48:10 2015 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   050    Pre-fail  Always       -       16777215
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0007   100   100   050    Pre-fail  Always       -       0
  5 Reallocated_Sector_Ct   0x0013   100   100   050    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       2160
 10 Spin_Retry_Count        0x0013   100   100   050    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0012   100   100   000    Old_age   Always       -       169
168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
175 Unknown_Attribute       0x0003   100   100   010    Pre-fail  Always       -       0
192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   040   100   000    Old_age   Always       -       40 (Lifetime Min/Max 30/60)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0013   100   100   050    Pre-fail  Always       -       0
170 Unknown_Attribute       0x0003   100   100   010    Pre-fail  Always       -       262144
173 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       38339072
root@ls-qvl:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/md1                  4.7G    861.0M      3.6G  19% /
udev                     10.0M    192.0k      9.8M   2% /dev
/dev/ram1                15.0M    140.0k     14.9M   1% /mnt/ram
/dev/md0                969.2M     29.4M    939.8M   3% /boot
/dev/md2                218.6G    128.7G     89.9G  59% /mnt/array1
/dev/md21                13.8G     33.1M     13.8G   0% /mnt/disk1
/dev/md22               451.3G    117.2G    334.1G  26% /mnt/disk2

2015年5月13日星期三

Flash/Upgrade Palm M500 M505 ROM in windows7

Palmm500_eng4_1_FlashNew.exe and Palmm505_eng4_1_FlashNew.exe doesn't work well in windows OS after XP, software can not detect debug mode handhold.

But the ROM imager in ROM Crafter from Brayder Technologies can be used for backup and flash/upgrade the OS.

4.1OS can be extracted from Palmm500_eng4_1_FlashNew.exe and Palmm505_eng4_1_FlashNew.exe.

Firstly install Palmm500_eng4_1_FlashNew.exe and Palmm505_eng4_1_FlashNew.exe.
Then decompress ROMIMAGE10000 from C:\Program Files (x86)\Handspring\Palmm500_ENG_FlashTool.exe\.rsrc\BINARY_DATA\

ROMIMAGE10000 is ROM file can be flashed by ROM imager.

Related files can be downloaded from internet or contact me.

FYI, if flash fail or report "handheld memory locked", use jackflash to release flash memory firstly.

2015年5月9日星期六

Fix/Debug Pogoplug v4 arch linux boot failure

Recently, after upgrade archlinux on Pogo, system failed to boot up.
Even fresh install can't fix this problem.

required:
netconsole uboot installed on pogoplug v4.


Debug:
1.  setup netconsole and monitor uboot :
xterm1: nc -l -u -p 6666
xterm2: nc -u 192.168.1.10 6666

looks like kernel booted successfully.

2. printenv in uboot
Pogov4>  printenv
arcNumber=3960
baudrate=115200
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=00:25:31:05:08:2e
if_netconsole=ping $serverip
ipaddr=192.168.1.10
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=F78
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
ncip=192.168.1.100
partition=nand0,2
preboot=run if_netconsole start_netconsole
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=192.168.1.100
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
usb_rootfstype=ext3

Environment size: 2468/131068 bytes
Pogov4>

3. Enable netconsole for linux kernel
Pogov4> setenv set_bootargs_mmc 'setenv bootargs root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts [email protected]/,[email protected]/'
Pogov4> saveenv

4. continue monitor linux kernel netconsole output
OUTPUT INDICATE NEW KERNEL NEED EXT4 ROOTFS!

5. fix pogo by format SD card with mkfs.ext4 -j /dev/sdb1, then fresh tar -xvzf Archlinux -C /mnt/alarm

6. retry and monitor kernel netconsole output
STILL REPORT NEED EXT4 ROOTFS

7. set uboot parameter:
Pogov4>setenv rootfstype ext4
Pogov4> saveenv

8. retry reboot
BOOT SUCCESS!

7. close kernel netconsole and change bootargs back to normal.
Pogov4> setenv set_bootargs_mmc 'setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts'
Pogov4> saveenv

NOW MY UBOOT ENV:
arcNumber=3960
baudrate=115200
bootcmd=run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_pogo=if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
ethaddr=00:25:31:05:08:2e
if_netconsole=ping $serverip
ipaddr=192.168.1.10
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=F78
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
ncip=192.168.1.100
partition=nand0,2
preboot=run if_netconsole start_netconsole
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
serverip=192.168.1.100
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
usb_rootfstype=ext3

AND using ext4 -j for linux root.