Tuesday, January 15, 2013

Seagate GoFlex Home running Arch Linux ARM from ext3 partition with ext3 NAS partition

After using the guide here to get the bootloader onto the GoFlex flash memory (it wipes the original boot sequence, so make sure you really want to do this—keep in mind it is great to do though!), I took the drive out of the casing and hooked it up directly to my linux machine (Linux Mint 14 Cinnamon) and wiped everything and made two partitions, one for linux and one for your data (this way you get almost all of the 3TB minus 4 GB for linux space). I did the following:
before I began, I downloaded the arch linux ARM files:  
wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
sudo -s
parted /dev/sdj  (or whatever the device address is)
mklabel gpt
mkpart primary 1 4GB
mkpart primary 4GB -1 (-1 means fill the rest)
mke2fs -j /dev/sdj1 (gives partition ext3 format)
mke2fs -j /dev/sdj2 (if large partition, takes awhile)
mount /dev/sdj1 /media/alarm (you have to run mkdir /media/alarm if you don't have that folder
cp ArchLinuxARM-armv5te-latest.tar.gz /media/alarm/
tar -xvzf ArchLinuxARM-armv5te-latest.tar.gz
rm ArchLinuxARM-armv5te-latest.tar.gz
gdisk /dev/sdj
(follow guide below except for the type 0700 and 8300, i ignored that and still worked, don't even know what that is)
once followed, run pacman -Syu (upgrade system, answered yes to everything)
Problem step was adding UUID="theuuidforsda2" /media/NASdata ext3 defaults 0 0 to the fstab
On the next boot, I got a green light but no IP address to SSH to.

I installed gdisk then ran it. both partitions where type 0700 but the usb was 8300 so i used option 't' to change both partitions type code to 8300.

Then used option r for recovery and h for hybrid.

I put both partitions in the sequence, at 'Place EFI GPT partition first question I answered no. I used hex code 83 for both partitions giving the first the bootable flag and then answered no to the protect more patitions question. Then m for main menu and w to write.

Removed the usb and did reboot and the light flashed then went solid. ssh into the drive ok.

Check ensure system running

do a reboot (warm start):

shutdown -r now

and then later shutdown:

shutdown -h now

then power up (cold start)

1 comment:

  1. Thanks man! I am actually having lots of fun with my GoFlex Home since I broke it. Seriously, I do not know if I will manage to do what I want to, but the money was worth just for the fan and the learnings ;-)

    Since I started from a bricked device, I just partially follow the steps to install Arch Linux. I started by installing the uBoot and recovery into NAND, and from there I installed archlinux in a USB pendrive, with a ext2 partition +swap. I could not mount the SATA from the recovery system.

    Once there, I booted into arch linux from the USB, everything worked great. I could mount the SATA, partition in using parted (root ext2 (10G), data ext2 + swap). I found the swap very useful, when later on I tried to run MySQL ;-).

    Then I copy archlinux distro files into the sata, and modify the uBoot environment to boot first from SATA and then from USB... I did not work :-(

    It still boots from USB, and mount the SATA, but uBoot finds some kind of problem to mount SATA at boot time. I believe I forgot to indicate gpt as partition type, and also to set the boot flag on for /dev/sda1 as you suggest here. I will try tonight. Still I do not understand why should I set the boot flag on, since it is not in my USB, and there it boots like a breeze.

    I will let you know later on.

    By the way, from the USB I managed to set the GoFlex so it could be used as a storage for Apple's Time Machine... proud ;-))