Wanted: Step-by-step instructions on installing Ubuntu to SD card

Discussion in 'UDOO X86' started by lamoid, Apr 29, 2017.

  1. lamoid

    lamoid New Member

    Joined:
    Feb 20, 2014
    Messages:
    4
    Likes Received:
    1
    OK. So, I've been trying to install Ubuntu 16.04.2 LTS to a 128GB sdcard formatted to FAT32. (I have spent 6 hours on it and am giving up in frustration!) I have been trying to do this on the UDOO x-x6 itself by booting from a USB stick into Ubuntu then clicking on the icon labeled "Install Ubuntu 16.04.2 LTS".

    The installation program responds with

    "The installer has detected that the following disks have mounted partitions: /dev/mmcblk0"

    I'm not sure what that is. But df indicates that my sdcard is /dev/mmcblk1. I've tried answering both yes and no. On the "Installation type" screen, I select "something else". /dev/mmcblk1 is not there.

    Hours of reading through the forum leads me to suspect that I have to upgrade to BIOS version 1.02. I downloaded UDOOX86_B02-UEFI_Update_rel102.zip to my PC, unzipped it, shut down the UDOO, removed the USB stick, plugged it into my PC and copied the UDOOX86_B02-UEFI_Update_rel102 folder to the stick. Then I removed the stick from the PC plugged it back into the UDOO, restarted the UDOO, hit <esc>, entered the bootloader screen, and selected "try Ubuntu without installing it".

    Now back in the ubuntu desktop I opened a terminal and cd'ed into UDOOX86_B02-UEFI_Update_rel102/Linux/X64. The instructions (APN - BIOS programming using H2OFFT_rel1.5.pdf) say

    "For using H2OFFT gcc compiler and Kernel-headers must be present in the system. Make sure they are installed in the system, otherwise install them."

    I don't know if they are in the Ubuntu distribution or not. so I try "sudo ./bios_updater_x64.sh 0B20000.102"

    (I presume 0B20000.102 is the bios image. It's not stated _anywhere_.) The script executes spewing error after error, most of which seem to be due to the fact that Ubuntu thinks that it is being run from a cdrom and cannot make any temporary files in the driver directory which is on the USB stick.

    At this point I am exasperated trying to get the OS on the sdcard. Why is it so damn hard? It was not difficult on the UDOO quad. I like the UDOO team and I have supported them via kickstarter from the very beginning. But, frankly, their documentation and instructions for the X-86 are lousy.

    Would one of you UDOO Ubuntu Gurus kindly tell me (and probably many others) _exactly_ how to get Ubuntu running from an SDCard?

    Thanks!

    Alan
     
  2. Markus Laire

    Markus Laire Active Member

    Joined:
    Mar 9, 2017
    Messages:
    225
    Likes Received:
    92
    Ubuntu 16.10 contains everything needed, however UEFI update instructions are missing one step where you need to copy H2OFFT-Lx64 out of x86 directory.

    If you can use internet from UDOO X86, then you can update UEFI with these instructions:
    • connect USB stick to UDOO X86
    • start UDOO X86, press ESC several times while UDOO is starting
    • select "Boot Manager" from menu
    • select your USB stick under "EFI Boot Devices" (NOT under "Legacy USB")
    • from GRUB menu select "Try Ubuntu without installing"
    Once Ubuntu starts

    cd Downloads
    unzip UDOOX86_B02-UEFI_Update_rel102.zip
    cd UDOOX86_B02-UEFI_Update_rel102/Linux/x64
    cp ../../Bios/* .
    chmod +x bios* H2* x64/*
    sudo ./bios_updater_x64.sh 0B020000.102

    EDIT: simplified commands a bit
     
    Last edited: Apr 29, 2017
    lamoid and waltervl like this.
  3. Markus Laire

    Markus Laire Active Member

    Joined:
    Mar 9, 2017
    Messages:
    225
    Likes Received:
    92
    Rechecking PDF instructions, it seems I was wrong and instructions are correct, however a bit complicated.

    I just created simpler updater: Instead of downloading ZIP manually and entering all those commands to Terminal, you need to only enter this command to download and apply UEFI update in one go:

    curl -qfL https://iet.fi/misc/udoo-x86-uefi-update-102 | sudo bash

    (iet.fi is my personal short-link-domain, full script is here in case you want to check it out before running)
     
  4. tiotocho

    tiotocho New Member

    Joined:
    Apr 29, 2017
    Messages:
    1
    Likes Received:
    0
    Hi,

    I have the same problem, i was trying to install Ubuntu from USB on SD Card, but the OS only installs himself on the eMMC memory (8 Gb only).

    I was trying update the BIOS with the commands described above, after update the BIOS Ubuntu still does not recognize the SD card to install the operative system.

    If i run ubuntu without install it, ubuntu recognizes the SDCard as memory device.

    can someone help me with this?

    Thanks!!
     
    Last edited: Apr 29, 2017
  5. Markus Laire

    Markus Laire Active Member

    Joined:
    Mar 9, 2017
    Messages:
    225
    Likes Received:
    92
    First check that BIOS was really updated. Press ESC when booting, then select "SCU" from menu. You should see "Bios Version 1.02" at top line. Then press ESC again to exit.
     
    lamoid likes this.
  6. Markus Laire

    Markus Laire Active Member

    Joined:
    Mar 9, 2017
    Messages:
    225
    Likes Received:
    92
    I am able to select SD card as installation location if I first delete all partitions. My steps so far (after updating BIOS):
    • start UDOO X86, press ESC several times while UDOO is starting
    • select "Boot Manager" from menu
    • select your USB stick under "EFI Boot Devices" (NOT under "Legacy USB")
    • from GRUB menu select "Try Ubuntu without installing"
    When Ubuntu starts, delete everything on eMMC and SD card:
    • click top-left icon, write "gparted" to search-field and start GParted
    • in top-right corner of GParted, select "/dev/mmcblk0" (eMMC)
      • right-click each listed partition (if any) and select "Delete"
    • in top-right corner of GParted, select "/dev/mmcblk1" (SD card)
      • right-click each listed partition (if any) and select "Delete"
    • click green checkmark to apply all partition deletions
    • quit GParted
    Then start installer from Desktop icon. During installation you should get screen with text "This computer currently has no detected operating system ...", where I selected "Erase disk and install Ubuntu". In next screen I then get to choose disk, either "mmcblk0" (eMMC) or "mmcblk1" (SD card).

    ps. During installation screen can go off, just move mouse a bit to awaken screen.
     
    Last edited: Apr 29, 2017
    lamoid, ccs_hello and waltervl like this.
  7. Markus Laire

    Markus Laire Active Member

    Joined:
    Mar 9, 2017
    Messages:
    225
    Likes Received:
    92
    I was getting that also. I "fixed" that by deleting all partitions in eMMC and SD card before starting installer (see my post above).
     
    lamoid likes this.
  8. lamoid

    lamoid New Member

    Joined:
    Feb 20, 2014
    Messages:
    4
    Likes Received:
    1
    Thank you very much, Markus! Your instructions worked. Only one addition. Before you can delete a partition in GParted you must first unmount it. (I know you know this. But, for any novices: right click on the partition and select "unmount". Then right click on the partition and select "delete".)
     
    Markus Laire likes this.
  9. LDighera

    LDighera UDOOer

    Joined:
    Jan 13, 2014
    Messages:
    206
    Likes Received:
    36
    When I run
    Code:
    C:\Users\finaluser\Desktop\Computers\Udoo\UDOOX86_B02-UEFI_Update_rel102\Windows\x64>bios_updater_x64.bat bios2dump_custom
    I see this output:
    Code:
    Braswell BIOS updater - Windows x64 Version
    
                           Please do not remove the AC power
    
             Insyde H2OFFT (Flash Firmware Tool) Version (SEG) 100.00.07.21
          Copyright(c) 2012 - 2015, Insyde Software Corp. All Rights Reserved.
    
                            Initializing
                            File loading    100 %
    
                   Current BIOS Model name: Braswell
                   New     BIOS Model name: Braswell
    
                   Current BIOS version: 1.01
                   New     BIOS version: 1.01
    
    [================] Updating Block at FFFFF000h (100%)
                            Flash complete!
                           Please do not remove the AC power
    
             Insyde H2OFFT (Flash Firmware Tool) Version (SEG) 100.00.07.21
          Copyright(c) 2012 - 2015, Insyde Software Corp. All Rights Reserved.
    
                            Initializing
                            File loading    100 %
    
                   Current BIOS Model name: Braswell
                   New     BIOS Model name: Braswell
    
                   Current BIOS version: 1.01
                   New     BIOS version: 1.01
    [================] Updating Block at FFFFF000h (100%)
                            Flash complete!
      BIOS updated, please perform a full reboot for completing the operation
    C:\Users\finaluser\Desktop\Computers\Udoo\UDOOX86_B02-UEFI_Update_rel102\Windows\x64>
    
    I find it very curious that it shows the new BIOS version as 1.01; I thought the BIOS update on this page https://www.udoo.org/docs-x86/Advanced_Topics/UEFI_update.html was supposed to be BIOS version: 1.02. After the BIOS update, I am still getting 'Write Protect' error message when attempting to write to micro SD card in the slot under the speaker connectors.

    Is there a mix-up in BIOS file versions at the above link?

    Or is this a result of my having created a custom BIOS image by combining my BIOS version 1.01 custom settings with the BIOS version 1.02 image file? If the latter, what is the correct sequence of commands to flash the BIOS version 1.02 with my custom settings?
     
    Last edited: May 17, 2017
  10. ImLagging

    ImLagging Member

    Joined:
    May 9, 2017
    Messages:
    73
    Likes Received:
    28
    If you did the BIOS dump and then used that same dump file, you're updating to the same version that you already have installed. Either use the one provided (found in a different folder) or if you want to retain your settings you need to combine the dump with the one that's provided to you.
     
  11. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Thank you for your script, I was holding back to do the upgrade, but it now I just did it.

    Wondering, how difficult would it be to make an ISO out of this that does the upgrade, because I still have another board lying around playing dead, and before I RMA it I would like to make sure that it is not some stupid BIOS fault.

     
  12. LDighera

    LDighera UDOOer

    Joined:
    Jan 13, 2014
    Messages:
    206
    Likes Received:
    36
    Yes. That's what I did.
    Here's how I attempted to flash the new BIOS update combined with my old settings under Windows10:

    1. Copy the new BIOS image file <biosName.xxx> (0B020000.102) and all the contents of the folder UDOOX86_B02-UEFI_Update_rel102\Windows\x64 to a folder on the Windows Disk (C )

    2. Run the “cmd” shell with Administrator privileges (Right-Click on the Command Prompt icon, and select Run As Administrator), then CD into the directory containing the BIOS <biosName.xxx> (0B020000.102) image file.

    3. To create a BIOS file <dumpName.xxx> containing the current BIOS firmware contents and settings, run the command:

    bios_dump_x64.bat <dumpName.xxx>​

    This will start the Braswell BIOS dumper, read the current contents of the BIOS ROM, and write it to the file name <dumpName.xxx> you provided as the argument to the bios_dump_x64.bat command you ran above.

    4. To create a new custom BIOS file <customName.xxx> that contains the custom settings you previously manually set in the BIOS, combined with the new official BIOS <biosName.xxx> (0B020000.102), issue the command:

    bios_custom_maker.exe <biosName.xxx> <dumpName.xxx> <customName.xxx>​

    5. To flash the new custom BIOS firmware file <customName.xxx> to ROM, CD to the folder where are located all necessary files, and run:

    bios_updater_x64.bat <customName.xxx>​

    <customName.xxx> is the name of the new custom BIOS file you created in step 4 above (must exist in the folder).
     
  13. ImLagging

    ImLagging Member

    Joined:
    May 9, 2017
    Messages:
    73
    Likes Received:
    28
    It shouldn't be too difficult to make an ISO that auto updates the BIOS. It's just a matter of installing a minimal OS, setting up the updater to run automatically and then creating the ISO from the partition. I've been thinking about making one, but finding the time to play with it and do the testing is the issue for me right now.
     

Share This Page