Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

fix broken kernel upgrade

Featured Replies

I made a kernel upgrade which was not successful The kernel does not boot up. Unfortunately armbian does not contain a fallback method to load the old kernel. Therefore I need a way to restore the old kernel. 

I copied a working boot folder from another sdcard which does not work.

 

What did I miss?

copying /boot folder is not enough to recover an upgrade, especially if you upgraded U-Boot, this one is installed on sectors outside partitions, usually starting at byte #8192 of the sdcard.

Also, there is the /lib/modules/<kernel-number> that needs to be rescued if deleted after an upgrade, but I don't think it is deleted ...

 

 

  • Author

 

the dump from fdisk:

p
device         Boot  begin      end  sectors  size Kn typ
/dev/mmcblk0p1        8192 30396575 30388384 14,5G 83 Linux

F
  beginn      end  sectors  size
    2048     8191     6144    3M
30398464 30703615   305152  149M

the raw copy with `dd if=/dev/mmcblk0 of=/dev/sdc skip=2048 seek=2048 bs=512 count=6144 conv=notrunc` fails. Did you meant byte #8192 or sector?

 

the kernel modules are still there.

As I said, the u-boot is not inside a partition. Depending of the SoC and boards, the first byte is usally at byte#8192, for example, copying an u-boot image from file to sdcard would be :

dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8

If you wish to extract an copy u-boot from a device to another, like you seems to wish, than it would be something like that, assuming that this u-boot is smaller than 500K :

dd if=/dev/mmcblk0 of=/dev/sdc bs=1024 seek=8 skip=8 count=500 conv=notrunc

As you can see, your previous copy was copying an entirely different location ...

  • Author

Thank you very much. I fixed it with a different approach in while. Take all necessary files in /boot and /lib/modules and copy them. Save the mbr and partition table with fdisk to a file, then copy straight with the dd if=/dev/mmcblk0 of=/dev/sdc bs=512 count=8192 and restore afterwards the saved fdisk dump.

I forget to mentioned it here: the SoC is the odroid HC1.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.