Welcome! Log In Create A New Profile

Advanced

Upgrading to Debian stretch

Posted by bodhi 
Upgrading to Debian stretch
July 18, 2017 10:59PM
Ugrading to Debian stretch

This is a brief instruction about how to upgrade to Debian stretch from jessie. It also applicable to all other Debian version upgrade, i.e wheezy to jessie, stretch to the future Debian stable version.

I assume you are currently running one of my customed kernel release linux-image-xx.xx.xx-kirkwood-tld-xx from this thread. This is the reason for this post, since upgrading to the next Debian release while running a customed kernel could potentially cause some out-of-sync in the boot files. The following are 2 sections, one of them might be applicable to your system. And also see Note (section 3) at the end for how to solve possible error during upgrade. If needed in the furture, I will add more sections to this post to cover some special cases.

1. Have installed only my released kernel images

Your system is running only my released kernel linux-image-xx.xx.xx-kirkwood-tld-xx. It has never been upgraded to mainline kernel or previously running mainline kernel. Usually because you started with my released rootfs from this thread.

Back up your rootfs before starting the following steps.

a. Update the apt source list to stretch. Your source should look like the following. Note that it is a good idea to adjust the repo to near your locale, and use ftp where available.

cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian stretch main
deb-src http://ftp.us.debian.org/debian stretch main

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src  http://security.debian.org/ stretch/updates main contrib non-free

deb     http://http.debian.net/debian stretch-updates main contrib
deb-src http://http.debian.net/debian stretch-updates main contrib


b. Run full upgrade (or you can choose to do minimal upgrade with step c).

apt-get update
apt-get dist-upgrade


c. Skip this if you've chosen step b. Run minimal upgrade if you want to do it slow, and then update to stretch for certain packages in the future when necessary. This is OK to do if you don't care much about having your system running every latest Debian package versions (there are a lot of packages that you might never use).

apt-get update
apt-get upgrade

d. Check fstab before rebooting. Debian stretch now has stricter rules, and rejects the old syntax in fstab. So if your rootfs still has the old entry like this
/dev/root      /               ext3    noatime,errors=remount-ro 0 1

Then edit /media/sdb1/etc/fstab entry for root device to the new syntax to use the rootfs label:
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1

e. Usually a distribution upgrade like this would result in a new initramfs. So regenerate the uInitrd boot file. See section 4 in my kernel/rootfs installation for how to recreate uInitrd. It should look like this example:

cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.11.3-kirkwood-tld-2 -d initrd.img-4.11.3-kirkwood-tld-2 uInitrd


2. Have installed a mix of my released kernel images and mainline kernel images

Your system is running my released kernel linux-image-xx.xx.xx-kirkwood-tld-xx, and also you had previously installed and run some mainline kernel in this system. Usually because you started with a Debian installation (e.g. Debian netboot, Debian CD,…).

Back up your rootfs before starting the following steps.

a. Update the apt source list to stretch. Your source should look like the following. Note that it is a good idea to adjust the repo to near your locale, and use ftp where available.

cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian stretch main
deb-src http://ftp.us.debian.org/debian stretch main

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src  http://security.debian.org/ stretch/updates main contrib non-free

deb     http://http.debian.net/debian stretch-updates main contrib
deb-src http://http.debian.net/debian stretch-updates main contrib

b. Remove all mainline kernels that have been installed. Check for previous versions:

dpkg -l | grep -i linux-image

and purge each of these linux-image when you found them. The image name would indicate a mainline kernel when there is no -kirkwood-tld-xx postfix.

dpkg —purge linux-image-xx.xx.xx

c. Run full upgrade (or you can choose to do minimal upgrade with step c).

apt-get update
apt-get dist-upgrade

d. Skip this if you've chosen step b. Run minimal upgrade if you want to do it slow, and then update to stretch for certain packages in the future when necessary. This is OK to do if you don't care much about having your system running every latest Debian package version (there are a lot of packages that you might never use).

apt-get update
apt-get upgrade

e. Check fstab before rebooting. Debian stretch now has stricter rules, and rejects the old syntax in fstab. So if your rootfs still has the old entry like this
/dev/root      /               ext3    noatime,errors=remount-ro 0 1

Then edit /media/sdb1/etc/fstab entry for root device to the new syntax to use the rootfs label:
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1

f. Usually a distribution upgrade like this would result in a new initramfs. So regenerate the uInitrd boot file. See section 4 in my kernel/rootfs installation for how to recreate uInitrd. It should look like this example:

cd /boot
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.11.3-kirkwood-tld-2 -d initrd.img-4.11.3-kirkwood-tld-2 uInitrd


3. Note:

a. Public Key error because of old Debian keyring.

If you encountered key error while running apt-get update:

Quote

W: There is no public key available for the following key IDs:

So install new keyring for stretch:

apt-get install debian-keyring debian-archive-keyring

And then resume the upgrade with apt-get update again.


b. Rootfs mounting syntax change in fstab cause problem during booting.

See section 1d or 2e above, if you encounters problem mounting rootfs.


c. NFS rootfs booting problem.

Debian stretch has a behavioral change in NFS server: it will not provide NFS V2 protocol by default, and u-boot had always been using NFS V2 to load the kernel from the rootfs. The later u-boot versions in 2017 has finnally got V3 capability (It will be available when I release new u-boots for 2017).

See tsunulukai's solution about how to set the nfs server to accept NFS v2:
http://forum.doozan.com/read.php?3,12261,35307#msg-35307

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



Edited 3 time(s). Last edit at 08/07/2017 05:16PM by bodhi.
Re: Upgrading to Debian stretch
July 19, 2017 06:55AM
Thanks @bodhi :)

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com
Armin
Re: Upgrading to Debian stretch
July 20, 2017 12:28AM
Hello bodhi, will you release a stretch rootfs?
Re: Upgrading to Debian stretch
July 20, 2017 01:23AM
Armin Wrote:
-------------------------------------------------------
> Hello bodhi, will you release a stretch rootfs?

I will, sometime in the next few days!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Upgrading to Debian stretch
July 23, 2017 04:47AM
I've seen that during several updates from Debian Jessie to Stretch and later "/var/cache/man" isn't accessible so the following should be done
before "apt(-get) upgrade":

rm -fr /var/cache/man

The man page db gets recreated /rebuilt during update so there is no harm
Re: Upgrading to Debian stretch
July 23, 2017 11:36PM
pengu,

I did not see that in my system. Wonder why yours have that folder inacessible.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Upgrading to Debian stretch
July 26, 2017 06:53PM
There might some problem with NFS rootfs, after all. I've posted here in the kernel thread:

http://forum.doozan.com/read.php?2,12096,35646#msg-35646

The upgraded new nfs-server seems to have some behavioral changes that could cause problem with older u-boot "nfs" command. If you use tftp command to load the kernel then it seems to be OK.

So if you are seeing problem with u-boot loading kernel from NFS rootfs after a reboot, this might be it.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Upgrading to Debian stretch
July 26, 2017 09:55PM
I think the problem is that Debian stretch has changed the default to NFS v3. We need to add a switch to tell it to accept NFS v2 (which is what older u-boot used).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Upgrading to Debian stretch
July 27, 2017 02:30AM
And here is tsunulukai's solution to try if you have trouble loading and booting you NFS rootfs after upgrading to stretch:

http://forum.doozan.com/read.php?3,12261,35307#msg-35307

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Upgrading to Debian stretch
August 07, 2017 05:05PM
I've revised step 1d and 2e in the 1st post. Also added tsunulukai's solution for NFS rootfs booting problem after upgrading to stretch.

-bodhi
===========================
Forum Wiki
bodhi's corner
Tom74
Re: Upgrading to Debian stretch
January 14, 2018 07:16AM
I have a problem with a dependency and I can't resolve it automatically.

apt-get -f install

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libbz2-1.0
1 upgraded, 0 newly installed, 0 to remove and 192 not upgraded.
Need to get 43,4 kB of archives.
After this operation, 33,8 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 21908 files and directories currently installed.)
Preparing to replace libbz2-1.0 1.0.5-6+squeeze1 (using
.../libbz2-1.0_1.0.6-8.1_armel.deb) ...
dpkg: error processing
/var/cache/apt/archives/libbz2-1.0_1.0.6-8.1_armel.deb (--unpack):
triggers ci file contains unknown directive `activate-noawait'
configured to not write apport reports
Errors were encountered while processing:
/var/cache/apt/archives/libbz2-1.0_1.0.6-8.1_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What can I do to solve the issue?

-Tom
Re: Upgrading to Debian stretch
January 14, 2018 05:13PM
Is your dpkg up to date?
Re: Upgrading to Debian stretch
January 14, 2018 07:06PM
aptitude can sometime resolve issues have you tried it?
Tom74
Re: Upgrading to Debian stretch
January 20, 2018 03:44AM
Just another additional question.

I have the following uboot version on my dockstar:

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:  5

Can I use this version? Or do I need to update to a newer uboot version?

Like 2017.07 U-Boot Kirkwood

-Tom
Re: Upgrading to Debian stretch
January 20, 2018 04:48AM
Tom,

> I have the following uboot version on my
> dockstar:
>
>
> 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:  5
>

It will work. But you will need to have the DTB appended to uImage as instructed:

Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip 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-4.12.1-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-4.12.1-kirkwood-tld-1 -d zImage.fdt uImage
sync

If your Linux box does not have mkimage, then install it

apt-get install u-boot-tools

-bodhi
===========================
Forum Wiki
bodhi's corner
Tom74
Re: Upgrading to Debian stretch
January 20, 2018 07:29AM
Ok. But I think it makes sense that I update to the latest version.

My system on the Dockstar is rather old:

1. U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
2. Kernel: 3.9.5-dockstar-goflex-shyd
3. Debian 6 (squeeze)

What's the best way /path to upgrade to the actual system?

[2017.07 U-Boot Kirkwood, linux-4.14.1-kirkwood-tld-1-bodhi kernel, Debian 9 (stretch)]

Will this work?

Update uboot to latest 2017.07 version. Then boot with old Kernel: 3.9.5 and then update Debian and kernel.

Any suggestions?

Thank you.

-Tom
Re: Upgrading to Debian stretch
January 20, 2018 08:52AM
>
> Update uboot to latest 2017.07 version. Then boot
> with old Kernel: 3.9.5 and then update Debian and
> kernel.
>

This is a good plan.

But in order to run the new u-boot with your existing rootfs, you need to check your rootfs for kernel files and Dockstar DTB file to make sure it will be bootable.

I am not famiilar with this kernel: 3.9.5-dockstar-goflex-shyd. So you will need to make sure that your rootfs /boot folder conform to the structure in my release rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (24 Jul 2017).

-bodhi
===========================
Forum Wiki
bodhi's corner
Tom74
Re: Upgrading to Debian stretch
January 20, 2018 09:41AM
Hello bodhi,

thank you for your answer.

It seems it's not so easy to update my old system to a recent one.

Now I am a bit scared if my dockstar will ever boot again after uboot update.

I haven't done anything right now...

Or is there some easier way to update the system?

Where should I start? I am a little helpless at the moment... sorry :(

regards
Tom
Re: Upgrading to Debian stretch
January 20, 2018 04:50PM
Tom,

> Now I am a bit scared if my dockstar will ever
> boot again after uboot update.
>
> I haven't done anything right now...
>
> Or is there some easier way to update the system?

The easy way is

1. Clone your USB drive rootfs to another new USB drive. Test boot it.

2. Use the new rootfs drive and update the kernel using linux-4.14.1-kirkwood-tld-1-bodhi.tar.bz2 (25 Nov 2017).

Quote

Updated 25 Nov 2017:

Kernel linux-4.14.1-kirkwood-tld-1 package has been uploaded.

New/update in this version:

- Modified NSA3xx boxes DTS files to set system LED to green right after the kernel has booted.


Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.14.1-kirkwood-tld-1-bodhi.tar.bz2

md5:
b2370e95e316d619dc3e075c04fb0cda
sha256:
33bb76dc0e1072d681ae68ce1a5e9952b434f4d1dac51baf412fa2c6cb8ec127

And remeber to check the hash of what you download, as always!

Installation:

Please use the same installation instruction in kernel 4.13.5-kirkwood-tld-1 (Updated 10 Oct 2017) below. Simply replace 4.13.5-kirkwood-tld-1 with 4.14.1-kirkwood-tld-1 in the instruction.


Since you are booting with old u-boot, you need to append the Dockstar DTB to uImage in the new rootfs. This way you don't need update any u-boot envs.

If it does not work and if you mess up, you can just reformat the new drive and reclone your current rootfs to it and start fresh again. Always test using the cloned drive, not your current drive.

Get this working first and then think about if you want to update u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Tom74
Re: Upgrading to Debian stretch
January 28, 2018 10:56AM
Hello,

now I have updated the kernel but it won't boot completely.

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... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
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: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
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:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
3887004 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
5132202 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.14.1-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3886940 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.14.1-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5132138 Bytes = 4.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

The led is amber, not flashing.

Seems like the root filesystem can't be mounted, or?

So what can I do?

best regards

-Tom
Re: Upgrading to Debian stretch
January 28, 2018 11:18AM
Tom,

Interrupt netconsole at countdown

> Hit any key to stop autoboot: 0

And

printenv

Please post the entire log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Tom74
Re: Upgrading to Debian stretch
January 28, 2018 11:35AM
u-boot>> printenv
printenv
arcNumber=2097
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootcmd_pogo=run bootcmd_rescue
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=00:10:75:1A:B8:8D
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.0.16
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)
ncip=192.168.0.1
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.0.1
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
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=ext2
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: 2839/131068 bytes
u-boot>>
Tom74
Re: Upgrading to Debian stretch
January 28, 2018 11:43AM
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs      /               ext2    noatime,errors=remount-ro 0 1
/dev/sda2      none            swap    sw                0       0
tmpfs          /tmp            tmpfs   defaults          0       0

Re: Upgrading to Debian stretch
January 28, 2018 12:58PM
Tom,

It is a classic problem with having multiple partitions in the system. The new u-boot will take care of that with the envs. You are runing old u-boot so you need to change a few envs to ensure the booting is correct.

Interupt netconsole at count down and run

setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params'
boot

After you have tested this a couple times, you can set it permanently in Debian (with fw_setenv), but first let's make sure that it boots consistenly.

-bodhi
===========================
Forum Wiki
bodhi's corner
Tom74
Re: Upgrading to Debian stretch
January 28, 2018 01:35PM
Bodi,

still not working with the usb_set_bootargs env-variable.

setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params'

u-boot>> printenv

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=ext2
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=LABEL=rootfs rootdelay=$usb_rootdelay $mtdparts $usb_custom_params

Boot proccess...

u-boot>> boot
boot
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
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: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
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:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
3887004 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
5132202 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.14.1-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3886940 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.14.1-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5132138 Bytes = 4.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

The LED is still amber and did not change to green.

-Tom
Re: Upgrading to Debian stretch
January 28, 2018 01:58PM
Tom,

> The LED is still amber and did not change to
> green.

Ah. The kernel has not even finish starting. Double check your rootfs kernel files (and also rootfs partition while we are at it).

Mount it on another Linux box and assuming it is mountd at /media/sdb1

e2label /dev/sdb1
mount
cd /media/sdb1
ls -lart /boot

Look at the kernel files in /boot. Do they look correct?

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



Edited 1 time(s). Last edit at 01/28/2018 01:58PM by bodhi.
Re: Upgrading to Debian stretch
January 28, 2018 02:20PM
bodhi,

sorry for the typo before... I have seen it right now...

Files look good in /boot

-rw-r--r--  1 root root   107471 Apr 25  2012 config-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  1672696 Apr 25  2012 vmlinuz-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  1225355 Apr 25  2012 System.map-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  6637098 Mai 19  2012 initrd.img-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  1672760 Mai 19  2012 uImage3.3.3
-rw-r--r--  1 root root  6637162 Mai 19  2012 uInitrd3.3.3
-rw-r--r--  1 root root   116421 Jun  9  2013 config-3.9.5-dockstar-goflex-shyd
-rw-r--r--  1 root root  1813672 Jun  9  2013 vmlinuz-3.9.5-dockstar-goflex-shyd
-rw-r--r--  1 root root  1355475 Jun  9  2013 System.map-3.9.5-dockstar-goflex-shyd
-rw-r--r--  1 root root  6768340 Mai 17  2015 initrd.img-3.9.5-dockstar-goflex-shyd
drwxr-xr-x 21 root root     4096 Mai 17  2015 ..
-rw-r--r--  1 root root  1813736 Mai 17  2015 uImage.orig
drwxr-xr-x  2 root root     4096 Nov 13 22:50 dts
-rwxr-xr-x  1 root root  3876536 Nov 23 08:40 zImage-4.14.1-kirkwood-tld-1
-rw-r--r--  1 root root   155284 Nov 23 23:41 config-4.14.1-kirkwood-tld-1
-rw-------  1 root root  2567975 Nov 24 00:33 System.map-4.14.1-kirkwood-tld-1
-rw-------  1 root root  3876536 Nov 24 00:33 vmlinuz-4.14.1-kirkwood-tld-1
-rw-r--r--  1 root root 18713922 Nov 24 00:38 linux-image-4.14.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root  8731958 Nov 24 00:56 linux-headers-4.14.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root  1280000 Nov 24 06:48 linux-dtb-4.14.1-kirkwood-tld-1.tar
-rw-r--r--  1 root root   143484 Nov 25 23:59 linux-4.14.1-kirkwood-tld-1.patch
-rw-r--r--  1 root root 31580821 Jan 28 14:36 linux-4.14.1-kirkwood-tld-1-bodhi.tar.bz2
-rw-r--r--  1 root root  5132138 Jan 28 14:40 initrd.img-4.14.1-kirkwood-tld-1
-rwxr-xr-x  1 root root  3886940 Jan 28 14:42 zImage.fdt
-rw-r--r--  1 root root  3887004 Jan 28 14:46 uImage
drwxr-xr-x  3 root root     4096 Jan 28 14:46 .
-rw-r--r--  1 root root  5132202 Jan 28 15:02 uInitrd

e2label /dev/sdb1

shows nothing...

sudo e2label /dev/sdb1

What's next?

-Tom
Re: Upgrading to Debian stretch
January 28, 2018 04:51PM
Tom,

You should always post the log in context. That means including the command themselve (and importantly the mount command).

This time do these:
e2label /dev/sdb1
mount
df -h
cd /media/sdb1
ls -lart boot

Please copy/paste the whole terrminal session log for the above commands here.

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



Edited 1 time(s). Last edit at 01/28/2018 04:52PM by bodhi.
Re: Upgrading to Debian stretch
January 29, 2018 01:42PM
Hello bodhi, just found the time to post the requested information.

Please note: At the moment I only can use a Debian 9.0 (Stretch) Linux system in virtual machine (VMWare).
The e2label command only works as superuser/root and shows no entry.
The used usb pen drive is mounted as /media/tom/7b3f7f98-dc8e-47a4-8857-3ac9976121a8 here in Debian and not as
/media/sdb1

tom@debian:/$ sudo e2label /dev/sdb1

tom@debian:/$ mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=489560k,nr_inodes=122390,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=100160k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=35,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10809)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
vmware-vmblock on /run/vmblock-fuse type fuse.vmware-vmblock (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other)
tmpfs on /run/user/117 type tmpfs (rw,nosuid,nodev,relatime,size=100156k,mode=700,uid=117,gid=122)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=100156k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,noexec,relatime,user)
/dev/sdb1 on /media/tom/7b3f7f98-dc8e-47a4-8857-3ac9976121a8 type ext2 (rw,nosuid,nodev,relatime,block_validity,barrier,user_xattr,acl,uhelper=udisks2)

tom@debian:/$ df -h
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
udev            479M       0  479M    0% /dev
tmpfs            98M    9,5M   89M   10% /run
/dev/sda1        13G    8,1G  4,1G   67% /
tmpfs           490M       0  490M    0% /dev/shm
tmpfs           5,0M    4,0K  5,0M    1% /run/lock
tmpfs           490M       0  490M    0% /sys/fs/cgroup
tmpfs            98M     16K   98M    1% /run/user/117
tmpfs            98M     20K   98M    1% /run/user/1000
/dev/sr0        290M    290M     0  100% /media/cdrom0
/dev/sdb1       1,4G    987M  355M   74% /media/tom/7b3f7f98-dc8e-47a4-8857-3ac9976121a8

tom@debian:/$ cd /media/tom/7b3f7f98-dc8e-47a4-8857-3ac9976121a8
tom@debian:/media/tom/7b3f7f98-dc8e-47a4-8857-3ac9976121a8$ ls -lart boot

insgesamt 116252
-rw-r--r--  1 root root   107471 Apr 25  2012 config-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  1672696 Apr 25  2012 vmlinuz-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  1225355 Apr 25  2012 System.map-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  6637098 Mai 19  2012 initrd.img-3.3.3-dockstar-shyd
-rw-r--r--  1 root root  1672760 Mai 19  2012 uImage3.3.3
-rw-r--r--  1 root root  6637162 Mai 19  2012 uInitrd3.3.3
-rw-r--r--  1 root root   116421 Jun  9  2013 config-3.9.5-dockstar-goflex-shyd
-rw-r--r--  1 root root  1813672 Jun  9  2013 vmlinuz-3.9.5-dockstar-goflex-shyd
-rw-r--r--  1 root root  1355475 Jun  9  2013 System.map-3.9.5-dockstar-goflex-shyd
-rw-r--r--  1 root root  6768340 Mai 17  2015 initrd.img-3.9.5-dockstar-goflex-shyd
drwxr-xr-x 21 root root     4096 Mai 17  2015 ..
-rw-r--r--  1 root root  1813736 Mai 17  2015 uImage.orig
drwxr-xr-x  2 root root     4096 Nov 13 22:50 dts
-rwxr-xr-x  1 root root  3876536 Nov 23 08:40 zImage-4.14.1-kirkwood-tld-1
-rw-r--r--  1 root root   155284 Nov 23 23:41 config-4.14.1-kirkwood-tld-1
-rw-------  1 root root  2567975 Nov 24 00:33 System.map-4.14.1-kirkwood-tld-1
-rw-------  1 root root  3876536 Nov 24 00:33 vmlinuz-4.14.1-kirkwood-tld-1
-rw-r--r--  1 root root 18713922 Nov 24 00:38 linux-image-4.14.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root  8731958 Nov 24 00:56 linux-headers-4.14.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--  1 root root  1280000 Nov 24 06:48 linux-dtb-4.14.1-kirkwood-tld-1.tar
-rw-r--r--  1 root root   143484 Nov 25 23:59 linux-4.14.1-kirkwood-tld-1.patch
-rw-r--r--  1 root root 31580821 Jan 28 14:36 linux-4.14.1-kirkwood-tld-1-bodhi.tar.bz2
-rw-r--r--  1 root root  5132138 Jan 28 14:40 initrd.img-4.14.1-kirkwood-tld-1
-rwxr-xr-x  1 root root  3886940 Jan 28 14:42 zImage.fdt
-rw-r--r--  1 root root  3887004 Jan 28 14:46 uImage
drwxr-xr-x  3 root root     4096 Jan 28 14:46 .
-rw-r--r--  1 root root  5132202 Jan 28 15:02 uInitrd

tom@debian:/media/tom/7b3f7f98-dc8e-47a4-8857-3ac9976121a8$

Hope this helps to find the cause of failure.

Thank you.

regards
Tom
Re: Upgrading to Debian stretch
January 29, 2018 10:48PM
Tom,

The rootfs /boot looks OK. But the label is not.

Become root, and then set the label to rootfs:
su -
tune2fs -L rootfs /dev/sdb1
sync

And then take it to the Dockstar and power up.

The LED color amber indicated that the kernel has failed to run. But on the slight chance that the LED is wrong, and the problem is actually rootfs mounting, setting the correct label will enable the kernel to mount the rootfs correctly.

Since you don't have serial console, it is difficult to see exactly what has happened. We can only make educated guess. If this does not work. We'll go to plan B.

-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: