box bricked. 2nd time? but with the official OS (reverted)

This forum is for all other ARMv5 devices

Re: box bricked. 2nd time? but with the official OS (reverte

Postby leckmaul666 » Fri Jan 04, 2013 9:54 pm

ok this is it. oxnas is running.

now i want to revert it.
leckmaul666
 
Posts: 43
Joined: Sat Dec 22, 2012 11:52 pm

Re: box bricked. 2nd time? but with the official OS (reverte

Postby WarheadsSE » Fri Jan 04, 2013 10:25 pm

Looks like it is reverted, but something must be horking @ stock boot.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: box bricked. 2nd time? but with the official OS (reverte

Postby Socaltom » Sat Jan 05, 2013 4:24 am

The best bet then might be to install the pogo software under Linux
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: box bricked. 2nd time? but with the official OS (reverte

Postby leckmaul666 » Sat Jan 05, 2013 11:00 am

and how?
tom my friend pls help me
leckmaul666
 
Posts: 43
Joined: Sat Dec 22, 2012 11:52 pm

Re: box bricked. 2nd time? but with the official OS (reverte

Postby leckmaul666 » Sat Jan 05, 2013 11:08 am

and if this is not possible.
it would be nice too boot from USB.

cause its only possible SATA-booting. USB no power until Alarm is bootet from sata

do u have a trick for me?

greetz tom (junior) ;) from germany
leckmaul666
 
Posts: 43
Joined: Sat Dec 22, 2012 11:52 pm

Re: box bricked. 2nd time? but with the official OS (reverte

Postby Socaltom » Sat Jan 05, 2013 2:41 pm

What instructions did you use to install linux before the revert?
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: box bricked. 2nd time? but with the official OS (reverte

Postby Socaltom » Sat Jan 05, 2013 7:31 pm

I took a stab at editing the install script to restore the "normal" Archlinux behaviour. I'm a total rookie, so use this at your own risk.
It requires
1) /tmp/ce does not exist on your boot drive
2) you are booted into Archlinux
3) /boot/uImage.pci and /boot/uImage.nopci exist on the drive you boot from.

If anyone ( Especially Warheads) can take a look and make sure I didn't screw something up I would appreciate it ( especially the kernel write and nand erase sections)
$this->bbcode_second_pass_code('', '#!/bin/sh
echo "#############################"
echo "##"
echo "## Pogoplug OXNAS based boards"
echo "## Arch Linux ARM rootfs Installer"
echo "##"
echo "#############################"
echo "##"
echo "## For use with OXNAS 7820 only."
echo "##"
echo "#############################"

echo "## PREPARATION "
echo "# Switching to /tmp..."
cd /tmp
echo "# Ensuring we're ready to proceed..."
#killall hbwd
#umount /dev/sda1
echo "# Preparing our way..."
mkdir /tmp/ce
# mount NAND fs.
mount -t ubifs -o ro ubi0:rootfs /tmp/ce


## get the things we need from blparam
echo "# Getting uboot parameters..."
/tmp/ce/usr/local/cloudengines/bin/blparam >/tmp/blparam.txt

MAC=`grep -e '^ethaddr=' /tmp/blparam.txt | sed 's/^ethaddr=//'`
LNAND=`grep -e '^load_nand=' /tmp/blparam.txt | sed 's/^load_nand=//'`
BOOTARGS=`grep -e '^bootargs=' /tmp/blparam.txt | sed 's/^bootargs=//'`
BOARDVER=`grep -e '^ceboardver=' /tmp/blparam.txt | sed 's/^ceboardver=//'`
echo "# = MAC : $MAC"
echo "# = load_nand : $LNAND"
echo "# = bootargs : $BOOTARGS"
echo "# = board : $BOARDVER"
echo "# "

echo "# Checking board revision..."

if [ "$BOARDVER" != "PPRO1" -a "$BOARDVER" != "PPROHD1" -a "$BOARDVER" != "PPV3" ]
then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "ABORTING!!! UNSUPPORTED MODEL"
echo "================================="
echo "See the wiki on models supported"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit
fi
PCI=0
if [ "$BOARDVER" = "PPRO1" ]
then
PCI=1
fi
if [ "$BOARDVER" = "PPROHD1" ]
then
PCI=1
fi
echo "# board has PCI: $PCI"
echo "#"

#echo "# Deriving boot partition format..."
#mount > mount.txt
#FMT=`grep /tmp/usb mount.txt | sed 's/\/dev\/sda1 on \/tmp\/usb type //' | sed 's/ (.*$//'`
#PART='/dev/sda1'
#echo "# = PARTITION: $PART"
#echo "# = FMT : $FMT"
#echo "# "

#if [ "$FMT" != "ext2" -a "$FMT" != "ext3" ]
#then
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# echo "ABORTING!!! Cannot boot from $FMT"
# echo "=================================" #
# echo "See the wiki on how to format your"
# echo "drive to ext2/ext3"
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# exit
#fi

#######
## GET files
#######
#echo "#############################"
#echo "## RETRIEVING FILES "
#echo "# Downloading ArchLinuxARM-oxnas-rootfs...(approx. 138MB)"
#cd /tmp/usb
#wget http://archlinuxarm.org/os/ArchLinuxARM-oxnas-latest.tar.gz
#wget http://archlinuxarm.org/os/ArchLinuxARM-oxnas-latest.tar.gz.md5

#if [ -f /tmp/usb/ArchLinuxARM-oxnas-latest.tar.gz ]
#then
# echo "# Verifying MD5"
# RFSMD5=`/usr/bin/md5sum ArchLinuxARM-oxnas-latest.tar.gz | sed 's/\W.*//'`
# GOODMD5=`sed 's/\W.*//' ArchLinuxARM-oxnas-latest.tar.gz.md5`
# if [ "$GOODMD5" != "$RFSMD5" ]
# then
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# echo "MD5 verification Failure."
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# exit
# fi
#
# cd /tmp/usb
# echo "# Extracting"
# tar xzf ArchLinuxARM-oxnas-latest.tar.gz
#
# if [ -f /tmp/usb/boot/uImage.pci -a -d /tmp/usb/usr/lib/modules/2.6.31.6_SMP_820 -a -f /tmp/usb/boot/uImage.nopci ]
# then
#
# echo "# Recording MAC Address"
# echo "$MAC" > usr/local/mac_addr
echo "# Coping key CE binaries..."
cp -ar /tmp/ce/usr/local/cloudengines /usr/local/
cp tmp/ce/usr/sbin/nandwrite /usr/local/cloudengines/bin/
cp /tmp/ce/usr/sbin/flash_erase /usr/local/cloudengines/bin/
cp tmp/ce/usr/sbin/nanddump /usr/local/cloudengines/bin/
echo "# Done copying."
echo "#############################"
echo "## FLASHING NAND & UBOOT VARS"
echo "# backing up mtd1"
tmp/ce/usr/sbin/nanddump -o -f mtd1.dump tmp/ce/dev/mtd1
echo "# Erasing mtd1 @ 0x500000 for 17 erase blocks (kernel location)"
/usr/sbin/flash_erase /dev/mtd1 0x500000 17
echo "# Erasing mtd1 @ 0xB00000 for 17 erase blocks (2nd kernel location)"
tmp/ce/usr/sbin/flash_erase tmp/ce/dev/mtd1 0xB00000 17

########
## flash kernel
########
echo "# Flashing Kernel..."
if [ $PCI = 1 ]
then
echo "# - @ 0x500000"
/tmp/ce/usr/sbin/nandwrite -p -s 0x500000 /tmp/ce/dev/mtd1 /boot/uImage.pci
echo "# - @ 0xB00000"
/tmp/ce/usr/sbin/nandwrite -p -s 0xB00000 /tmp/ce/dev/mtd1 /boot/uImage.pci
else
echo "# - @ 0x500000"
/tmp/ce/usr/sbin/nandwrite -p -s 0x500000 /tmp/ce/dev/mtd1 /boot/uImage.nopci
echo "# - @ 0xB00000"
tmp/ce/usr/sbin/nandwrite -p -s 0xB00000 /tmp/ce/dev/mtd1 /boot/uImage.nopci
fi

echo "# Done Flashing Kernel"
echo ""
#######
## flash boot arguments
#######
cd /tmp
echo $BOOTARGS > bootarg.txt
NEWARGS=`cat bootarg.txt | sed 's/ubi0:rootfs/\/dev\/sda1/' | sed "s/ubifs/$FMT/"`
NEWARGS="$NEWARGS rootwait"
NLNAND="nboot 60500000 0 500000"

echo "# NEW uBoot Parameters"
echo "# = bootargs_usb : $NEWARGS"
echo "# = load_custom_nand : $NLNAND"
echo "# = rootfs : /dev/sda1"
echo "# = root fs type : $FMT"

echo "# "
echo "# Setting up uboot parameters"
/tmp/ce/usr/local/cloudengines/bin/blparam bootargs_stock="$BOOTARGS" > /dev/null
/tmp/ce/usr/local/cloudengines/bin/blparam load_custom_nand="$NLNAND" > /dev/null
/tmp/ce/usr/local/cloudengines/bin/blparam load_custom_nand2="nboot 60500000 0 B00000" > /dev/null
/tmp/ce/usr/local/cloudengines/bin/blparam boot_custom="run load_custom_nand boot || run load_custom_nand2 boot" > /dev/null
/tmp/ce/usr/local/cloudengines/bin/blparam bootargs="$NEWARGS" > /dev/null
/tmp/ce/usr/local/cloudengines/bin/blparam bootcmd="run boot_custom" > /dev/null
echo "#"
echo "# Checking uboot parameters..."
/tmp/ce/usr/local/cloudengines/bin/blparam > /tmp/blparam_new.txt
CNEWARGS=`grep -e '^bootargs=' blparam_new.txt | sed 's/^bootargs=//'`
CNLNAND=`grep -e '^load_custom_nand=' blparam_new.txt | sed 's/^load_custom_nand=//'`
CBOOTCUST=`grep -e '^boot_custom=' blparam_new.txt | sed 's/^boot_custom=//'`
CBASTOCK=`grep -e '^bootargs_stock=' blparam_new.txt | sed 's/^bootargs_stock=//'`
echo "# = bootargs_stock : $CBASTOCK"
echo "# = bootargs : $CNEWARGS"
echo "# = load_custom_nand : $CNLNAND"
echo "# = boot_custom : $CBOOTCUST"



if [ "$CNEWARGS" != "$NEWARGS" -o "$CNLNAND" != "$NLNAND" -o "$CBOOTCUST" != "run load_custom_nand boot || run load_custom_nand2 boot" -o "$CBASTOCK" != "$BOOTARGS" ]
then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "One or more uboot parameters failed to set correctly"
echo "Contact #archlinux-arm to confirm."
echo "copy the content of blparam_new.txt to pastebin.com"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "ABSOLUTELY DO NOT POWER DOWN OR REBOOT UNITL CONFIRMED"
exit
else
echo "#############################"
echo "## Looks good!"
echo "# Sync ..."
sync
echo "# Unmount "
cd /
#umount /dev/sda1
echo "# Shutdown, place drive in USB port and cross your fingers and restar"

fi
#else
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# echo "Extraction FAILED or WRONG rootfs"
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# exit
#fi

#else
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# echo "DOWNLOAD FAILED"
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
#fi
')
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side

Re: box bricked. 2nd time? but with the official OS (reverte

Postby WarheadsSE » Sat Jan 05, 2013 9:32 pm

That looks pretty basically correct.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: box bricked. 2nd time? but with the official OS (reverte

Postby leckmaul666 » Sun Jan 06, 2013 8:15 pm

ok i copied your text. open gedit then i did paste it.
saved as "root.sh" on my rootfs archlinux sata HDD
plugged off, plugged in sata on my pogo pro box. booted with sata archlinux.

open ssh. client. then:
[root@alarm /]# chmod 755 root.sh
[root@alarm /]# ./root.sh
$this->bbcode_second_pass_code('', '#############################
##
## Pogoplug OXNAS based boards
## Arch Linux ARM rootfs Installer
##
#############################
##
## For use with OXNAS 7820 only.
##
#############################
## PREPARATION
# Switching to /tmp...
# Ensuring we're ready to proceed...
# Preparing our way...
# Getting uboot parameters...
# = MAC : 00:25:31:01:B3:EA
# = load_nand : nboot 60500000 0 200000
# = bootargs : rootwait rootwait
# = board : PPRO1
#
# Checking board revision...
# board has PCI: 1
#
# Coping key CE binaries...
cp: cannot stat ‘tmp/ce/usr/sbin/nandwrite’: No such file or directory
cp: cannot stat ‘tmp/ce/usr/sbin/nanddump’: No such file or directory
# Done copying.
#############################
## FLASHING NAND & UBOOT VARS
# backing up mtd1
./root.sh: line 122: tmp/ce/usr/sbin/nanddump: No such file or directory
# Erasing mtd1 @ 0x500000 for 17 erase blocks (kernel location)
./root.sh: line 124: /usr/sbin/flash_erase: No such file or directory
# Erasing mtd1 @ 0xB00000 for 17 erase blocks (2nd kernel location)
./root.sh: line 126: tmp/ce/usr/sbin/flash_erase: No such file or directory
# Flashing Kernel...
# - @ 0x500000
Writing data to block 40 at offset 0x500000
Writing data to block 41 at offset 0x520000
Writing data to block 42 at offset 0x540000
Writing data to block 43 at offset 0x560000
Writing data to block 44 at offset 0x580000
Writing data to block 45 at offset 0x5a0000
Writing data to block 46 at offset 0x5c0000
Writing data to block 47 at offset 0x5e0000
Writing data to block 48 at offset 0x600000
Writing data to block 49 at offset 0x620000
Writing data to block 50 at offset 0x640000
Writing data to block 51 at offset 0x660000
Writing data to block 52 at offset 0x680000
Writing data to block 53 at offset 0x6a0000
Writing data to block 54 at offset 0x6c0000
Writing data to block 55 at offset 0x6e0000
Writing data to block 56 at offset 0x700000
# - @ 0xB00000
Writing data to block 88 at offset 0xb00000
Writing data to block 89 at offset 0xb20000
Writing data to block 90 at offset 0xb40000
Writing data to block 91 at offset 0xb60000
Writing data to block 92 at offset 0xb80000
Writing data to block 93 at offset 0xba0000
Writing data to block 94 at offset 0xbc0000
Writing data to block 95 at offset 0xbe0000
Writing data to block 96 at offset 0xc00000
Writing data to block 97 at offset 0xc20000
Writing data to block 98 at offset 0xc40000
Writing data to block 99 at offset 0xc60000
Writing data to block 100 at offset 0xc80000
Writing data to block 101 at offset 0xca0000
Writing data to block 102 at offset 0xcc0000
Writing data to block 103 at offset 0xce0000
Writing data to block 104 at offset 0xd00000
# Done Flashing Kernel

# NEW uBoot Parameters
# = bootargs_usb : rootwait rootwait rootwait
# = load_custom_nand : nboot 60500000 0 500000
# = rootfs : /dev/sda1
# = root fs type :
#
# Setting up uboot parameters
#
# Checking uboot parameters...
# = bootargs_stock : rootwait rootwaitc
# = bootargs : rootwait rootwait rootwait
# = load_custom_nand : nboot 60500000 0 500000
# = boot_custom : run load_custom_nand boot || run load_custom_nand2 boot
#############################
## Looks good!
# Sync ...
# Unmount
# Shutdown, place drive in USB port and cross your fingers and restar')

but nothing changed? look pls the part of flashing the nand there is no directory..?!
the same ... i booted with usb. no light on usb. no power:(
oh man :( sorry for that
leckmaul666
 
Posts: 43
Joined: Sat Dec 22, 2012 11:52 pm

Re: box bricked. 2nd time? but with the official OS (reverte

Postby WarheadsSE » Sun Jan 06, 2013 8:27 pm

You might have screwed your boot sector on NAND.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

PreviousNext

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 52 guests