Search

'포고플러그 초기화'에 해당되는 글 1건

  1. 2013.10.11 [PogoPlug] E02 복구기 2부 - 아치리눅스 재설치

이전글 : [PogoPlug] E02 복구기 1부 - 벽돌이 된 포고를 살리다.


에서 일단 접속이 되었지만 시리얼 콘솔을 통해서 보니 부팅중 뭔가 모를 nand 메모리 에러가 올라왔다. 검색결과 다시한번 초기화를 위해 아치리눅스를 설치하기로 했다. 



1. Uboot 설치

아치리눅스를 설치할 USB 메모리를 꽂고 아치설치때와 마찬가지로 최초에 Uboot을 설치하여 아치리눅스가 작동할 수 있는 환경을 만든다. 


$ wget http://projects.doozan.com/uboot/install_uboot_mtd0.sh   #파일 다운로드

$ chmod a+x install_uboot_mtd0.sh        # 실행권한 부여 

$./install_uboot_mtd0.sh     #스크립트 실행

!!!!!!  DANGER DANGER DANGER DANGER DANGER DANGER  !!!!!!

If you lose power to your device while running this script,
it could be left in an unusable state.

This script will replace the bootloader on /dev/mtd0.

This installer will only work on the following devices:
 Seagate Dockstar
 Seagate GoFlex Net
 Seagate GoFlex Home
 Pogoplug v1
 Pogoplug Pink (v2)
Do not run this installer on any other device.

By typing ok, you agree to assume all liabilities and risks 
associated with running this installer.

If you agree, type 'ok' and press ENTER to continue: ok
# checking for /usr/sbin/nandwrite...
# checking for /usr/sbin/nanddump...
# checking for /usr/sbin/flash_erase...
# checking for /usr/sbin/fw_printenv...
# checking for /etc/fw_env.config...

# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (50.116.34.13:80)
valid-uboot.md5      100% |*******************************|  1133  --:--:-- ETA
## Valid uBoot detected: [pinkpogo davygravy-2012-02-20-current]
## The newest uBoot is already installed on mtd0.


You are already running the latest uBoot.
# 본인에게만 해당되는 특별한 경우로, 아래 [N/y]로 이미 설치되어 있는 uBoot을 건드리지 않았다.

Your current uBoot environment should be reasonable.  However, if you're having
any probems booting, you can reset the environment variables to know good values.
Would you like to reset the uBoot environment? [N/y] 

# uBoot installation has completed successfully.


2. fdisk

USB메모리에 아치리눅스를 설치할 수 있도록 파일시스템생성(포멧)

Pogoplug:/tmp$ fdisk /dev/sda


The number of cylinders for this disk is set to 1603.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)


Command (m for help): p               # p옵션 : 현재 디스크 분할 상태를 본다


Disk /dev/sda: 8004 MB, 8004304896 bytes

212 heads, 46 sectors/track, 1603 cylinders

Units = cylinders of 9752 * 512 = 4993024 bytes


   Device Boot      Start         End      Blocks  Id System

/dev/sda1               1        1604     7815680   b Win95 FAT32    #현재 윈도우용 Fat32로 구성되어 있음.


Command (m for help): t               # 파일시스템 타입을 변경한다.

Selected partition 1                         # 변경할 파티션 선택 (1번)

Hex code (type L to list codes): 83   # 리눅스 기본 파일시스템으로 변경

Changed system type of partition 1 to 83 (Linux)


Command (m for help): p               # p옵션 : 현재 디스크 분할 상태를 본다


Disk /dev/sda: 8004 MB, 8004304896 bytes

212 heads, 46 sectors/track, 1603 cylinders

Units = cylinders of 9752 * 512 = 4993024 bytes


   Device Boot      Start         End      Blocks  Id System

/dev/sda1               1        1604     7815680  83 Linux       # 리눅스 파일시스템으로 변경되었음


Command (m for help): w             # 변경사항을 저장

The partition table has been altered!


Calling ioctl() to re-read partition table


3. 파일시스템 생성

Pogoplug:/tmp$ wget http://archlinuxarm.org/os/pogoplug/mke2fs  # 포멧툴 다운로드

Connecting to archlinuxarm.org (50.116.36.110:80)

mke2fs               100% |*******************************|   799k 00:00:00 ETA

Pogoplug:/tmp$ chmod a+x mke2fs                             #실행권한 부여

Pogoplug:/tmp$ ./mke2fs /dev/sda1                            #USB 포멧

mke2fs 1.41.9 (22-Aug-2009)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

488640 inodes, 1953920 blocks

97696 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=2004877312

60 block groups

32768 blocks per group, 32768 fragments per group

8144 inodes per group

Superblock backups stored on blocks: 

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632


Writing inode tables: done  

Writing superblocks and filesystem accounting information: done


This filesystem will be automatically checked every 36 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

Pogoplug:/tmp$ 


4. 파일복사

Pogoplug:/tmp$ mkdir usb                                              #usb 마운트를 위한 디렉토리 생성

Pogoplug:/tmp$ mount /dev/sda1 /tmp/usb/            #usb 메모리 마운트

Pogoplug:/tmp$ cd usb

Pogoplug:/tmp/usb$ wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz  #아치리눅스 다운로드


Connecting to archlinuxarm.org (50.116.36.110:80)

ArchLinuxARM-armv5te 100% |*******************************|   155M 00:00:00 ETA


Pogoplug:/tmp/usb$ tar xzvf ArchLinuxARM-armv5te-latest.tar.gz  #압축해제


5. 리부팅

압축 해제 후  리부팅하면 특별한 이상이 없다면 정상적으로 아치 리눅스 부팅이 된다. 


아치리눅스의 기본 root 비밀번호는 root 이다. 



참조 사이트 : 


USB-TTL케이블을 사용한 PogoPlug E02 벽돌 복구기

Restore working Pogoplug to factory settings
Archilinux 설치하기



3부 및 그 이후에서는..


새로운 개인 클라우드 시스템 소개 예정.