18.04 LTS upgrade path

Discussion in 'UDOO NEO' started by Stefano Bettega, Dec 29, 2019.

  1. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Hello, I have a 14.04 LTS running on my Udoo Neo and an upgrade to 18.04 LTS is available.
    When I try to apply the upgrade, it says I don't have the required space in my /boot partition.

    My SD card is 8GB but I cloned it onto a 16GB one and resized partitions with GParted from a Linux box. Unfortunately after this procedure the board does not start, and I don't know what could be the problem.

    On the new memory card the first partition is under 2GB and FAT16 type. Is there any limitation on partition size or anything else that could be done to debug this condition?

    Thanks in advance
    Stefano
     
  2. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Just an addition: to properly resize partitions using GParted, as FAT16 resizing has been removed, I used the following trick:
    • moved all of the data from the first partition to my disk
    • formatted the first partition in EXT4
    • resized/moved the partitions as I wanted
    • reformatted the first partition to FAT16
    • moved back data from my disk to first partition
    Several problems could be present at this time:
    1. the boot sector in FAT16 partition is no longer identical to the original one, so bootloader (uBoot or RedBoot I suppose) is passing control to a boot sector which doesn't know what to do with files that are in the partition itself
    2. as in original MS DOS disks, one of the file must be located at first position in FAT entries, and moving data back and forth to the partition changed this order
    3. expanding FAT16 partition size requires a change in the disk sector, which cannot be handled by the bootloader
    Any idea on what could be wrong? I would like to learn how to in place upgrade the system without having to reinstall it from the original image and having to apply all of the customization I made.

    Thanks in advance and Happy New Year :),
    Stefano
     
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
    If you mean that you have installed Udoobuntu 2.1 (based on lubuntu 14 lts) and running then it is not possible to just upgrade to 18 lts.
     
  4. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Hi waltervl, thanks for the answer.
    But... why so? Also the documentation says that the upgrade is possible.

    Cheers,
    Stefano
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
  6. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Uhm from the thread I see there is at least a way to connect via serial to see what the bootloader is doing, so it could be a way to see if the new SD card doesn't work. And this could be the same issue you ran into.
    BTW there is also a 18.04 image linked here and discussed here, so I could probably switch to that one and reconfigure the board environment.
    I will probably have a look to the boot process to identify what can be wrong with the SD, maybe it's just a matter of its size.

    Will post back when done

    Thanks,
    Stefano
     
    waltervl likes this.
  7. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    After some investigation maybe I found a flaw in my procedure...
    I was assuming that the bootloader was inside the iMX6, but this is only partially true. uBoot is installed in the memory card, and in fact this is clear when you power on the board with the serial connection active and no card in the slot: nothing happens.
    So maybe that in my cloning and expanding procedure, some part of the bootloader (i think the second stage, because with my memory card I see the following message on the console: SPL: u-boot second stage will be loaded from MMC0) has gone lost.
    My idea, now, is to get the original bootloader somewhere and write it to the memory card, replacing what could have been overwritten.
    Where can I find the SPL and u-boot.img files so that I can use these commands

    sudo dd if=SPL of=/dev/sdb bs=1K seek=1
    sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69


    to write on my memory card the new fresh bootloader?

    Thanks,
    Stefano
     
  8. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
    @Francesco @evaloverde can you help Stefano?

    I suppose you will have to build/compile/make it yourself. See also the documentation. Somewhere in the 18 LTS beta image it should be there.
     
  9. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Ok I think I found the solution to the problem. As I supposed, uBoot was missing from the SD card.

    What I did was to recreate the development environment as said here, using a Ubuntu 14.04.6 32 bit VM (I firstly started with a 19.10 64 bit but it failed..., maybe for the 64 bit or maybe it was due to the too new packages)

    Then I created a complete system image using this guide. I chosed to create a desktop version, but I think I could have also used the minimal one, as what I really needed was the bootloader.

    Then after a long long compilation, and just when writing these notes, I realized that I was a stupid fool. In the git repository, under /boards/udoo-neo, there is the u-boot binary file that will be written by the build system into the image, so there is no need to rebuild the whole system.

    So finally it was just a matter of downloading the git mkudoobuntu repository, and do a
    sudo dd if=./boards/udoo-neo/uboot.imx of=/dev/sdf bs=1k seek=1

    And magically my 16GB SD card with 2GB boot partition and 14GB udoobuntu partition correctly booted my Udoo Neo.
    And now it's doing its distribution upgrade. I'll post here if it succeeded or not.

    Cheers,
    Stefano
     
  10. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Ok system is now up and running with version 16.04.6 LTS.. even though partially: web server and X server are not working, but it's almost 3:25 AM and it's time to go to bed.
    Actually my Udoo is collecting temperature and pressure from the sensors and writing them to ThingSpeak.com, and this still works; SSH is working and serial console too. And it seems that a 18.04.3 LTS release is available for download...

    Bye,
    Stefano
     
    waltervl likes this.
  11. Stefano Bettega

    Stefano Bettega UDOOer

    Joined:
    Sep 8, 2016
    Messages:
    12
    Likes Received:
    3
    Mmhhh... after some investigation I must admit that @waltervl was right: do-release-upgrade can't be used to move to a new distribution. In fact it upgrades the underlying Ubuntu and not the UDOOBuntu that has been built on top of this.

    I was bad driven to this idea by this document: it says that you can do a sudo apt dist-upgrade to upgrade your distribution, but this is intended to be a in-version distribution upgrade, to ensure all packages are at the last version and coherent.

    So after all I have to apologize for this thread, but at least I learned how to resize the SD card, reinstall the uBoot and got some time to spend with this board.

    I'm actually downloading the UDOOBuntu 18.04 to flash it on the card and start again from a clean system.

    Thanks to all for your support.

    Best regards,
    Stefano
     
  12. evaloverde

    evaloverde Administrator Staff Member

    Joined:
    Apr 29, 2019
    Messages:
    152
    Likes Received:
    47
    Ciao,
    sorry for the lack of reply, we were on holiday and we didn't see the message up until now.

    Everything seems ok now. Stefano if you need anything please let us know.
     
  13. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    152
    Likes Received:
    16
    Ciao Stefano,
    in case you succeed in setting up Ubuntu 18.04 with Udoo NEO, could you also check the bug I reported in the other thread? (https://www.udoo.org/forum/threads/ubuntu-18-04-for-udoo-neo.29615/#post-56601).
    If you fixed them, will you share a img to flash? Tnks :)
     

Share This Page