Welcome! Log In Create A New Profile

Advanced

I installed Rescue System, now I can't boot into anything.

Posted by Cassie 
I installed Rescue System, now I can't boot into anything.
January 24, 2013 01:02AM
I had my GoFlex Home working on USB, but then I installed the Rescue System into NAND using Jeff's script. I tried to reboot into the Rescue System , but the green light just kept flashing, after about an hour, I tried to boot from first my Debian USB, then My Arch Linux USB. in both cases green light went solid, but the light on the USB stick kept flashing non stop.

I haven't been able to get netconsole, and I don't know what the IP is, since it changed every boot (so did the MAC address). This is what my fw_env loooked like before I rebooted.
ddr_rd="0x1100000"
arcNumber="3338"
baudrate="115200"
boot_auto="rd_args='rootfstype=auto'; run boot_rdaddr_kern=0x680000"
boot_kern="run set_bootargs; bootm \$addr_kern"
boot_rd="run set_bootargs; bootm \$addr_kern \$addr_rd"
bootdelay="3"
chain="nand read.e 0x800000 0x480000 0x80000; go 0x800200"
console="ttyS0,115200"
ethact="egiga0"
ethaddr="02:50:43:26:87:63"
ext2_auto="ext2load \$boot_dev \$addr_rd /boot/uInitrd"
ext2_boot="run ext2_rd boot_rd; run ext2_auto boot_auto; run boot_kern"
ext2_kern="ext2load \$boot_dev \$addr_kern /boot/uImage"
ext2_rd="ext2load \$boot_dev \$addr_rd /uInitrd"
fast_boot="run fast_rd ubi_args ubi_fallback"
fast_rd="ubifsmount fast; ubifsload \$addr_rd /uInitrd"
fat_boot="run fat_rd boot_rd"
fat_kern="fatload \$boot_dev \$addr_kern /boot/uImage"
fat_rd="fatload \$boot_dev \$addr_rd /uInitrd"
hd_args_0="boot_dev='ide 0:1'; dev_args='root=/dev/sda1'"
hd_args_1="boot_dev='ide 1:1'; dev_args='root=/dev/sdb1'"
hd_boot="run ide_start; for scan in 0 1; do run hd_args_\$scan ext2_kern ext2_boot; run ext2_rd ubi_fallback; run fat_kern fat_boot; run fat_rd ubi_fallback; done"
ide_start="ide reset"
led_error="orange blinking"
led_exit="green off"
led_init="green blinking"
mtddevname="u-boot"
mtddevnum="0"
mtdids="nand0=orion_nand"
mtdparts="mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(pogoplug),-(root)"
nc_start="setenv stdin nc; setenv stdout nc; setenv stderr nc; version"
nc_test="ping \$ncip"
ipaddr="10.0.1.14"
ncip="10.0.1.13"
ncipk="10.0.1.12"
serverip="10.0.1.11"
stderr="nc"
stdin="nc"
stdout="nc"
partition="nand0,0"
preboot="run ubi_start silent_boot; run nc_test nc_start; run usb_start"
rescue="dev_args='ubi.mtd=root rootfstype=preboot'; boot_dev='usb 0:1'; run ext2_kern ext2_auto boot_rd; boot_dev='ide 0:1'; run ide_start ext2_kern ext2_auto boot_rd; run silent_rd ubi_fallback; run fast_rd ubi_fallback; run ubi_rd ubi_fallback"
set_bootargs="setenv bootargs console=\$console \$mtdparts \$dev_args \$rd_args netconsole=@\$ipaddr/eth0,@\$ncipk/"
silent_boot="run silent_rd ubi_args ubi_fallback"
silent_rd="ubifsmount silent; ubifsload \$addr_rd /uInitrd"
ubi_args="dev_args='ubi.mtd=root'"
ubi_boot="run ubi_rd ubi_args ubi_fallback"
ubi_fallback="run ubi_kern boot_rd"
ubi_kern="ubifsmount boot; ubifsload \$addr_kern /boot/uImage"
ubi_rd="ubifsmount ramdisk; ubifsload \$addr_rd /uInitrd"
ubi_start="ubi part root"
usb_args_0="boot_dev='usb 0:1'; dev_args='root=/dev/sda1 rootdelay=10'"
usb_args_1="boot_dev='usb 1:1'; dev_args='root=/dev/sdb1 rootdelay=10'"
usb_args_2="boot_dev='usb 2:1'; dev_args='root=/dev/sdc1 rootdelay=10'"
usb_args_3="boot_dev='usb 3:1'; dev_args='root=/dev/sdd1 rootdelay=10'"
usb_boot="for scan in 0 1 2 3; do run usb_args_\$scan ext2_kern ext2_boot; run ext2_rd ubi_fallback; run fat_kern fat_boot; run fat_rd ubi_fallback;done"
usb_start="usb start"
bootcmd="addr_kern='0x800000'; run fast_boot; run hd_boot; run usb_boot; run ubi_boot;"

Is there any way I can get into it with nc? My deskop IP is 10.0.1.11, and at the time that I fw_setenv, the IP of the GoFlex was 10.0,14 Please tell me exactly what I need to enter in my terminal.



Edited 2 time(s). Last edit at 01/24/2013 01:06AM by Cassie.
Re: I installed Rescue System, now I can't boot into anything.
January 24, 2013 02:39AM
Try following this instruction:
http://forum.doozan.com/read.php?3,14

Sometime the 2nd command needs to be changed slightly as:
nc -up 6666 192.168.1.100 6666



Edited 1 time(s). Last edit at 01/24/2013 05:06AM by bodhi.
Re: I installed Rescue System, now I can't boot into anything.
January 24, 2013 04:35AM
bodhi Wrote:
-------------------------------------------------------
> Try following this instruction:
> http://forum.doozan.com/read.php?3,14
>
That was the first thing I did, when I got my system running.
bash $ nc -l -u -p 6666
usage: nc [-46CDdhklnrtUuvz] [-b boundif] [-i interval] [-p source_port]
	  [-s source_ip_address] [-w timeout] [-X proxy_version]
	  [-x proxy_address[:port]] [hostname] [port[s]]
> Sometime the 2nd command needs to be changed
> slightly as:
> nc -up 666 192.168.1.100 6666
I difn't get the first one workung,

Also 192.168.1.100 isn't in my subnet., look at the output above. Which is the correct IP to use, and is 6666 the right port?
Re: I installed Rescue System, now I can't boot into anything.
January 24, 2013 05:15AM
Sorry about the typo, it should be 6666.
nc -up 6666 192.168.1.100 6666

The Ip address 192.168.1.100 is just an example. Quoting Jeff:
This assumes that your desktop machine has an ip address of 192.168.1.2 and that the Dockstar is okay to use IP address 192.168.1.100. You'll probably need to adjust these to something appropriate for your network.

IP address 192.168.1.2 is the serverip (where you run the nc command to monitor what coming out of the GoFlex Home. The GoFlex Home itself in this example is 192.168.1.100.

These statements were executed on the GoFlex Home in this example:
fw_setenv serverip 192.168.1.2
fw_setenv ipaddr 192.168.1.100

So you can adjust these numbers to whatever you like in your network.
Re: I installed Rescue System, now I can't boot into anything.
January 24, 2013 02:34PM
Yes I know that thise are examples. My point is that I don't know how to make a 1 to 1 correlation with my IP's from the fw_printenv the output:
ethaddr="02:50:43:26:87:63"
...
> ipaddr="10.0.1.14"
> ncip="10.0.1.13"
> ncipk="10.0.1.12"
...

And on each boot, the GoFlex had a different MAC address and IP :
MAC address                     IP
D8:30:62:4D:8D:49            10.0.1.07
7C:D6:62:75:85:E9            10.0.1.14
28:E7:CF:DC:38:87            10.0.1.25
E4:64:D9:32:48:27            10.0.1.16

I also don't know what the 6666 is. Is it a fixed port, thats always 6666, is it the value of an env variable, or is it something asigned by my desktop/routeer?

And how do I get around nc not letting me use both -l and -p ? I tried nc -l -u 6666 . I didn't get an error but i didn't get any data either.

NC(1)                     BSD General Commands Manual                    NC(1)

NAME
     nc -- arbitrary TCP and UDP connections and listens

SYNOPSIS
     nc [-46DCdhklnrtUuvz] [-b boundif] [-i interval] [-p source_port] [-s source_ip_address] [-w timeout] [-X proxy_protocol] [-x
        proxy_address[:port]] [hostname] [port[s]]
....
     -l      Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host.  It is an
             error to use this option in conjunction with the -p, -s, or -z options.  Additionally, any timeouts specified with the -w option
             are ignored.
...
    -p source_port
             Specifies the source port nc should use, subject to privilege restrictions and availability.  It is an error to use this option
             in conjunction with the -l option.
...



Edited 1 time(s). Last edit at 01/24/2013 09:23PM by Cassie.
Re: I installed Rescue System, now I can't boot into anything.
February 12, 2013 07:10PM
I am now using a serial connection. When I attemp to boot the Rescue System, this is as far as I can get:
SoC:   Kirkwood 88F6281_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** 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..

Reset IDE: ide_preinit failed
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.3.2-kirkwide
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3627768 Bytes = 3.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
I get similar results whether trying to boot the Rescue System, or if I try to boot off SATA or USB.

Below is my current environment:
arcNumber=3338
baudrate=115200
bootcmd=run bootcmd_usb; usb stop; run bootcmd_sata; run bootcmd_pogo; reset
bootcmd_pogo=run bootcmd_rescue
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootcmd_sata=run sata_init; run sata_load_uimage; run set_bootargs_sata; run sata_boot;
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=02:50:43:26:87:63
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0 orion_nand
mtdparts=mtdparts orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
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
rescue_installed=1
sata_boot=if ext2load ide $sata_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
sata_device=0:1
sata_init=ide reset
sata_load_uimage=mw 0x800000 0 1; ext2load ide $sata_device 0x800000 /boot/uImage
sata_root=/dev/sda1
sata_rootdelay=8
sata_rootfstype=ext2
set_bootargs_rescue=setenv bootargs console $console ubi.mtd 2 root ubi0:rootfs ro rootfstype ubifs $mtdparts
set_bootargs_sata=setenv bootargs console $console root $sata_root rootdelay $sata_rootdelay rootfstype $sata_rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console $console root $usb_root rootdelay $usb_rootdelay rootfstype $usb_rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start; setenv usb_root LABEL rootfs
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2
Re: I installed Rescue System, now I can't boot into anything.
February 12, 2013 10:01PM
Cassie,

There are a few things:

- The correct syntax to set rootfs label is "setenv usb_root LABEL=rootfs". BTW, this is not applicable to Arch, it only works on Debian (i.e. system with initrd).

- Make sure the USB stick is formatted Ext2. If you ran the installation script at the ALARM stie, the Arch stick is Ext3. So you need to convert it to Ext2 (remove journal) in order to boot with current setting of uBoot env (usb_rootfstype=ext2). Check your Debian stick format too.

- Mount the stick on another Linux box and run e2fsck to check errors and fix them it necessary.

- Reboot with only the USB stick connected.
Re: I installed Rescue System, now I can't boot into anything.
February 13, 2013 12:25AM
bodhi Wrote:
-------------------------------------------------------
> Cassie,
>
> There are a few things:
>
> - The correct syntax to set rootfs label is
> "setenv usb_root LABEL=rootfs". BTW, this is not
> applicable to Arch, it only works on Debian (i.e.
> system with initrd).
>
> - Make sure the USB stick is formatted Ext2. If
> you ran the installation script at the ALARM stie,
> the Arch stick is Ext3. So you need to convert it
> to Ext2 (remove journal) in order to boot with
> current setting of uBoot env
> (usb_rootfstype=ext2). Check your Debian stick
> format too.
>
> - Mount the stick on another Linux box and run
> e2fsck to check errors and fix them it necessary.
>
> - Reboot with only the USB stick connected.
I did the folllowing, now I can boot from USB and rescue
env default -f 
setenv arcNumber 3338
setenv set_bootargs_rescue 'setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts'
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



Edited 1 time(s). Last edit at 02/13/2013 08:07AM by Cassie.
Re: I installed Rescue System, now I can't boot into anything.
February 17, 2013 09:09AM
bodhi Wrote:
-------------------------------------------------------
> - Make sure the USB stick is formatted Ext2. If
> you ran the installation script at the ALARM stie,
> the Arch stick is Ext3. So you need to convert it
> to Ext2 (remove journal) in order to boot with
> current setting of uBoot env
> (usb_rootfstype=ext2).

I believe (and in the past I've successfully done this) that it is OK to mount an ext3 FS as ext2. The one caveat is that you need to ensure that the logs have been rolled before doing so. An fsck should accomplish this.
Re: I installed Rescue System, now I can't boot into anything.
February 17, 2013 02:43PM
restamp Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > - Make sure the USB stick is formatted Ext2. If
> > you ran the installation script at the ALARM
> stie,
> > the Arch stick is Ext3. So you need to convert
> it
> > to Ext2 (remove journal) in order to boot with
> > current setting of uBoot env
> > (usb_rootfstype=ext2).
>
> I believe (and in the past I've successfully done
> this) that it is OK to mount an ext3 FS as ext2.
> The one caveat is that you need to ensure that the
> logs have been rolled before doing so. An fsck
> should accomplish this.

Of course, you're right! I did try it too, and it worked for me most of the time. The other time, when there was problem booting, must have been because I did not do fsck! Thanks.
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: