Welcome! Log In Create A New Profile

Advanced

Problem upgrading to Debian stretch

Posted by Preacher 
Preacher
Problem upgrading to Debian stretch
July 06, 2017 07:18PM
pengu Wrote:
-------------------------------------------------------

> I've done this now on several boxes and no problem
> s (kirkwood, oxnas armhf, x86)
>
> - changed the /etc/apt/sources.list (replaced "jes
> sie" with "stretch"
> - apt update && apt upgrade && apt dist-upgrade &&
> apt autoremove
>

I did it the same way on Pogo V4, dead on reboot.
I remember there was an output during initramfs generation which told that it cannot recognize filesystem on SDA2, where SDA1 is my boot partition so I ignored it.
I was on Kernel 4.6.1 before. I see that only initramfs-4.6.1-kirkwood-tld-1 has changed in /boot which was not the problem up to now (was changed during many updates).
I used mkimage to create uImage and uInitrd, no change. Kernel loading is initialized correctly as I see in NC
Do you have any ideas?



Edited 1 time(s). Last edit at 07/06/2017 07:46PM by bodhi.
Re: Problem upgrading to Debian stretch
July 06, 2017 07:50PM
Preacher,

> I did it the same way on Pogo V4, dead on reboot.
> I remember there was an output during initramfs ge
> neration which told that it cannot recognize files
> ystem on SDA2, where SDA1 is my boot partition so
> I ignored it.

> I was on Kernel 4.6.1 before. I see that only init
> ramfs-4.6.1-kirkwood-tld-1 has changed in /boot wh
> ich was not the problem up to now (was changed dur
> ing many updates).
> I used mkimage to create uImage and uInitrd, no ch
> ange. Kernel loading is initialized correctly as I
> see in NC
> Do you have any ideas?

You probably forgot to copy the new uImage and uInitrd to /boot (you are using 2 partitions). Check:

1st partition:
ls -lart /boot

2nd partition:
ls -lart /boot

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Preacher
Re: Problem upgrading to Debian stretch
July 07, 2017 01:09AM
bodhi Wrote:
-------------------------------------------------------
>
>
> You probably forgot to copy the new uImage and uIn
> itrd to /boot (you are using 2 partitions). Check:
>
> 1st partition:
>
> ls -lart /boot
>
>
> 2nd partition:
>
> ls -lart /boot
>


Thank you, but everything is in correct place
Can I somehow turn debug on?
Re: Problem upgrading to Debian stretch
July 07, 2017 02:10AM
Preacher,

> Thank you, but everything is in correct place
> Can I somehow turn debug on?

Without serial console, it's hard to see what going on. But you might get kernel output if you have setup netconsole in Debian:

http://forum.doozan.com/read.php?2,9522

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Problem upgrading to Debian stretch
July 07, 2017 02:12AM
And this is not recommended:

apt-get dist-upgrade

Never do dist-upgrade when you are running a custom kernel. That very likely caused some problem.

Mount the Pogo V4 rootfs on another lLinux box. Assuming the rootfs (not the boot partition) mounted at /media/sdb1. Please post output of

ls -lart /media/sdb1/boot

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 3 time(s). Last edit at 07/07/2017 02:23AM by bodhi.
Preacher
Re: Problem upgrading to Debian stretch
July 08, 2017 03:01PM
well ,that's the problem, I used dist-upgrade.
I came from initial 4.4 rootfs
What procedure is revommended to update to latest dist?

I mounted broken rotfs on stock Pogo-OS:
-rwxr-xr-x    1 root     root       3213094 Jan  1  1970 zImage.fdt
-rw-r--r--    1 root     root       3213158 Jan  1  1970 uImage
-rw-r--r--    1 root     root       6621460 Jan  1  1970 uInitrd
-rw-r--r--    1 root     root        117042 Jun  3  2016 config-4.6.1-kirkwood-rm-1
-rw-------    1 root     root       3202848 Jun  4  2016 vmlinuz-4.6.1-kirkwood-rm-1
-rw-------    1 root     root       2260162 Jun  4  2016 System.map-4.6.1-kirkwood-rm-1
-rwxr-xr-x    1 root     root       3202848 Jun  4  2016 zImage-4.6.1-kirkwood-rm-1
drwxr-xr-x    2 root     root          4096 Jun  4  2016 dts
-rw-r--r--    1 root     root       6621396 Jul  6  2017 initrd.img-4.6.1-kirkwood-rm-1
drwxr-xr-x    3 root     root          4096 Jul  8  2017 .
drwxr-xr-x    4 root     root          4096 Jul  8  2017 ..
where "initrd.img-4.6.1-kirkwood-rm-1" was created by dist-upgrade.
I recreated uImage and uInitrd with mkimage as you describe in kernel/rootfs thread as box didn't boot
This is running on pogo v4

I tried to copy /boot, /lib/modules, /lib/firmware from my other, working Pogoplug mobile, but doesn't boot either:
-rw-r--r--    1 root     root            85 Jan  1 00:14 uEnv.txt
drwxr-xr-x   24 root     root          4096 Jan  1  1970 ..
-rw-r--r--    1 root     root        147532 Dec 13  2016 config-4.9.0-kirkwood-tld-1
-rwxr-xr-x    1 root     root       3260928 Dec 13  2016 zImage-4.9.0-kirkwood-tld-1
-rw-------    1 root     root       3260928 Dec 13  2016 vmlinuz-4.9.0-kirkwood-tld-1
-rw-------    1 root     root       2385744 Dec 13  2016 System.map-4.9.0-kirkwood-tld-1
-rw-r--r--    1 root     root       8135414 Dec 13  2016 linux-headers-4.9.0-kirkwood-tld-1_1.0_armel.deb
-rw-r--r--    1 root     root        131538 Dec 15  2016 linux-4.9.0-kirkwood-tld-1.patch
-rw-r--r--    1 root     root       3260992 Jan 10  2017 uImage
-rw-r--r--    1 root     root       7424966 Jan 10  2017 uInitrd
drwxr-xr-x    2 root     root          4096 Jan 10  2017 dts
-rw-r--r--    1 root     root       7499897 Jun  3  2017 initrd.img-4.9.0-kirkwood-tld-1

~ # cat /tmp/sda/boot/uEnv.txt
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
devices=usb
disks=0 1

uboot:
U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:41:47 -0700)
Pogoplug V4
gcc (Debian 4.9.2-10) 4.9.2
GNU ld (GNU Binutils for Debian) 2.25
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            16777216        d34ec1e1-01     83
  2     16779264        1048576         d34ec1e1-02     82
  3     17827840        43228224        d34ec1e1-03     05 Extd
  5     17829888        43226176        d34ec1e1-05     83
loading envs from usb 0 ...
66 bytes read in 231 ms (0 Bytes/s)

no IDE devices available
importing envs ...
## Info: input data size = 67 = 0x43
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 242 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3260992 bytes read in 394 ms (7.9 MiB/s)
loading uInitrd ...
7424966 bytes read in 568 ms (12.5 MiB/s)
loading DTB /boot/dts/kirkwood-pogoplug_v4.dtb ...
10244 bytes read in 850 ms (11.7 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.9.0-kirkwood-tld-1
   Created:      2017-01-10  16:43:41 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3260928 Bytes = 3.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.9.0-kirkwood-tld-1
   Created:      2017-01-10  16:45:06 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7424902 Bytes = 7.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...


is there a chance to fix non working rootfs on other box?
Re: Problem upgrading to Debian stretch
July 08, 2017 03:25PM
Preacher,

Quote

What procedure is revommended to update to latest dist?

- Change /etc/apt/sources.list to Debian stretch repo

- Run upgrade
apt-get update
apt-get upgrade

- Check the initramfs, if it was updated to a new one then recreate uInitrd. There is no need to recreate uImage, as the upgrade procedure will not change the kernel.

- sync and reboot

sync
shutdown -r now

> is there a chance to fix non working rootfs on oth
> er box?

Yes. The mkimage command to create uInitrd works every where. But you must be root user.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
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: