Welcome! Log In Create A New Profile

Advanced

Rescue System v2

Posted by Jeff 
Rescue System v2
February 17, 2011 11:09AM
I've updated the Rescue System with support for the new arcNumber (Dockstar & GoFlex Net) and support for runlevels via a new sysvinit based startup and a few new utilities. I've dropped the zcip configuration, because it never really worked anyways.

This will replace the Pogoplug kernel on mtd1 and the Pogoplug system on mtd2 with a more sophisticated system.

What's new in this release:
  • Kernel support for Dockstar/GoFlexNet arcnumbers
  • cleaner 'first-boot' initialization scripts
  • sysvinit
  • sqlite3
  • iptables
  • microperl
  • udev
  • lsof
  • socat
  • openvpn

The rescue system includes:
  • ipkg
  • ext2/3/4 create and repair utilities
  • ubifs support/utilities
  • flash/nand utilities
  • md/raid support/utilities
  • ntfs-3g
  • xfs support/utilities
  • reiserfs support
  • nfs support
  • lvm support/utilities
  • ssh/sshfs/openssl
  • openvpn
  • iptables
  • wget/curl/links/ncftp/rsync
  • vi/nano
  • screen
  • sqlite3
  • kernel 2.6.32-18 with dockstar/goflex patches + tons of modules for whatever you may have connected

The default login is 'root' with password 'root'

The installer will check to make sure you're running the latest uBoot, so make sure you upgrade that before anything else. If you don't want to upgrade uBoot, you can comment out the check as long as you're not running the stock Pogoplug uBoot.

Boot from a USB device (or a Debian NAND install) and run the following commands:
cd /tmp
wget http://jeff.doozan.com/debian/rescue/install_rescue.sh
chmod +x install_rescue.sh
./install_rescue.sh

The system is based on buildroot which is a pretty nice tool for this sort of thing. If you'd like to build your own images, you can do so with the following commands:
cd /usr/src
wget http://buildroot.uclibc.org/downloads/buildroot-2010.08.tar.gz
tar -xzvf buildroot-2010.08.tar.gz
cd buildroot-2010.08
git clone https://github.com/doozan/RescueSystem.git custom
cp custom/buildroot-config .config
make

If you're compiling on a multi-core machine, you may want to do 'make menuconfig' before 'make' and adjust 'number of jobs to run simultaneously' under 'build options' Be prepared to wait, the entire build process will likely take many hours.

After you've built the image, you can create the flashable images with the following commands:
cd output/images

cat <<END >rootfs.cfg
[ubifs]
mode=ubi
image=rootfs.ubifs
vol_id=0
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
END

ubinize -o rootfs-mtd2.img -m 2048 -p 128KiB -s 512 rootfs.cfg
dd if=uImage of=uImage-mtd1.img bs=512K conv=sync


I'm more than happy to accept patches against this to add any requested features.

-- Jeff



Edited 2 time(s). Last edit at 02/17/2011 03:43PM by Jeff.
Re: Rescue System v2
February 17, 2011 11:32AM
If anyone would like help contribute to the Rescue System effort, here are a few good projects in need of someone to tackle them:

- Johannes made a great mod of the original system. I haven't tried it, but it should be possible to integrate his mods and have a build script that will build both the flashable .img files and the bootable ram image.

- A newer buildroot (2011.02) is almost ready. Upgrading could be as simple as copying the config and doing 'make oldconfig', but most it will require a few fix-ups to the init scripts.

- We're still on kernel 2.6.32, because that's what Debian uses and I started with their config file as a base. There's no good reason that we can't move to something newer.

I will happy help anyone get started on these, but I just don't have the free time right now to work on them myself!

-- Jeff



Edited 2 time(s). Last edit at 02/17/2011 11:49AM by Jeff.
Johannes
Re: Rescue System v2
February 20, 2011 01:25PM
To create the ramdisk based version of the rescue system (in parallel with the UBIFS version):
  • working directory is buildroot-2010.08
  • correct a bug in the 2010.08 version of buildroot by applying the patch:
    custom/buildroot-patch:
    --- original/linux/linux.mk 2010-10-29 00:00:00.000000000 +0000
    +++ new/linux/linux.mk 2010-10-29 00:00:00.000000000 +0000
    @@ -104,9 +104,6 @@
    $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)
    $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config)
    $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config)
    -else
    - $(call KCONFIG_DISABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)
    - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"\",$(@D)/.config)
    endif
    $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) oldconfig
    $(Q)touch $@

      patch -p1 -i custom/buildroot-patch

    This bug is fixed in the next version of buildroot, see http://git.buildroot.net/buildroot/commit/?id=ee3f319249e146d92b093ad8c45a3a908d44236f
  • enable the kernel's initrd support. Replace line 81 of the custom/linux-2.6.32.18-config file:
    # CONFIG_BLK_DEV_INITRD is not set

    with

    CONFIG_BLK_DEV_INITRD=y
    CONFIG_INITRAMFS_SOURCE=""
    CONFIG_RD_GZIP=y
    CONFIG_RD_BZIP2=y
    CONFIG_RD_LZMA=y
  • change the buildroot configuration with "make menuconfig" and enable cpio output of the root filesystem, choose bzip2 compression
  • after "make", add training wheels to rootfs.cpio.bz2 so that uboot can use it:
      mkimage -A arm -O linux -T ramdisk -C bzip2 -a 0 -e 0 -n RescueSystem -d output/images/rootfs.cpio.bz2 output/images/uInitrd  
Re: Rescue System v2
May 12, 2011 04:46AM
Can I install this on a GoFlex Net?
Re: Rescue System v2
May 13, 2011 02:42PM
I have install the rescue system on my GoFlex Net but it will not boot the rescue system. I can still boot my debian system from usb so it's not bricked. I have attached the serial output to this message maybe some will have an idea as too why it doesn't boot.
Attachments:
open | download - serial.txt (1.9 KB)
Re: Rescue System v2
May 13, 2011 03:00PM
What is the output of fw_printenv?



Edited 1 time(s). Last edit at 05/13/2011 03:07PM by varkey.
Re: Rescue System v2
May 13, 2011 03:11PM
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_customs
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm i
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /resi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_cus
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload i
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $use
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdpars
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitri
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_boott
ethaddr=00:10:75:26:55:E7
arcNumber=3089
rescue_installed=1
stdin=serial
stdout=serial
stderr=serial

Environment size: 2261/131068 bytes
Re: Rescue System v2
June 18, 2011 12:46PM
To run the Rescue System on the GoFlex Net you need to change the memory address from 0x800000 to something else. I don't know the reason but when I changed it to 0x500000, it booted into the Rescue System perfectly.

So you need to run the following command to make that change

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'

Although it works with the above settings, what might be the reason that 0x800000 didn't work?

Another problem when running the Rescue System on GoFlex Net is that the LED names are different in the GoFlex so the LED startup scripts fail. Anyway I just had to edit the startup script and replace the 'dockstar' to 'status'
ratskcod
Re: Rescue System v2
June 25, 2011 05:36PM
Dear Jeff,

would you be so kind as to build a new version based on build root 1105 or to give some detailed information to build for my own?

thanks
willi
Rescue System v2 DHCP
August 17, 2011 06:31PM
Dear Jeff,

Thank you for your script! I have your Rescue System installed. The network is not running. It does not get ip from DHCP. Manually with ifconfig and route, I can assign an ip. Then you can access via ssh. But then the dns is not yet. resolv.conf you can not even describe. Do you have any idea, why not go dhcp, or how I can make one by hand dns resolution?

Sorry for my bad english.

Willi
Re: Rescue System v2
September 19, 2011 06:14AM
Hi all,
first of all.. thank you so much for your work and for sharing this with everyone..
I've installed this rescue system to fs.check my partitions before start the system, exsplecially the /dev/sda1 ext2 partition which is not checked at boot-time because it is already mounted.
My /dev/sda2 partition is XFS, and I've this error when I try to check the partition:

rescue:~# xfs_check
/bin/xfs_check: line 25: getopts: not found
Usage: xfs_check [-fsvV] [-l logdev] [-i ino]... [-b bno]... special
rescue:~# xfs_check  /dev/sda2
/bin/xfs_check: line 25: getopts: not found
xfs_db: can't load library 'libxfs.so.0'
rescue:~#

It is missing 'libxfs.so.0' , but I can't find it anywhere.
However Is is not a major problem, because I can still check it after the system boot.
Thank you.


edit: I forgot to mention that I've a dockstar with archlinux and rescue system installed..



Edited 1 time(s). Last edit at 09/19/2011 06:15AM by skakz.
Re: Rescue System v2 DHCP
February 13, 2012 08:52PM
I have the same problem.
Kernel is starting, but LED is heartbeating, and it get no IP from DHCP, so no SSH connection possible.
I only can boot my USB Stick Debian but not access the Rescue System (to reinstall my Debian on USB Stick and such things)

willi Wrote:
-------------------------------------------------------
> Dear Jeff,
>
> Thank you for your script! I have your Rescue
> System installed. The network is not running. It
> does not get ip from DHCP. Manually with ifconfig
> and route, I can assign an ip. Then you can access
> via ssh. But then the dns is not yet. resolv.conf
> you can not even describe. Do you have any idea,
> why not go dhcp, or how I can make one by hand dns
> resolution?
>
> Sorry for my bad english.
>
> Willi
maurer
Re: Rescue System v2
March 08, 2012 08:43AM
hi Jeff,

I installed your rescue system on new Dockstar.
Now i want to install openwrt in place of this Recovery system with commands from openwrt wiki:
./blparam "bootcmd=nand read.e 0x800000 0x100000 0x80000; go 0x800000"
flash_eraseall /dev/mtd1
nandwrite /dev/mtd1 openwrt-kirkwood-dockstar-uboot-uImage.bin
flash_eraseall /dev/mtd2
nandwrite /dev/mtd2 openwrt-kirkwood-Dockstar-jffs2-128k.img

Can I enter it like this or do I need to change this ?

Thank you for all your work !
I succeeded in installing this "new" kernel and rescue system onto mtd1 and mtd2 on a Pogoplug V2, and have successfully booted from it. I am super pleased that it seems to recognize my webcam, but in trying to install user tools for the webcam, I have hit a wall.

uname -a shows:
Linux rescue 2.6.32.18-dockstar #1 Thu Feb 17 03:09:57 EST 2011 armv5tel GNU/Linux

Two things have happened that have me perplexed.
1) ssh to the machine at first worked, but now gives me this error:

ssh_exchange_identification: Connection closed by remote host
Which keys do I need to delete or reset while I still have one connection...

2) In attempting to install optware as per these instructions:
http://www.nslu2-linux.org/wiki/Optware/HomePage

I have ended up with a mystery that might have to do with kernels, but seems strange to me. Optware executable files appear in directory listings, show in the which command, but return "No such file or directory" when I attempt to run them. (+x is set)


Pogo_0.5/opt/
:which ipkg
/opt/bin/ipkg
Pogo_0.5/opt/
:ipkg
bash: /opt/bin/ipkg: No such file or directory
Pogo_0.5/opt/
:

Is it a kernel thing, some hidden flag that I have to change, or somthing else like a new running process that prevents executables being found?

If this is a kernel thing, how can I add packages to my system?

Thanks,
TJ
Re: Rescue System v2: Should Optware work w/kernel 2.6.32.18
May 10, 2012 12:17AM
Maybe a V2.1 ?
          Jeff Doozan's
Dockstar/Pogoplug Recovery System

rescue login: root
Password: 
rescue:~# uname -a
Linux rescue 3.3.2-kirkwide #1 Wed May 9 20:31:03 CDT 2012 armv5tel GNU/Linux
rescue:~# ping yahoo.com
PING yahoo.com (98.139.183.24): 56 data bytes
64 bytes from 98.139.183.24: seq=0 ttl=55 time=94.938 ms

I have the kernel set up w/ support for GoFlex Net/Home (with proper NAND chip delay), Dockstar, Zyxel NSA320/310... just need to patch in the LED stuff or Pogoplug E02/V2 still.

AFAICT, everything works... anyone interested in testing it on theirs? (yup, the newer kernel requires an updated U-Boot w/ the L2 cache fix)

----------------------------------------------
...well, almost everything work OOTB...
ntpd: bad address 'pool.ntp.org'
run-parts: /etc/network/if-up.d/ntpd exited with code 1
Starting Network Interface Plugging Daemon: eth0.
Starting sshd: OK
Starting heartbeat LED...
/etc/init.d/S99LED: line 22: can't create /sys/class/

the ntpd message may just be a timing thing... that shouldn't be happening _before_ eth0 is up... and the LED thing is just the fact that I'd forgotten to add in the patches for PogoPlug V2's LEDs. Trivial to fix, only take 15 minutes to re-roll the kernel, IIRC.

=====================================================





Edited 1 time(s). Last edit at 05/10/2012 12:35AM by davygravy.
Rescue V2.1 : correct kernel support for GoFlexNet/Home & Zyxel NSA3x0
May 10, 2012 11:43PM
Tested in Dockstar and PogoplugE02. (DEPRECATED : use either Jeff's V2, the 2.1 that I put up or whatever higher replacement that you see available and test)

Changes:

1. Kernel now supports GoFlex Net/Home completely, with NAND access fix, Zyxel NSA3x0 series.

2. Fixed ntdp failure. (this was easy , rename /etc/init.d/S40network to /etc/init.d/S47network, so it starts _after_ ifplugd. Now the date gets set correctly and ntpd doesn't die. Was this happening in the V2 rescue?)

3. I patched the long-standing $IP/$ip typo in the example/zcip.script... not sure that had any real effect... Maybe "howl" would be a better choice for advertising services... Is avahi overkill on this? Sure would be nice to auto-advertise ssh !

Interested in testing it? It is running (great) on my PogoE02 right now...

DEPRECATED: see above Download them : uImage-mtd1.img and rootfs-mtd2.img, put them on a flashdrive... mount and cd to them and...

flash_eraseall /dev/mtd1
nandwrite /dev/mtd1 uImage-mtd1.img


flash_eraseall /dev/mtd2
ubiformat /dev/mtd2 -s 512 -f rootfs-mtd2.img -y


fw_setenv set_bootargs_rescue 'setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts'
fw_setenv bootcmd_rescue 'run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
fw_setenv bootcmd_pogo 'run bootcmd_rescue'
fw_setenv rescue_installed 1


Also looking at adding in lm-sensors for the Zyxel, so we can have access to fan control/temp readings.

=====================================================





Edited 3 time(s). Last edit at 05/20/2012 12:05PM by davygravy.
@davy I tried booting the above from memory. It seems the rootfs image is corrupt.

GoFlexNet> tftpboot 0x500000 uImage-mtd1.img
Using egiga0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.100
Filename 'uImage-mtd1.img'.
Load address: 0x500000
Loading: #################################################################
         #################################################################
         #################################################################
         ########################################################
done
Bytes transferred = 3670016 (380000 hex)
GoFlexNet> tftpboot 0xe00000 rootfs-mtd2.img
Using egiga0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.100
Filename 'rootfs-mtd2.img'.
Load address: 0xe00000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################################################################
done
Bytes transferred = 27656192 (1a60000 hex)
GoFlexNet> bootm 0x500000 0xe00000
## Booting kernel from Legacy Image at 00500000 ...
   Image Name:   Linux-3.3.2-kirkwide
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3546296 Bytes = 3.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

Re: Rescue V2.1 : correct kernel support for GoFlexNet/Home & Zyxel NSA3x0
May 11, 2012 04:23PM
Well, a ubifs image is quite different from a initramfs image... apples and oranges... or maybe apples and porcupines - very different things. It certainly isn't corrupt... I just flashed it to my Dockstar/WirelessBridge at work and it works great on it, too.

It did exactly what it should do... it _shouldn't_ be compatible with loading to RAM and running it that way...

You'd have to test it by flashing it to mtdN... you should back up your mtd1 & mtd2 before doing this... and don't mess w/ mtd0 (uboot).

=====================================================





Edited 1 time(s). Last edit at 05/11/2012 05:08PM by davygravy.
Re: Rescue System v2
May 12, 2012 11:41AM
Sorry, I didn't know that. Flashed the images to mtd partitions and works like charm now. Thanks very much.
Re: Rescue System v2
May 12, 2012 11:50AM
I'm working on a revision(s) and a few more lightweight features...

I've tested it out on my Zyxel dual-SATA box, to see how SATA is... and it works.

I'm moving further discussion to ... Rescue V2.1

=====================================================


starbuck
Re: Rescue System v2
May 14, 2012 04:14PM
Hi davygravy,

I want to install your rescue system in flash memory so I can do a fresh install of a new system on my usb stick.

What is the md5sum of the rescue-v3-ntpfixed-3.3.2-Pogo-Dock-SGF-NSA3x0.tar.gz file?

I want to get sure that it is not corrupt before flashing.

Quote
you should back up your mtd1 & mtd2 before doing this

What is the best way to backup mtd1 and mtd2 ?

How could I verify the backup data and compare it?

regards
starbuck
E41
Re: Rescue System v2
July 27, 2012 07:10PM
Hi,

I tried to install the rescue-image v2 as described above using an USB-Stick (via the script mentioned). Well... I think something went horribly wrong. I have still access via netconsole and the rescue system (on the USB-Stick) still boots but there is no chance to boot rescue-image v2 from nand. Nc says:

U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: vtbl_check: volume table check failed: record 0, error 9
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..

NAND read: device 0 offset 0x100000, size 0x400000
NAND read from offset 100000 failed -74
 0 bytes read: ERROR
## Booting kernel from Legacy Image at 00800000 ...
Bad Header Checksum
ERROR: can't get kernel image!
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS:  done.
find_inode failed for name=uboot-original-mtd0.kwb
load: Failed to find inode
### JFFS2 LOAD ERROR<0> for uboot-original-mtd0.kwb!
resetting ...

Has anyone an idea, what I can do to solve this problem? I'm missin' my dockstar. :( Thank you!
Re: Rescue System v2
July 31, 2012 12:22PM
-----------



Edited 2 time(s). Last edit at 08/06/2012 09:25PM by funtoy1001.
lcg
Re: Rescue System v2
December 02, 2012 04:56PM
@E41

It is still true that RescueV2 cannot be installed from RescueV3 (USB). The script complains about a "not up to date uboot". If one ignores that, the NAND is flashed without any error message, but after reboot it does not start. At the same time the original uboot install script clearly states that the uboot is "up to date". So it is probably not an issue of uboot. However, one can still boot from a Debian (USB) and install RescueV2 from that. It reboots then and the RescueV2 boots without any problem. That worked at least for me. If one has no Debian installation at hand, it should be possible to boot from RescueV3 (USB), adjust the Debian install script to install the rootfs to /dev/sdb1 (because /dev/sda contains the RescueV3) and /etc/fstab will contain only /dev/root (however, the swap should be set properly). Later one can install RescueV2 from the Debian (USB).
Re: Rescue System v2
March 16, 2013 11:02PM
Will this rescue system work on Pogoplug Mobile? or we do have one for it?
Re: Rescue System v2
March 30, 2015 05:26AM
Hi,
I'm using Pogoplug e02 long with archlinux . After a power failure no longer boot.
I connected the serial console and at every boot landed in rescue .
The USB drive is new and formatted as http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray . It can be a problem uboot env ?
Even if I change the value of machid my pogo does not boot .
Have a suggestion ?
Thanks to all.

CANNOT BOOT:

SoC: Kirkwood 88F6281_A0
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
No link on egiga0
ping failed; host 192.168.1.1 is not alive
Hit any key to stop autoboot: 0
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
** File not found /rescueme **
** Unrecognized filesystem type **
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 91 MiB
UBI: number of good PEBs: 728
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 717
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
1 bytes read in 124 ms (0 Bytes/s)
Found bootable drive on usb 0:1
EHCI timed out on TD - token=0x800d8d80
EHCI timed out on TD - token=0xac008d80
EHCI timed out on TD - token=0x800d8d80
4054464 bytes read in 16169 ms (244.1 KiB/s)
** File not found /boot/uInitrd **
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-3.19.0-1-ARCH
Created: 2015-02-10 4:56:00 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4054400 Bytes = 3.9 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
stopping USB..

NAND read: device 0 offset 0x100000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-2.6.32.18-dockstar
Created: 2011-02-17 8:10:10 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3236180 Bytes = 3.1 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Using machid 0xdd6 from environment

Starting kernel ...

Uncompressing Linux............................................................................................................................................................................................................. done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000dd6).

Available machine support:

ID (hex) NAME
00000690 Marvell DB-88F6281-BP Development Board
00000691 Marvell RD-88F6192-NAS Development Board
00000692 Marvell RD-88F6281 Reference Board
0000078c Marvell 88F6281 GTW GE Board
00000831 Marvell SheevaPlug Reference Board
00000bb6 Seagate FreeAgent DockStar
00000c11 Seagate Goflex Net
0000085b QNAP TS-119/TS-219
00000915 Marvell OpenRD Base Board

Please check your kernel config and/or bootloader.

MACHID MODIFIED:

U-Boot 2014.07-tld-2 (Sep 20 2014 - 00:52:18)
Pogo E02

SoC: Kirkwood 88F6281_A0
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
No link on egiga0
ping failed; host 192.168.1.1 is not alive
Hit any key to stop autoboot: 0
PogoE02> setenv machid 831
PogoE02> boot
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
** File not found /rescueme **
** Unrecognized filesystem type **
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 91 MiB
UBI: number of good PEBs: 728
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 717
UBI: total number of reserved PEBs: 11
UBI: number of PEBs reserved for bad PEB handling: 7
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'rootfs' errno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
1 bytes read in 124 ms (0 Bytes/s)
Found bootable drive on usb 0:1
4054464 bytes read in 234 ms (16.5 MiB/s)
** File not found /boot/uInitrd **
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-3.19.0-1-ARCH
Created: 2015-02-10 4:56:00 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4054400 Bytes = 3.9 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
stopping USB..

NAND read: device 0 offset 0x100000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-2.6.32.18-dockstar
Created: 2011-02-17 8:10:10 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3236180 Bytes = 3.1 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Using machid 0x831 from environment

Starting kernel ...

Uncompressing Linux............................................................................................................................................................................................................. done, booting the kernel.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32.18-dockstar (root@stfu.tcbnet) (gcc version 4.3.5 (Buildroot 2010.08) ) #1 Thu Feb 17 03:09:57 EST 2011
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Marvell SheevaPlug Reference Board
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 256MB = 256MB total
[ 0.000000] Memory: 252672KB available (5968K code, 708K data, 128K init, 0K highmem)
[ 0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:114
[ 0.000000] Console: colour dummy device 80x30
[ 21.474973] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
[ 21.714928] Security Framework initialized
[ 21.714950] SELinux: Disabled at boot.
[ 21.714979] Mount-cache hash table entries: 512
[ 21.715294] Initializing cgroup subsys ns
[ 21.715311] Initializing cgroup subsys cpuacct
[ 21.715322] Initializing cgroup subsys devices
[ 21.715331] Initializing cgroup subsys freezer
[ 21.715339] Initializing cgroup subsys net_cls
[ 21.715385] CPU: Testing write buffer coherency: ok
[ 21.716202] devtmpfs: initialized
[ 21.717944] regulator: core version 0.5
[ 21.718175] NET: Registered protocol family 16
[ 21.718707] Kirkwood: MV88F6281-A0, TCLK=200000000.
[ 21.718721] Feroceon L2: Enabling L2
[ 21.718756] Feroceon L2: Cache support initialised.
[ 21.721839] bio: create slab <bio-0> at 0
[ 21.722113] vgaarb: loaded
[ 21.722388] SCSI subsystem initialized
[ 21.722639] usbcore: registered new interface driver usbfs
[ 21.722707] usbcore: registered new interface driver hub
[ 21.722795] usbcore: registered new device driver usb
[ 21.723236] Switching to clocksource orion_clocksource
[ 21.728558] NET: Registered protocol family 2
[ 21.728822] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 21.729637] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 21.729821] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 21.729916] TCP: Hash tables configured (established 8192 bind 8192)
[ 21.729925] TCP reno registered
[ 21.730087] NET: Registered protocol family 1
[ 21.730381] RPC: Registered udp transport module.
[ 21.730391] RPC: Registered tcp transport module.
[ 21.730399] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 21.730540] NetWinder Floating Point Emulator V0.97 (double precision)
[ 21.730785] audit: initializing netlink socket (disabled)
[ 21.730818] type=2000 audit(0.241:1): initialized
[ 21.737638] VFS: Disk quotas dquot_6.5.2
[ 21.737903] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 21.740497] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 21.742121] Registering the dns_resolver key type
[ 21.742172] Slow work thread pool: Starting up
[ 21.742293] Slow work thread pool: Ready
[ 21.742303] JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 21.743070] fuse init (API version 7.13)
[ 21.743568] SGI XFS with security attributes, large block/inode numbers, no debug enabled
[ 21.745132] msgmni has been set to 494
[ 21.747223] alg: No test for stdrng (krng)
[ 21.747379] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 21.747391] io scheduler noop registered
[ 21.747399] io scheduler anticipatory registered
[ 21.747406] io scheduler deadline registered
[ 21.747670] io scheduler cfq registered (default)
[ 21.753640] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 21.754099] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[ 22.139869] console [ttyS0] enabled
[ 22.143964] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[ 22.152445] Scanning device for bad blocks
[ 22.194342] 4 cmdlinepart partitions found on MTD device orion_nand
[ 22.200636] Creating 4 MTD partitions on "orion_nand":
[ 22.205817] 0x000000000000-0x000000100000 : "u-boot"
[ 22.211363] 0x000000100000-0x000000500000 : "uImage"
[ 22.216824] 0x000000500000-0x000002500000 : "rootfs"
[ 22.222276] 0x000002500000-0x000008000000 : "data"
[ 22.227894] UBI: attaching mtd2 to ubi0
[ 22.231751] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 22.238063] UBI: logical eraseblock size: 129024 bytes
[ 22.243495] UBI: smallest flash I/O unit: 2048
[ 22.248220] UBI: sub-page size: 512
[ 22.252859] UBI: VID header offset: 512 (aligned 512)
[ 22.258727] UBI: data offset: 2048
[ 22.323004] UBI: attached mtd2 to ubi0
[ 22.326794] UBI: MTD device name: "rootfs"
[ 22.331871] UBI: MTD device size: 32 MiB
[ 22.336782] UBI: number of good PEBs: 256
[ 22.341419] UBI: number of bad PEBs: 0
[ 22.345893] UBI: max. allowed volumes: 128
[ 22.350532] UBI: wear-leveling threshold: 4096
[ 22.355266] UBI: number of internal volumes: 1
[ 22.359731] UBI: number of user volumes: 1
[ 22.364203] UBI: available PEBs: 0
[ 22.368669] UBI: total number of reserved PEBs: 256
[ 22.373578] UBI: number of PEBs reserved for bad PEB handling: 2
[ 22.379614] UBI: max/mean erase counter: 1/0
[ 22.383911] UBI: image sequence number: 1653365787
[ 22.388735] UBI: background thread "ubi_bgt0d" started, PID 38
[ 22.394782] MV-643xx 10/100/1000 ethernet driver version 1.4
[ 22.400534] mv643xx_eth smi: probed
[ 22.405841] net eth0: port 0 with MAC address 00:25:31:00:55:19
[ 22.411857] console [netcon0] enabled
[ 22.415550] netconsole: network logging started
[ 22.420102] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 22.426707] orion-ehci orion-ehci.0: Marvell Orion EHCI
[ 22.432012] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[ 22.463292] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[ 22.483277] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[ 22.489280] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 22.496111] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 22.503378] usb usb1: Product: Marvell Orion EHCI
[ 22.508104] usb usb1: Manufacturer: Linux 2.6.32.18-dockstar ehci_hcd
[ 22.514582] usb usb1: SerialNumber: orion-ehci.0
[ 22.519494] usb usb1: configuration #1 chosen from 1 choice
[ 22.525227] hub 1-0:1.0: USB hub found
[ 22.529022] hub 1-0:1.0: 1 port detected
[ 22.533198] Initializing USB Mass Storage driver...
[ 22.538213] usbcore: registered new interface driver usb-storage
[ 22.544266] USB Mass Storage support registered.
[ 22.549110] mice: PS/2 mouse device common for all mice
[ 22.554431] i2c /dev entries driver
[ 22.558718] device-mapper: uevent: version 1.0.3
[ 22.563777] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
[ 22.572348] cpuidle: using governor ladder
[ 22.576612] cpuidle: using governor menu
[ 22.580650] Registered led device: plug:green:health
[ 22.585716] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[ 22.592119] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[ 22.633302] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[ 22.673304] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[ 22.713305] mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
[ 22.753303] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
[ 22.759113] Netfilter messages via NETLINK v0.30.
[ 22.763914] nf_conntrack version 0.5.0 (3952 buckets, 15808 max)
[ 22.770473] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
[ 22.777926] nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
[ 22.785902] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
[ 22.794491] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 22.799881] TCP cubic registered
[ 22.803127] NET: Registered protocol family 17
[ 22.807991] registered taskstats version 1
[ 22.812802] Initalizing network drop monitor service
[ 22.817891] md: Waiting for all devices to be available before autodetect
[ 22.824722] md: If you don't use raid, use raid=noautodetect
[ 22.830800] md: Autodetecting RAID arrays.
[ 22.834938] md: Scanned 0 and added 0 devices.
[ 22.839400] md: autorun ...
[ 22.842199] md: ... autorun DONE.
[ 22.845562] usb 1-1: new high speed USB device using orion-ehci and address 2
[ 22.932815] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 22.938906] UBIFS: mounted read-only
[ 22.942500] UBIFS: file system size: 30836736 bytes (30114 KiB, 29 MiB, 239 LEBs)
[ 22.950205] UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
[ 22.957558] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 22.963427] UBIFS: default compressor: lzo
[ 22.967542] UBIFS: reserved for root: 0 bytes (0 KiB)
[ 22.973354] VFS: Mounted root (ubifs filesystem) readonly on device 0:16.
[ 22.980223] Freeing init memory: 128K
INIT: version 2.86 booting
[ 23.054679] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[ 23.061417] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 23.068599] usb 1-1: Product: USB2.0 Hub
[ 23.072828] usb 1-1: configuration #1 chosen from 1 choice
[ 23.083466] hub 1-1:1.0: USB hub found
[ 23.087601] hub 1-1:1.0: 4 ports detected
mdev: /sys/class: No such file or directory
/etc/rcS.d/S06LED: line 23: can't create /sys/class/leds/dockstar:green:health/trigger: nonexistent directory
Starting heartbeat LED...
/etc/rcS.d/S06LED: line 23: can't create /sys/class/leds/dockstar:orange:misc/trigger: nonexistent directory
Populating /dev using udev: done
Initializing random number generator... read-only file system detected...done
Starting network...
[ 23.384166] usb 1-1.1: new high speed USB device using orion-ehci and address 3
Starting Network Interface Plugging Daemon: eth0.
Starting sshd: [ 23.508681] usb 1-1.1: New USB device found, idVendor=1058, idProduct=0702
[ 23.515629] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 23.522974] usb 1-1.1: Product: External HDD
[ 23.527650] usb 1-1.1: Manufacturer: Western Digital
[ 23.532722] usb 1-1.1: SerialNumber: 323642373735313131453245
[ 23.574546] usb 1-1.1: configuration #1 chosen from 1 choice
[ 23.603812] scsi0 : SCSI emulation for USB Mass Storage devices
OK
INIT: Entering runlevel: 2


Jeff Doozan's
Dockstar/Pogoplug Recovery System

rescue login:
[ 28.624395] scsi 0:0:0:0: Direct-Access WD ON SV30 External 1.04 PQ: 0 ANSI: 4
[ 28.678962] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[ 28.687200] sd 0:0:0:0: [sda] Write Protect is off
[ 28.692030] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 28.699821] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 28.705964] sda: sda1
[ 28.715221] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 28.721354] sd 0:0:0:0: [sda] Attached SCSI disk
root
Password:
Jan 1 00:00:39 login[103]: root login on 'ttyS0'
rescue:~# fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
81 heads, 61 sectors/track, 47448 cylinders
Units = cylinders of 4941 * 512 = 2529792 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 47448 117220253+ 83 Linux
rescue:~# mount /dev/sda1 /mnt
[ 88.529779] kjournald starting. Commit interval 5 seconds
[ 88.536086] EXT3 FS on sda1, internal journal
[ 88.540478] EXT3-fs: mounted filesystem with ordered data mode.
rescue:~# ls -la /mnt
total 196496
drwxr-xr-x 16 root root 4096 Jan 1 1970 .
drwxr-xr-x 16 root root 1056 Feb 17 2011 ..
-rw-r--r-- 1 root root 200936584 Jan 1 00:15 ArchLinuxARM-kirkwood-latest.tar.gz
lrwxrwxrwx 1 root root 7 Jan 1 1970 bin -> usr/bin
drwxr-xr-x 2 root root 4096 Jan 1 1970 boot
drwxr-xr-x 2 root root 4096 Mar 2 2015 dev
drwxr-xr-x 36 root root 4096 Jan 1 1970 etc
drwxr-xr-x 2 root root 4096 Feb 24 2015 home
lrwxrwxrwx 1 root root 7 Jan 1 1970 lib -> usr/lib
drwx------ 2 root root 16384 Jan 1 00:08 lost+found
drwxr-xr-x 2 root root 4096 Feb 24 2015 mnt
drwxr-xr-x 2 root root 4096 Feb 24 2015 opt
dr-xr-xr-x 2 root root 4096 Mar 2 2015 proc
drwxr-x--- 2 root root 4096 Feb 24 2015 root
drwxr-xr-x 2 root root 4096 Mar 2 2015 run
lrwxrwxrwx 1 root root 7 Jan 1 1970 sbin -> usr/bin
drwxr-xr-x 4 root root 4096 Jan 1 1970 srv
dr-xr-xr-x 2 root root 4096 Mar 2 2015 sys
drwxrwxrwt 2 root root 4096 Mar 2 2015 tmp
drwxr-xr-x 8 root root 4096 Jan 1 1970 usr
rescue:~#

PRINTENV:

PogoE02> version

U-Boot 2014.07-tld-2 (Sep 20 2014 - 00:52:18)
Pogo E02
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
PogoE02>

PogoE02> printenv
arcNumber=3542
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=00:25:31:00:55:19
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
if_netconsole=ping $serverip
ipaddr=192.168.1.4
led_error=orange blinking
led_exit=green off
led_init=green blinking
machid=dd6
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=run if_netconsole start_netconsole
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=1
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.1.1
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext4
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 2600/131068 bytes
PogoE02>
Re: Rescue System v2
March 30, 2015 05:52AM
nicco,

Your Arch rootfs must have been corrupted by the power outage. Take it to another Linux box and:

1. run fsck to repair the filesystem errors (if the stick is assigned as /dev/sdb1)
e2fsck /dev/sdb1
sync
sync

2. And try boot up the box again.

3. If it does not work, you will need to either restore this kernel file from a backup, or download Arch rootfs archive and copy it over:
/boot/uImage

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
u-boot & kernel booting process
backup and restore NAND mtds
bodhi's u-boot GitHub
bodhi's corner



Edited 2 time(s). Last edit at 03/30/2015 04:08PM by bodhi.
Re: Rescue System v2
March 30, 2015 05:58AM
@twinclouds,

> Will this rescue system work on Pogoplug Mobile?
> or we do have one for it?

You probably already figured this out? (the post is old). In case you did not attempt: no I dont' think it will work on the Pogo Moible.

-bodhi
===========================
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
u-boot & kernel booting process
backup and restore NAND mtds
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 03/30/2015 05:59AM by bodhi.
Re: Rescue System v2
March 30, 2015 01:59PM
bodhi Wrote:
-------------------------------------------------------
> nicco,
>
> Your Arch rootfs must have been corrupted by the
> power outage. Take it to another Linux box and:
>
> 1. run fsck to repair the filesystem errors (if
> the stick is mounted as /media/sdb1)
>
> e2fsck /media/sdb1
> sync
> sync
>

I agree with your assessment of the problem, bodhi, but in general, it's not a good idea to run fsck on a mounted file system. I would suggest unmounting the filesystem and then fscking the block device -- in this case it should be /dev/sdb1.
Re: Rescue System v2
March 30, 2015 02:16PM
Bodhi:
Thank you for your reply. I don't use it anyway.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: