Help! Screwed up trying to install Archlinux on Seagate GoFlex Net

Help! Screwed up trying to install Archlinux on Segate GoFlex Net

#varkey #dinjo #dheerajjotwani

I followed this guide http://archlinuxarm....gate-goflex-net, the things that I did differently are highlighted, currently the device is happily blinking away(green)

Unplug all disk drives.

Take a note of the MAC address (usually it is on a label on the underside of the device, in the form uu:vv:ww:xx:yy:zz).

With only the drive you intend to install Arch Linux ARM to plugged in (all data will be erased), switch on the power.

If using a SATA hard drive, put the hard drive in right slot (if you're looking from the front.)

Log in to Seagate GoFlex Net over SSH.

Stop the Pogoplug software so it doesn't interfere with the install process:killall hbwd

Start fdisk to partition the USB or SATA drive:

/sbin/fdisk /dev/sda

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.

Create the ext3 filesystem:

cd /tmp

wget http://archlinuxarm....pogoplug/mke2fs

chmod 755 mke2fs

./mke2fs -j /dev/sda1

mkdir alarm

mount /dev/sda1 alarm

Download and install Arch Linux ARM:

cd alarm

wget http://archlinuxarm....e-latest.tar.gz

tar -xzvf ArchLinuxARM-armv5te-latest.tar.gz # This will take a long time # I think I skipped this step
cry.gif


rm ArchLinuxARM-armv5te-latest.tar.gz # I think I skipped this step :-(

sync # Takes a while if you are using a flash drive

Unmount the drive:

cd ..

umount alarm

Download the U-Boot Install Toolkit (UBIT) environment

cd /tmp

wget http://jeff.doozan.c...ex/v0.6/uInitrd

wget http://jeff.doozan.c...v0.6/ubit_start

chmod +x ubit_start

Start the UBIT environment where the prompt will read: ubit0-6:~#

./ubit_start

Update the U-Boot bootloader and move a copy of the OE U-Boot into unused NAND memory:

chain_install goflexnet

chain_revert

uboot_uptodate

You need to set your MAC address to the value you noted earlier

ethaddr uu:vv:ww:xx:yy:zz

Install the rescue system

on /dev/sda1 ubit_write # Gave error, still the hero I'm I proceeded to the next command
cry.gif


Mark the partition with the special label "rootfs":

tune

2fs -L "rootfs" /dev/sda1

Leave the UBIT shell, and reboot into Arch Linux ARM

exit

/sbin/reboot

Console Log

login as: root

password:

-bash-3.2# killall hbwd

-bash-3.2# /sbin/fdisk /dev/sda

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.

Warning: invalid flag 0x00,0x00 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sda: 8076 MB, 8076132352 bytes

255 heads, 63 sectors/track, 981 cylinders

Units = cylinders of 16065 * 512 = 8225280 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-981, default 1): Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-981, default 981): Using default value 981

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table

-bash-3.2# cd /tmp

-bash-3.2# wget http://archlinuxarm.org/os/pogoplug/mke2fs

Connecting to archlinuxarm.org (206.217.130.189:80)

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

-bash-3.2# chmod 755 mke2fs

-bash-3.2# ./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)

492880 inodes, 1969962 blocks

98498 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=2017460224

61 block groups

32768 blocks per group, 32768 fragments per group

8080 inodes per group

Superblock backups stored on blocks:

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

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 25 mounts or

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

-bash-3.2# mkdir alarm

-bash-3.2# mount /dev/sda1 alarm

-bash-3.2# cd alarm

-bash-3.2# wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz

Connecting to archlinuxarm.org (206.217.130.189:80)

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

-bash-3.2# sync

-bash-3.2# cd..

-bash: cd..: command not found

-bash-3.2# cd ..

-bash-3.2# unmount alarm

-bash: unmount: command not found

-bash-3.2# umount alarm

-bash-3.2# cd /tmp

-bash-3.2# wget http://jeff.doozan.com/debian/goflex/v0.6/uInitrd

Connecting to jeff.doozan.com (69.163.187.226:80)

uInitrd 100% |*******************************| 3911k 00:00:00 ETA

-bash-3.2# wget http://jeff.doozan.com/debian/goflex/v0.6/ubit_start

Connecting to jeff.doozan.com (50.116.34.13:80)

ubit_start 100% |*******************************| 2238 --:--:-- ETA

-bash-3.2# chmod +x ubit_start

-bash-3.2# ./unit_start

-bash: ./unit_start: No such file or directory

-bash-3.2# ./ubit_start

17220 blocks

Entering UBIT environment

No valid U-Boot environment exists.

You need to reboot once to let U-Boot set its default environment

before the ethaddr setting can be updated, either directly or

with a cached value.

To cache a value, run:

ethaddr uu:vv:ww:xx:yy:zz

UBIT v0.6 by peaslaker 2010.11-00125-ga21bcca

ubit0-6:~# chain_install goflexnet

UBIT.CHAIN:goflexnet

UBIT.CHAIN:/usr/share/ubit/original/goflexnet.kwb writing to 0x380000 of /dev/mtd1

1+0 records in

1+0 records out

UBIT:bl: /usr/share/ubit/original/goflexnet.kwb checksum 5cbbbca7693c5939836349bbd7f270e8 -

Erase Total 4 Units

Performing Flash Erase of length 131072 at offset 0x3e0000 done

Writing data to block 28 at offset 0x380000

Writing data to block 29 at offset 0x3a0000

Writing data to block 30 at offset 0x3c0000

Writing data to block 31 at offset 0x3e0000

1+0 records in

1+0 records out

UBIT:bl: u-boot checksum match OK.

ubit0-6:~# chain_revert

/usr/share/ubit/original/goflexnet.kwb.md5

1+0 records in

1+0 records out

UBIT:bl: u-boot.5cbbbca7693c5939836349bbd7f270e8.kwb checksum 5cbbbca7693c5939836349bbd7f270e8 -

Erase Total 4 Units

Performing Flash Erase of length 131072 at offset 0x60000 done

Writing data to block 0 at offset 0x0

Writing data to block 1 at offset 0x20000

Writing data to block 2 at offset 0x40000

Writing data to block 3 at offset 0x60000

1+0 records in

1+0 records out

Writing data to block 4 at offset 0x80000

UBIT:bl: u-boot checksum match OK.

ubit0-6:~# uboot_uptodate

Existing firmware identified as matching: /usr/share/ubit/original/goflexnet.kwb.md5

UBIT:bl: u-boot checksum did not match.

Writing latest goflexnet firmware to /dev/mtd0

0+1 records in

1+0 records out

UBIT:bl: /usr/share/ubit/firmware/goflexnet.kwb checksum b43339faeb1d3924fa09aae0d0723065 -

Erase Total 4 Units

Performing Flash Erase of length 131072 at offset 0x60000 done

Writing data to block 0 at offset 0x0

Writing data to block 1 at offset 0x20000

Writing data to block 2 at offset 0x40000

Writing data to block 3 at offset 0x60000

0+1 records in

1+0 records out

Writing data to block 4 at offset 0x80000

UBIT:bl: u-boot checksum match OK.

ubit0-6:~# ethaddr 00:10:75:26:8E:AA

No valid U-Boot environment exists.

You need to reboot once to let U-Boot set its default environment

before the ethaddr setting can be updated, either directly or

with a cached value.

Cached ethaddr value set to: 00:10:75:26:8E:AA

ubit0-6:~# on /dev/sda1 ubit_write

UBIT:eek:perating on /dev/sda1

Output directory '/tmp/7caae93163da50f03ac46f598ec13f7a/boot' does not exist

ubit0-6:~# on /dev/sda1 ubit_write

UBIT:eek:perating on /dev/sda1

Output directory '/tmp/7caae93163da50f03ac46f598ec13f7a/boot' does not exist

ubit0-6:~# on /dev/sda1 ubit_write

UBIT:eek:perating on /dev/sda1

Output directory '/tmp/7caae93163da50f03ac46f598ec13f7a/boot' does not exist

ubit0-6:~#

The device gets detected on http://goflexnet.pog...g.com/view.html but no SSH option, cannot connect to it using SSH, it is still happily blinking
1ign13.gif
 
So you skipped the most important step of extracting the rootfs!
<


Connect the pendrive to a linux system, mount it and as 'root' (not sudo), extract the files to the pendrive with the same command 'tar -xzvf ArchLinuxARM-armv5te-latest.tar.gz' Unmount it. Do a file system check just in case and connect it to the GoFlex Net. It should boot, hopefully.
<


