Welcome! Log In Create A New Profile

Advanced

Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian

Posted by puzzlednewbie 
Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 14, 2021 08:04PM
hi, I have a pogoplug e02 that had debian installed. But the flash drive was dead. I was thinking to reinstall debian by following the Pogoplug E02 Debian Linux Installation Guide. without usb attached, the Pogoplug E02 boot into "rescue:~# " after I type in root/root (user/password).
it's like this:
rescue:~#

As an linux newbie, I have been puzzled by "rescue:~# " for a long time. I was stuck and don't know what to do. Please help me out. BTW, I tried to ignore the "rescue:~# " thing and install the uboot. But I run into the following error message.
# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (45.77.104.33:80)
wget: not an http or ftp url: https://projects.doozan.com/uboot/valid-uboot.md5
grep: /tmp/valid-uboot.md5: No such file or directory
## Unknown uBoot detected on mtd0: e84a5fd0a0205bb79aed07c3c6fbd145
##
## The installer could not detect the version of your current uBoot
## This may happen if you have installed a different uBoot on
## /dev/mtd0 or if you have bad blocks on /dev/mtd0
##
## If you have bad blocks on mtd0, you should not try to install uBoot.
##
## Installation cancelled.
rm: can't remove '/tmp/valid-uboot.md5': No such file or directory

Please help me out, bodhi. I want to get out of "rescue:~# " and boot into "root:~# " after I input the user/password and re-install debian by following debian pogoplug installation guide.

Thanks



Edited 3 time(s). Last edit at 02/14/2021 08:08PM by puzzlednewbie.
Attachments:
open | download - root_structure.JPG (35.9 KB)
open | download - Unknown uBoot detected.JPG (128.4 KB)
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 14, 2021 10:07PM
puzzlednewbie,

It means you have installed Jeff's rescue system successfully. The rescue system resides on NAND. Booting without Debiann on USB will go straight into that system. It is a Debian Lenny OS with Linux kernel 2.6.xx.

Now you can go ahead and install new u-boot and latest Debian on USB. Do install both while you're logging in Rescue system, at the Linux shell prompt 'rescue:~#"

Install U-Boot (uboot.2017.07-tld-1.pogo_e02.mtd0.kwb)

https://forum.doozan.com/read.php?3,12381

Install Debian rootfs (Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2)

https://forum.doozan.com/read.php?2,12096

So look at these 2 threads, and post whatever questions you have.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 15, 2021 01:48PM
it looks like mission impossible to me. But I will try my best to work on it.

I run into problems on the first step. I am not able to download https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar

rescue:/tmp#  wget https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar
wget: not an http or ftp url: https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar

I also tried other link format, wget still could not download.

rescue:/tmp# wget https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar?raw=1
wget: not an http or ftp url: https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar?raw=1

rescue:/tmp# wget https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar?dl=1
wget: not an http or ftp url: https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar?dl=1

rescue:/tmp# wget https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar
wget: not an http or ftp url: https://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar

because I could not use wget to download, so I tranfer the file to the flash drive to install.

I have followed your suggested instruction: But I have following issues:


rescue:/tmp# /usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
uboot.2016.05-tld-1.environment.img: No such file or directory

I don't know what it means.

and also:


rescue:/tmp# /usr/sbin/nandwrite -s 786432 uboot.2017.07-tld-1.pogo_e02.mtd0.kwb
MEMGETINFO: Inappropriate ioctl for device

rescue:/tmp# /usr/sbin/nandwrite uboot.2017.07-tld-1.pogo_e02.mtd0.kwb
MEMGETINFO: Inappropriate ioctl for device

sorry if they look stupid. But as you know, I struggled to follow the guide by guessing.

here is the result of uBoot envs, is it correct? :

rescue:/tmp# fw_printenv
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
arcNumber=3542
machid=dd6

I have no idea what uBoot envs result means. Bodhi, Did I do it right? Can I reboot? or before rebooting, I should first install debian kirkwoord as you have suggested? Thanks



Edited 6 time(s). Last edit at 02/15/2021 02:55PM by puzzlednewbie.
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 15, 2021 03:02PM
I'm sure bodhi will be along to answer your other questions, but it appears your wget doesn't support HTTPS. Try:
wget http://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 15, 2021 04:45PM
puzzlednewbie,

> I have no idea what uBoot envs result means.
> Bodhi, Did I do it right? Can I reboot? or before
> rebooting, I should first install debian kirkwoord
> as you have suggested? Thanks


No, don't reboot.

When you install u-boot, you need to follow the instruction verbatim. As described, do Steps 1 to 11.

https://forum.doozan.com/read.php?3,12381

====

About the wget, try using the format

wget --no-check-certificate

Or just download the tarball to USB file, and bring it to the Pogo. You can also create the rootfs first

Quote

Install Debian rootfs (Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2)

https://forum.doozan.com/read.php?2,12096

And copy the u-boot tarball to it. That way when you are in Rescue system, you already got everyhting needed to proceed the installation

====

As you do u-boot installation Steps 1 to 11, if you see any error from the command, stop and post the entire log of what you did so far. Don't try to go to the next step.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 15, 2021 06:55PM
Both of the following two wget methods don't work. Same error message.
wget: not an http or ftp url:

wget http://www.dropbox.com/s/vgbshmiq3o14btp/uboot.2017.07-tld-1.pogo_e02.bodhi.tar
wget --no-check-certificate


Bodhi, I did exactly what you told me to do. the following is the uBoot envs. Is it good?
rescue:/tmp# fw_printenv
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3542
machid=dd6
ethaddr=52:3b:20:9c:11:51
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
dtb_file=/boot/dts/kirkwood-dockstar.dtb

I downloaded Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 into a flash drive. The flash drive mounted to /tmp/files

I tried to copy the Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 file to /boot folder, I received the following error message.

rescue:/tmp/files# cp Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 /boot
cp: can't create '/boot': Read-only file system

rescue:/tmp/files# ls /
bin   dev   etc   home  lib   mnt   opt   proc  root  sbin  sys   tmp   usr   var
there is no boot folder? What should I do now.



Edited 3 time(s). Last edit at 02/15/2021 09:03PM by puzzlednewbie.
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 15, 2021 10:26PM
puzzlednewbie,

As always, when you want me to double check what you did, please post the entire log of the session. Copy and paste everything on your terminal and post here.

The envs below look good, but unfinished. You did not follow exactly what the instruction said.

However, I cannot even say for certain whether you did it correctly without the entire log. Whether you have installed new u-boot correctly or installed the envs image correctly or not.


> Bodhi, I did exactly what you told me to do.
> the following is the uBoot envs. Is it good?

>
>
> rescue:/tmp# fw_printenv
> bootcmd_exec=run load_uimage; if run load_initrd;
> then if run load_dtb; then bootm $load_uimage_addr
> $load_initrd_addr $load_dtb_addr; else bootm
> $load_uimage_addr $load_initrd_addr; fi; else if
> run load_dtb; then bootm $load_uimage_addr -
> $load_dtb_addr; else bootm $load_uimage_addr; fi;
> fi
> bootcmd=run bootcmd_uenv; run scan_disk; run
> set_bootargs; run bootcmd_exec
> bootdelay=10
> bootdev=usb
> device=0:1
> devices=usb ide mmc
> disks=0 1 2 3
> ethact=egiga0
> if_netconsole=ping $serverip
> ipaddr=192.168.0.231
> led_error=orange blinking
> led_exit=green off
> led_init=green blinking
> load_dtb_addr=0x1c00000
> load_initrd_addr=0x1100000
> load_uimage_addr=0x800000
> load_dtb=echo loading DTB $dtb_file ...; load
> $bootdev $device $load_dtb_addr $dtb_file
> load_initrd=echo loading uInitrd ...; load
> $bootdev $device $load_initrd_addr /boot/uInitrd
> load_uimage=echo loading uImage ...; load $bootdev
> $device $load_uimage_addr /boot/uImage
> mainlineLinux=yes
> mtdids=nand0=orion_nand
> partition=nand0,2
> preboot_nc=run if_netconsole start_netconsole
> scan_disk=echo running scan_disk ...; scan_done=0;
> setenv scan_usb "usb start";  setenv scan_ide "ide
> reset";  setenv scan_mmc "mmc rescan"; for dev in
> $devices; do if test $scan_done -eq 0; then echo
> Scan device $dev; run scan_$dev; for disknum in
> $disks; do if test $scan_done -eq 0; then echo
> device $dev $disknum:1; if load $dev $disknum:1
> $load_uimage_addr /boot/uImage 1; then
> scan_done=1; echo Found bootable drive on $dev
> $disknum; setenv device $disknum:1; setenv bootdev
> $dev; fi; fi; done; fi; done
> serverip=192.168.0.220
> set_bootargs=setenv bootargs console=ttyS0,115200
> root=LABEL=rootfs rootdelay=10 $mtdparts
> $custom_params
> start_netconsole=setenv ncip $serverip; setenv
> bootdelay 10; setenv stdin nc; setenv stdout nc;
> setenv stderr nc; version;
> stderr=serial
> stdin=serial
> stdout=serial
> uenv_addr=0x810000
> uenv_import=echo importing envs ...; env import -t
> $uenv_addr $filesize
> uenv_init_devices=setenv init_usb "usb start"; 
> setenv init_ide "ide reset";  setenv init_mmc "mmc
> rescan"; for devtype in $devices; do run
> init_$devtype; done;
> uenv_load=run uenv_init_devices; setenv
> uenv_loaded 0; for devtype in $devices;  do for
> disknum in 0; do run uenv_read_disk; done; done;
> uenv_read_disk=if test $devtype -eq mmc; then if
> $devtype part; then run uenv_read;  fi; else if
> $devtype part $disknum; then run uenv_read; fi; 
> fi
> uenv_read=echo loading envs from $devtype $disknum
> ...; if load $devtype $disknum:1 $uenv_addr
> /boot/uEnv.txt; then setenv uenv_loaded 1; fi
> usb_ready_retry=15
> arcNumber=3542
> machid=dd6
> ethaddr=52:3b:20:9c:11:51
> mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
> bootcmd_uenv=run uenv_load; if test $uenv_loaded
> -eq 1; then run uenv_import; fi; sleep 3
> dtb_file=/boot/dts/kirkwood-dockstar.dtb
> 
>

Looks OK, but unfinished.


> I downloaded
> Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> into a flash drive. The flash drive mounted to
> /tmp/files

>

> I tried to copy the
> Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> file to /boot folder, I received the following
> error message.

Not correct. Follow the instruction in the rootfs release thread and create a USB rootfs

Scroll down to

Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

And do Steps 1 to 5.

After that, you have a rootfs on USB.

You can create the USB rootfs on another Linux machine, or inside Rescue system. But it is separate from what you need to do to install u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 16, 2021 08:20AM
thanks, Bodhi.

But the pogoplug could not restart again. the light keep blinking in yellow. I could not find it's IP on my router anymore. I have been working on it for weeks by guessing and imagination. Finally it's over.

Thanks for the help though.
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 16, 2021 09:16AM
your envs are not correct, for start

Mount usb drive on other linux box

the easiest way was just to make a copy the environment variables from the "uboot.2016.05-tld-1.environment.bodhi.tar"

and just make a new uEnv.txt from it. cp uboot.2016.05-tld-1.environment /boot/uEnv.txt

make a regular(step 4a) new uImage and uInitrd on your linux box


this worked for me, otherwise you have to resort to serial console and get into the uboot shell, since its only a matter of the envs first.


the easiest way is via an other linux box or Raspberry pi (since it already has 2 serial ports, 1: 3.3v and 1: 5v. (i have RPI1 and ttyAMA0 can be enabled through raspi-config. or use usb-serial adapter.

then use kwboot as portable serial terminal without the image injection, or install screen: screen /dev/ttyAMA0 115200 and connect pins 14-15-16 (GND/TX/RX)
Re: Pogoplug e02 boot into rescue:~# after login, please help to reinstall debian
February 16, 2021 04:33PM
puzzlednewbie,

> But the pogoplug could not restart again. the
> light keep blinking in yellow.

When it binks yellow, it means that u-boot has started (ie. your u-boot installation is most defitnitely successful). But it could find the kernel files on your USB rootfs.

So if you'd like to continue, I will help to get it booting.

Make sure you create the USB rootfs correctly. Use a different Linux host to do this (any Linux laptop or dekstop would be fine ). Follow the instruction in the rootfs creation. And post the entire session log while you are doing that (Copy everything on your terminal on that Linux host) and post the log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: