Welcome! Log In Create A New Profile

Advanced

Reinstalling Debian on Dockstar

Posted by unmesh 
Reinstalling Debian on Dockstar
December 01, 2019 12:49AM
I dusted off my old Dockstar and can't find the USB stick that had Debian installed on it. The box boots into the Pogoplug OS and gets on the network but does not have the capability to install Debian on an attached USB stick that I could figure out. Is there a way to create a bootable USB for it?

The output of fw_printenv is:
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
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
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
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 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
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
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_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 $mtdparts $usb_custom_params
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/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:75:1A:AA:2F
arcNumber=2998

Thanks
Re: Reinstalling Debian on Dockstar
December 01, 2019 01:43AM
unmesh,

From the look of your envs, your u-boot must be circa 2011-2012 built by either by Jeff or davygravy.

So without changing any envs or having to install new u-boot, you can boot it with my released Debian buster rootfs: Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2.

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

Scrolldown to section:

Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

- tarball size: 209M
- install size: 536M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, sysvinit-utils, u-boot-tools, and mtd-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
cd8ad170aa1a9fdc2a0a1c43ab1c0721
sha256:
8ccbbced367b4c2bf3728262e882f8232aff0fecd1c0c767219a0cab49a0b9bf

Now, you are going to boot with older u-boot (2012), so you need to do Step 4 in the instruction:

Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync

And the bolded command above should be

cat dts/kirkwood-dockstar.dtb  >> zImage.fdt

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 01, 2019 11:10AM
It is davygravy's bootloader!

The prepared USB stick activity light blinks momentarily when plugged into the Dockstar and its LED stays a solid orange. It is not on the network.

The instructions said to do everything as root but I did this by booting an Ubuntu Live USB and using 'sudo su' in a Terminal

Also used 'e2label /dev/sdc1 rootfs' for the purpose of labeling

Maybe this explains the results?

Thanks



Edited 2 time(s). Last edit at 12/01/2019 11:32AM by unmesh.
Re: Reinstalling Debian on Dockstar
December 01, 2019 09:09PM
unmesh,

> The instructions said to do everything as root but
> I did this by booting an Ubuntu Live USB and using
> 'sudo su' in a Terminal

That would be OK. Because after that you are root user. To doublecheck:

whoami

> Also used 'e2label /dev/sdc1 rootfs' for the
> purpose of labeling

That is OK too!

It has been a long time so I forgot this change is also needed to boot with u-boot 2012, without messing with u-boot envs. Your u-boot envs are basically what Jeff/davygravy u-boot look like.

Back to Ubuntu and mount the USB rootfs.

If it was mounted at /media/sdb1,
cat /media/sdb1/etc/fstab
Expected output:
...
LABEL=rootfs     /             ext3    noatime,errors=remount-ro 0 1
...

Now change the root device to sda1

#LABEL=rootfs     /             ext3    noatime,errors=remount-ro 0 1
/dev/sda1   /             ext3    noatime,errors=remount-ro 0 1

Once it boots and after you have installed the new u-boot, you should restore it back to use the label rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 12/01/2019 09:11PM by bodhi.
Re: Reinstalling Debian on Dockstar
December 01, 2019 11:28PM
Didn't boot.

Does it matter which Dockstar USB port I use?
Re: Reinstalling Debian on Dockstar
December 02, 2019 03:47AM
unmesh,

> Didn't boot.
>
> Does it matter which Dockstar USB port I use?

It does not matter which port.

Let's verify what you did to create the new rootfs. If you have a log of that, please post (copy /paste the entire session here). And also list the /boot folder in reverse chronological order

ls -lart /media/sdb1/boot

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 02, 2019 10:45AM
'ls -lart'
total 55988
drwxr-xr-x 21 root root    4096 Feb 17  2015 ..
drwxr-xr-x  2 root root    4096 Aug 16 19:01 dts
-rwxr-xr-x  1 root root 4963616 Aug 17 22:43 zImage-5.2.9-kirkwood-tld-1
-rw-r--r--  1 root root  165790 Aug 18 00:24 config-5.2.9-kirkwood-tld-1
-rw-------  1 root root 4963616 Aug 18 00:27 vmlinuz-5.2.9-kirkwood-tld-1
-rw-------  1 root root 3101889 Aug 18 00:27 System.map-5.2.9-kirkwood-tld-1
-rw-r--r--  1 root root 9649570 Aug 18 00:38 linux-headers-5.2.9-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root 9713872 Aug 25 02:16 initrd.img-5.2.9-kirkwood-tld-1
-rw-r--r--  1 root root 4963680 Aug 25 02:22 uImage.orig
-rw-r--r--  1 root root 9713936 Aug 25 02:22 uInitrd
-rwxr-xr-x  1 root root 4973674 Dec  2 05:22 zImage.fdt
drwxr-xr-x  3 root root    4096 Dec  2 05:22 .
-rw-r--r--  1 root root 4973738 Dec  2 05:22 uImage

Regarding the creation of the boot USB, I will do it again later today and keep a detailed log. From memory, though, the steps in Ubuntu were:
Using fdisk, create a new dos partition table which is marked active with a single Linux partition (commands o n and w)
mkfs.ext3 to format this partition
e2label to label it rootfs
tar -xjf the 5.2.9 distribution
Create the new uImage with the dockstar dtb
sync
Unmount the USB and try to boot the Dockstar with it
Try again with fstab edited to /dev/sda1



Edited 2 time(s). Last edit at 12/02/2019 11:20AM by unmesh.
Re: Reinstalling Debian on Dockstar
December 02, 2019 05:31PM
unmesh,

The rootfs /boot folder looks fine!

Since you don't have serial console, we cannot see the bootlog. So we will have try to do it blind. If it were my new u-boot version then it would be much easier. Your installed u-boot is quite old, so I have forgotten some restrictions.

When you create the new rootfs, try using a much older version to get it to boot first. And let me find a version that has smaller kernel files.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 02, 2019 05:42PM
unmesh,

Try the Debian 4.4 rootfs.

https://forum.doozan.com/read.php?2,12096,12098#msg-12098

Scroll down to:

Quote

Updated 20 Feb 2016:

This Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is to keep in sync with kernel Linux-4.4.0-kirkwood-tld-1.

Basic minimal Debian Kirkwood rootfs for most Kirwood plugs:

- tarball size: 137M
- install size: 398M
- a basic jessie rootfs.
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
9f957e1dc5a36f90a285ab4615cb02fd
sha256:
d33349118e34bd078ca635cd2d6776f3e312accfc77d29da5870b9980add5c36

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 02, 2019 09:26PM
BTW, I took a closer look of your envs. You could also potentially boot back to stock OS.

To try that, unplug all USB drive, and leave ethernet connected. Power up and watch the LED light behavior, and post what you see here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 02, 2019 11:17PM
It does boot to stock OS. In fact, it was the first thing I checked when I powered it up!
Re: Reinstalling Debian on Dockstar
December 03, 2019 03:32AM
unmesh,

> It does boot to stock OS. In fact, it was the
> first thing I checked when I powered it up!

:) Sorry, I've overlooked that fact (not sure why). I've reread your first post and it was there.

Quote

The box boots into the Pogoplug OS


So boot to stock OS then just install the new u-boot from there.

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

And that for sure will boot with the Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 04, 2019 01:14AM
So I installed the latest u-boot but am still not able to boot either 5.2.9 or 4.4.0. In the latter case, /etc/fstab was showing '/dev/root ext2' so I used a USB stick formatted with ext2. I'm not doing a mkimage since it is a new bootloader

Since the activity light does not flash with either of the two rootfs's, there must be something more basic that I'm doing wrong. FWIW, these USB drives mount OK when booted to PogoOS.
Re: Reinstalling Debian on Dockstar
December 04, 2019 03:28AM
unmesh,

> So I installed the latest u-boot but am still not
> able to boot either 5.2.9 or 4.4.0. In the latter
> case, /etc/fstab was showing '/dev/root ext2' so I
> used a USB stick formatted with ext2. I'm not
> doing a mkimage since it is a new bootloader

Right!

> Since the activity light does not flash with
> either of the two rootfs's, there must be
> something more basic that I'm doing wrong. FWIW,
> these USB drives mount OK when booted to PogoOS.

Please post the log of the u-boot installation session (everything verbatim, don't describe what you do, I need to see the log to review it for you).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Reinstalling Debian on Dockstar
December 07, 2019 11:35AM
bodhi,

I'm going to be traveling for the next few weeks and will resume this when I get back.

Thanks for all your help.
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: