Critical dist-upgrade Error!

Post Reply
CaptManiac
Posts: 12
Joined: Tue Apr 02, 2019 12:17 am
languages_spoken: english
ODROIDs: N2
Has thanked: 5 times
Been thanked: 2 times
Contact:

Critical dist-upgrade Error!

Unread post by CaptManiac » Fri Apr 19, 2019 1:52 pm

Today when I did a dist-upgrade on my Odroid N2 Ubuntu minimal install on a USB flashdrive it includes a u-boot update that completely corrupted the BOOT partition /dev/sda1. fsck.vfat -a cannot fix the corruption, and I had to completely reinstall the OS. After another dist-upgrade it did the exact same thing. Note that my system was working perfectly fine for approximately a week until this happened.

If you do a dist-upgrade currently you risk an unfixable corruption of the boot partition.
These users thanked the author CaptManiac for the post:
mad_ady (Fri Apr 19, 2019 2:26 pm)

CaptManiac
Posts: 12
Joined: Tue Apr 02, 2019 12:17 am
languages_spoken: english
ODROIDs: N2
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by CaptManiac » Fri Apr 19, 2019 2:27 pm

I just tested two things:

1) this does not happen on a standard sdcard installation
2) on a completely fresh minimal image written to a USB flashdrive, booting thru SPI, logging in as root, doing a sudo apt update, and then sudo apt dist-upgrade, it corrupts the filesystem of /media/boot [/dev/sda1].

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by mad_ady » Fri Apr 19, 2019 2:28 pm

Thanks for reporting. There was an uboot issue affecting ethernet for some users.
Are you using petitboot to boot your system? How did you flash your disk? Did you use ethcher to write the sd image to disk?
Most likely uboot update overwrote something it shouldn't have.
I'll try it as well - I have the same setup.

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by phaseshifter » Fri Apr 19, 2019 2:37 pm

Code: Select all

distro-info-data
this is the only package that it churned out to me just now did install it...running emmc..did reboot ok not running petitboot though..

i run an full update again nothing came up..system seem`s to be ok..
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

joy
Posts: 863
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 9 times
Been thanked: 39 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by joy » Fri Apr 19, 2019 2:46 pm

Well, I think boot partition disk location should be considered.
This issue can be shown.
I will try to reproduce this issue.

joy
Posts: 863
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 9 times
Been thanked: 39 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by joy » Fri Apr 19, 2019 2:58 pm

@Captmaniac,
This issue is generated during update boot partition under /dev/sda* that is mounted to /media/boot/.
I've reproduced it.

Could you let us check and fix it?
Once it's done, I will share the status here.

And unfortunately, you need to write a new image on your USB disk again. :(
So far, I have no idea to recover it.

Others, any idea?

joy
Posts: 863
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 9 times
Been thanked: 39 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by joy » Fri Apr 19, 2019 3:09 pm

joy wrote:
Fri Apr 19, 2019 2:58 pm
And unfortunately, you need to write a new image on your USB disk again. :(
So far, I have no idea to recover it.

Others, any idea?
@Captmaniac,
Oh!
I found a solution.
As I tested, only vfat format is needed.
You don't need to write all image.

Connect usb stick on your host PC or N2 with eMMC/SD booting first.
You can find partition info and it means partition table is OK.

Code: Select all

$ df
.....
/dev/sdc2        14517280   2890180  11014472  21% /media/joy/rootfs
/dev/sdc1          130798         0    130798   0% /media/joy/BOOT
Format only vfat partition using mkfs.vfat.

Code: Select all

$ sudo umount /media/joy/BOOT
$ sudo mkfs.vfat /dev/sdc1 -n BOOT
Then, copy images.

Code: Select all

boot.ini
boot.ini.default
Image.gz
meson64_odroidn2.dtb
uInitrd
This approach is a bit annoying but if you want to keep your existing rootfs, it can be better one than writing a new whole image.
These users thanked the author joy for the post:
mad_ady (Sat Apr 20, 2019 1:30 pm)

CaptManiac
Posts: 12
Joined: Tue Apr 02, 2019 12:17 am
languages_spoken: english
ODROIDs: N2
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by CaptManiac » Fri Apr 19, 2019 10:36 pm

@mad_ady
Yes, this is with petitboot 20190417. Image was written using ddrescue.

@joy
Thanks for the confirmation. I'm using your solution and copying the new files from the successful sdcard update over.

joy
Posts: 863
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 9 times
Been thanked: 39 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by joy » Tue Apr 23, 2019 8:15 am

Thanks for sharing your status.
This issue is fixed, but new release is not ready,
so please wait for several more days.
I will share the status once it's released so you can update with your usb stick and petitboot.
These users thanked the author joy for the post:
CaptManiac (Tue Apr 23, 2019 8:45 am)

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by phaseshifter » Thu Apr 25, 2019 6:51 pm

found a different approach for an op`s interested my vfat partition is sda1 further reff...

open a terminal as root user..

Code: Select all

sdo caja

Code: Select all

copy vfat files to the  Documents directory
run the update..etc..etc dont reboot

unmount vfat
you may have to issue this next command twice...

Code: Select all

unmount /dev/sda1
reformat vfat

Code: Select all

mkfs.vfat /dev/sda1 -n BOOT

Code: Select all

mount /dev/sda1

Code: Select all

sudo caja 
copy files from Documents dir to vfat ..it should be empty to look at a glance and once you copy the files there....simply...

Code: Select all

reboot

auto resizing is not working so install gparted and resize the rootfs....

you may have to cold boot it so a poweroff command may be needed for the drive to be scanned by the spi....
Last edited by phaseshifter on Thu Apr 25, 2019 8:33 pm, edited 1 time in total.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by phaseshifter » Thu Apr 25, 2019 8:32 pm

thought i might add that previously before that i could even get my ssd to boot i had to do a few things

1: flash 0325 image ubuntu to my ssd hdd

2: plug in a updated emmc to my linux box

3: copy updated vfat files to vfat in my ssd

4: copy from the same emmc /lib/modules folder to the same dir but only onto the ssd...then plug the ssd into the N-2 with the latest spi bios flashed it booted up

then once i had the drive booting i went about the above method in my previous post
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

joy
Posts: 863
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 9 times
Been thanked: 39 times
Contact:

Re: Critical dist-upgrade Error!

Unread post by joy » Fri May 10, 2019 9:37 am

Hi, @Captmaniac and @phaseshifter,
I'm so sorry for very late update.

A new version of u-boot package has been released yesterday,
so you can apt-get update && upgrade && dist-upgrade with your root file system on USB stick booted from petitboot without any crash issue.

Code: Select all

Unpacking u-boot (20190509-c6c6268-3) over (20190321-b9e9dbd-1) ...

Code: Select all

root@odroid:~# uname -a
Linux odroid 4.9.170-27 #1 SMP PREEMPT Mon Apr 29 12:45:24 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
These users thanked the author joy for the post (total 3):
mad_ady (Fri May 10, 2019 12:55 pm) • CaptManiac (Fri May 10, 2019 2:14 pm) • phaseshifter (Sat May 11, 2019 5:18 pm)

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest