[출처 : http://blog.naver.com/sjy1229/70145285423]
1. archlinux 를 사용하다, 초기화를 시키고 싶으시다면?
[root@alarm ~]# mkdir -p /usr/local/cloudengines/bin
[root@alarm ~]# mkdir /tmp/ce[root@alarm ~]# mount -t ubifs -o ro ubi0:rootfs /tmp/ce[root@alarm ~]# cp /tmp/ce/usr/local/cloudengines/bin/blparam /usr/local/cloudengines/bin/
[root@alarm ~]# cp /tmp/ce/usr/local/cloudengines/bin/xce.ko /usr/local/cloudengines/bin/
[root@alarm ~]# cp /tmp/ce/usr/sbin/nandwrite /usr/local/cloudengines/bin/
[root@alarm ~]# cp /tmp/ce/usr/sbin/flash_erase /usr/local/cloudengines/bin/[root@alarm ~]# umount /tmp/ce
Resolving archlinuxarm.org (archlinuxarm.org)... 50.116.36.110
Connecting to archlinuxarm.org (archlinuxarm.org)|50.116.36.110|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Resolving us.mirror.archlinuxarm.org (us.mirror.archlinuxarm.org)... 206.217.130.189
Connecting to us.mirror.archlinuxarm.org (us.mirror.archlinuxarm.org)|206.217.130.189|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3539 (3.5K) [application/octet-stream]
Saving to: `oxnas-revert.sh'
100%[===================================================================================================================================================================================================>] 3,539 --.-K/s in 0s
2012-08-11 15:36:25 (34.7 MB/s) - `oxnas-revert.sh' saved [3539/3539]
[root@alarm ~]# chmod 775 ./oxnas-revert.sh
[root@alarm ~]# ./oxnas-revert.sh
#############################
##
## Pogoplug Pro/V3/Video
## PlugApps to Stock Revert
##
#############################
##
## For use with OXNAS 7820 only.
##
#############################
## PREPARATION
# Switching to /tmp...
# Ensuring we're ready to proceed...
# Preparing our way...
# Getting uboot parameters...
# Checking board revision...
# = board :
# = load_nand : nboot 60500000 0 200000
# = bootargs_stock :
# = bootcmd : run boot_custom
# Setting up uboot parameters
#
# Checking uboot parameters...
# = bootargs : root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
# = bootargs_stock :
# = load_custom_nand :
# = boot_custom :
# = bootcmd :
#
#############################
## Looks good!
[root@alarm ~]# /sbin/reboot
이제 achlinux를 설치하기 전의 깔끔한 상태입니다.
2. 설치중 오류가 발생했다거나 설정을 잘못하여 벽돌이 되었다면?
Oracle VM VirtualBox같은 프로그램을 사용해서 우분투같은 리눅스 운영체제에 접속합니다.usb메모리를 꽃은 후에 root로 터미널 프로그램에 접속하여 아래 명령어를 입력합니다.
~ # df -h 를 사용하여 usb메모리의 주소를 확인
~ # umount /dev/sd*
~ # /sbin/fdisk /dev/sd* ext3로의 포맷 과정입니다.
Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
Command (m for help): p
Disk /dev/sda: 2021 MB, 2021654528 bytes
63 heads, 62 sectors/track, 1010 cylinders
Units = cylinders of 3906 * 512 = 1999872 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1010, default 1): Using default value 엔터 치시면 됩니다.
Last cylinder or +size or +sizeM or +sizeK (1-1010, default 1010): Using default value 마찬가지로 엔터를 치시면 됩니다.
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table
~ # sync
~ # cd /tmp
Connecting to archlinuxarm.org (206.217.130.189:80)
/tmp # chmod 755 mke2fs
/tmp # ./mke2fs -j /dev/sda1
mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
123392 inodes, 493124 blocks
24656 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=507510784
16 block groups
32768 blocks per group, 32768 fragments per group
7712 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
포맷이 완료되었습니다.
이제 usb메모리의 경로로 이동합니다. 경로는 직접 확인해주세요.
cd /media/xxxxxxxx
tar -xvzf /ArchLinuxARM-oxnas-latest.tar.gz
압축 해제에 상당한 시간이 소요됩니다.
끝이나면 usb를 빼서 포고플러그에 꽃습니다.
아마 포고플러그의 ip주소가 변경되어 있을 겁니다. 확인 후에 putty로 접속합니다.
아디이와 비밀번호는 모두 root 입니다.
정상적으로 부팅이 된다면 위의 1과 같은 과정을 거쳐 초기화를 시킵니다.