[SOLVED] Fresh install on a different USB drive

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

[SOLVED] Fresh install on a different USB drive

Postby ubermacin » Fri Jan 18, 2013 6:59 pm

Hello all, I'm a noob to Linux, but not afraid of command lines (old school dos guy). I bought a pogoplug on a whim and installed using these instructions: http://archlinuxarm.org/platforms/armv5 … 2-pinkgray but I would like to reinstall arch on a new faster thumb drive and start over. My question is how to go about this (I did google it too). I would like to avoid bricking the pogo. This is my thinking:

sda is the current slow, small, old thumbdrive, i plug in my new drive it would be sdb right?

My pass at the reinstall:
Start fdisk on the USB drive:
/sbin/fdisk /dev/sdb

At the fdisk prompt, delete old partitions and create a new one:
Type o. This will clear out any partitions on the drive.
Type p to list partitions. There should be no partitions left.
Now type n, then p for primary, 1 for the first partition on the drive, and then press ENTER, accepting default values.
Exit by typing w.

Now create the ext2 filesystem:
wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod 755 mke2fs
./mke2fs /dev/sdb1
mkdir usb
mount /dev/sdb1 usb

Download and install Arch Linux ARM:
cd usb
wget http://archlinuxarm.org/os/ArchLinuxARM … est.tar.gz
tar -xzvf ArchLinuxARM-armv5te-*.tar.gz # This will take a long time
rm ArchLinuxARM-armv5te-*.tar.gz
sync # Takes a while when using a flash drive

Clean up, reboot, remove old thumb drive. Cross your fingers and hope for the best.
cd ..
umount usb
/sbin/reboot

Once powered down (but before it comes back on), pull old thumb drive

The SSH key of your device will be different, so you need to tell Mac OS X or Linux to remove it from ~/.ssh/known_hosts before using SSH again:
ssh-keygen -R 192.168.1.123 # Use your device's IP

Log back in after your Pogoplug reboots using username root and password root.

*whew* so am I missing a step? Will the bootloader balk at the new drive?
Thanks in advance
Last edited by ubermacin on Sat Jan 19, 2013 2:16 am, edited 1 time in total.
ubermacin
 
Posts: 13
Joined: Fri Jan 18, 2013 6:56 pm

Re: Fresh install on a different USB drive

Postby moonman » Fri Jan 18, 2013 10:33 pm

You should be good.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Fresh install on a different USB drive

Postby ubermacin » Sat Jan 19, 2013 2:15 am

It worked! For future lurkers and fellow n00bs, I made a few small revisions to the directions above (like I forgot to include cd/tmp and then run shutdown rather than reboot). The basic concept is, we don't need to reinstall the bootloader (as my first post said, I've already went through the instructions once and it worked fine). I wanted to target a 2nd USB drive. Before you take on this set of instructions that worked for me, first visit the official instructions. They may change after this post. As of this writing, this http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray is the official install.

THIS IS ONLY FOR POGO-E02 AND POGO-E02G!

While connected via SSH to your plug, copy, paste, and run the following commands to download a bootloader that can boot from USB drives:
$this->bbcode_second_pass_code('', 'cd /tmp')

Plug in a 1GB or bigger 2nd USB drive. REMOVE ALL OTHER DRIVES. Move everything you need off of the target thumb drive and back it up. Everything on that USB drive with be deleted and replaced with Arch Linux ARM.

Start fdisk on the USB drive:
$this->bbcode_second_pass_code('', '/sbin/fdisk /dev/sdb')
At the fdisk prompt, delete old partitions and create a new one:
$this->bbcode_second_pass_code('', 'Type o. This will clear out any partitions on the drive.
Type p to list partitions. There should be no partitions left.
Now type n, then p for primary, 1 for the first partition on the drive, and then press ENTER twice, accepting default values.
Exit by typing w.')
Now create the ext2 filesystem:
$this->bbcode_second_pass_code('', 'wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod 755 mke2fs
./mke2fs /dev/sdb1
mkdir usb
mount /dev/sdb1 usb')
Download and install Arch Linux ARM:
$this->bbcode_second_pass_code('', 'cd usb
wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
tar -xzvf ArchLinuxARM-armv5te-*.tar.gz # This will take a long time
rm ArchLinuxARM-armv5te-*.tar.gz
sync # Takes a while when using a flash drive')
These steps will do some clean up and shutdown
$this->bbcode_second_pass_code('', 'cd ..
umount usb
/sbin/shutdown -h now')
Remove the old thumb drive. Pull the power plug from your pogo, plug it back in. Cross your fingers and hope for the best.
The SSH key of your device will be different, so you need to tell Mac OS X or Linux to remove it from ~/.ssh/known_hosts before using SSH again:
$this->bbcode_second_pass_code('', 'ssh-keygen -R 192.168.1.123 # Use your device's IP')
Log back in after your Pogoplug reboots using username root and password root.
ubermacin
 
Posts: 13
Joined: Fri Jan 18, 2013 6:56 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 18 guests