The second thing you missed is the rescue system, if that was successful it would have booted into the rescue system automatically in this case.
 
Thanks! for the instructions #[member='varkey'], I do not have a Linux system is it ok, if I create in VMWare and then try to do so, how do or can I go back to the old pogoplug sytem? #[member='vivek.krishnan'], thanks!
 
#[member='varkey'], sorry to trouble you, help needed, I tried to install the recovery from this page http://www.varkey.in/2011/09/seagate-goflex-net-installing-rescue-system/ it gave me error regarding uBoot not being updated, I updated uBoot from here http://projects.doozan.com/uboot/ and then again tried to install the recovery, it gave some error regarding unknown uBoot, used the no-uBoot-check parameter and was successfully able to update it, it got updated successfully. Then ran the following command

fw_setenv rescue_bootcmd 'if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x500000 0x100000 0x400000; bootm 0x500000; else run pogo_bootcmd; fi'

which also completed without any error, after this I wanted to try 'After this you can shutdown the device, remove the USB drive and restart, it will successfully boot into the rescue system.' so I disconnected the power to it, removed USB drive and connected power, I see that it is getting a proper IP, but the LED is off, blinks at start and then then turns off, I cannot connect to it using ssh. What do you mean by recovery, does it mean I need to set netconsole, is that what recovery means, with the Pogoplug shit on it I could connect to it without any drives, now with this ArchLinux, I cannot connect to it without any drives, is there any guide or steps wihtout enabling netconsole to go back to Pogoplug

#[member='dinjo'], #dheerajjotwani

Thanks in advance, I love my RT-N16, can download Torrents/eMule/HTTP, also doubles up as a DLNA server, can use a 3G modem to connect to internet and distrubute it without going to so much headless(no gui) trouble!
 
^ After you updated the uboot to Jeff's version did you run the rescue system installer? And did it boot to ArchLinux with the new uboot?

The LED is fine, it means that its booting fine, but since you haven't set the proper arch number it will not work. If its getting an IP, are you able to ping it?
 
Yes, also somewhere in between it also told me that it had set up the arch number to something like 20** and then I followed all the recovery steps and went ahead and removed the usb and restarted it :-(

I'm not able to ping the IP :-(

C:\Users\Prashant>ping 192.168.1.13

Pinging 192.168.1.13 with 32 bytes of data:

Reply from 192.168.1.10: Destination host unreachable.

Reply from 192.168.1.10: Destination host unreachable.

Reply from 192.168.1.10: Destination host unreachable.

Reply from 192.168.1.10: Destination host unreachable.

Ping statistics for 192.168.1.13:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
 
^ Are you sure that's the IP? If it boots to the rescue system, the IP will probably change. And are you able to boot into ArchLinux *after* you changed uboot?
 
Not sure about booting!

  1. I tried to update recovery, it told me to update uBoot
  2. I updated uBoot and during update it told me it was setting some Arc number.
  3. Again ran the recovery script it completed without any errors
  4. I then ran the enviorment command that aslo completed and did not give any errors
  5. I did not restart ArchLinux to test it, just plugged out the power, removed USB drive and then connected power to it
  6. The light blinks temporarily and then goes out, the IP is the same as it was earlier 192.168.1.13
  7. I tried to remove the USB, and took the ArchLinux tar and extracted it on a another USB with ext3 partition named rootfs and that also did not work, anymore idea?

Once again thanks for your help!
 
Oh k. Not sure what is wrong exactly. If you can post the serial output it would be easier.

You shouldn't have updated the uboot like that.
<
 
Some good news, I copied the uImage and uInitrd to the boot folder, now the goflex boots and the green light keeps blinking, but the internet connection is going to it but it is not getting a IP, any more help?

Apologies for the trouble
 
^ How do you know that its booting? Without seeing the boot log I don't think you will get a definitive solution.
 
^ How do you know that its booting? Without seeing the boot log I don't think you will get a definitive solution.

lol, just thought so, since the green light was blinking, will have to wait till I get the serial connector! Anyone in #Mumbai with a working serial connector?
 
#[member='varkey'], I'm back, the device boots with a ArchLinux on a USB drive, I cannot upgrade uBoot or install recovery, can you help me set up netcat(not sure if this will help as I'm on a unknown uBoot) or installing recovery, I will post the logs soon.

Trying to update uBoot

UBIT v0.6 by peaslaker 2010.11-00125-ga21bcca

ubit0-6:~# chain_install goflexnet

UBIT.CHAIN:goflexnet

UBIT.CHAIN:/usr/share/ubit/original/goflexnet.kwb writing to 0x380000 of /dev/mtd1

1+0 records in

1+0 records out

UBIT:bl: /usr/share/ubit/original/goflexnet.kwb checksum 5cbbbca7693c5939836349bbd7f270e8 -

Erase Total 4 Units

Performing Flash Erase of length 131072 at offset 0x380000

MTD Erase failure: Input/output error

Writing data to block 28 at offset 0x380000

Bad block at 380000, 1 block(s) from 380000 will be skipped

Writing data to block 29 at offset 0x3a0000

Bad block at 3a0000, 1 block(s) from 3a0000 will be skipped

Writing data to block 30 at offset 0x3c0000

Bad block at 3c0000, 1 block(s) from 3c0000 will be skipped

Writing data to block 31 at offset 0x3e0000

Bad block at 3e0000, 1 block(s) from 3e0000 will be skipped

Writing data to block 32 at offset 0x400000

ioctl(MEMGETBADBLOCK): Invalid argument

Data was only partially written due to error

: Invalid argument

UBIT:bl: u-boot checksum did not match.

ubit0-6:~#

ubit0-6:~# uboot_install goflexnet

UBIT:bl: u-boot checksum did not match.

UBIT:bl: backing up /dev/mtd0 to u-boot.38eb11b49b828dc070270680a8a37845.kwb

Keep your u-boot backups safe.

0+1 records in

1+0 records out

UBIT:bl: /usr/share/ubit/firmware/goflexnet.kwb checksum b43339faeb1d3924fa09aae0d0723065 -

Erase Total 4 Units

Performing Flash Erase of length 131072 at offset 0x0

MTD Erase failure: Input/output error

Writing data to block 0 at offset 0x0

Bad block at 0, 1 block(s) from 0 will be skipped

Writing data to block 1 at offset 0x20000

Bad block at 20000, 1 block(s) from 20000 will be skipped

Writing data to block 2 at offset 0x40000

Bad block at 40000, 1 block(s) from 40000 will be skipped

Writing data to block 3 at offset 0x60000

Bad block at 60000, 1 block(s) from 60000 will be skipped

Writing data to block 4 at offset 0x80000

Bad block at 80000, 1 block(s) from 80000 will be skipped

Writing data to block 5 at offset 0xa0000

Bad block at a0000, 1 block(s) from a0000 will be skipped

Writing data to block 6 at offset 0xc0000

Bad block at c0000, 1 block(s) from c0000 will be skipped

Writing data to block 7 at offset 0xe0000

Bad block at e0000, 1 block(s) from e0000 will be skipped

Writing data to block 8 at offset 0x100000

ioctl(MEMGETBADBLOCK): Invalid argument

Data was only partially written due to error

: Invalid argument

UBIT:bl: u-boot checksum did not match.

You had better sort this out before rebooting as the u-boot is now probably corrupt.

Commands that will be needed:

- flash_erase /dev/mtd0 0 4

- dd if=/usr/share/ubit/firmware/goflexnet.kwb bs=512K conv=sync | nandwrite -s 0 /dev/mtd0 -

- nanddump -nol 0x80000 /dev/mtd0 | md5sum

Checksum should match: b43339faeb1d3924fa09aae0d0723065 - - /tmp/checksum

ubit0-6:~#

[root@alarm /]# blkid

/dev/sda1: LABEL="rootfs" UUID="18d55cfb-d0ac-416d-b5c4-d369d203b7d3" TYPE="ext2"

[root@alarm /]#


[root@alarm /]# fdisk -l

Disk /dev/sda: 8103 MB, 8103395328 bytes

250 heads, 62 sectors/track, 1021 cylinders, total 15826944 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0000682a

Device Boot Start End Blocks Id System

/dev/sda1 62 15825499 7912719 83 Linux

[root@alarm /]#

[root@alarm /]# mount

/dev/root on / type ext2 (rw,relatime,errors=continue)

devtmpfs on /dev type devtmpfs (rw,relatime,size=61680k,nr_inodes=15420,mode=755)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)

shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)

[root@alarm /]#
 
Back
Top