Multiboot&Universal Installer for Odroid C1, C2 and XU3/XU4

Moderators: mdrjr, odroid

Re: Universal Installer for Odroid XU3/XU4

Unread postby rooted » Sat Jan 14, 2017 12:38 pm

Other than partition count what benefit of GPT are you after?
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Sat Jan 14, 2017 6:04 pm

rooted wrote:Other than partition count what benefit of GPT are you after?

Gpt has a redundant / backup of the partition table at the end and protects partitions with replication and crc. Less vulnerable to corruption.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Universal Installer for Odroid XU3/XU4

Unread postby mad_ady » Sat Jan 14, 2017 7:25 pm

I've never seen partition table corruption that wasn't caused by user action (e.g. a stray dd). The partition table is readonly most of the time
User avatar
mad_ady
 
Posts: 2890
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Sun Jan 15, 2017 3:53 am

Same here but I read some articles that in some areas people have those problems. The odroids also have corruption problems with emmc when they are used as removeable media, maybe gpt will improve this situation. I havent got an answer yet if those problems are hardware or software based.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Universal Installer for Odroid XU3/XU4

Unread postby mad_ady » Sun Jan 15, 2017 4:34 am

Corrupted partitions (aka filesystems) you're likely to see, but corrupted partition table (aka mbr) not so much
User avatar
mad_ady
 
Posts: 2890
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Sun Jan 15, 2017 10:14 am

In retrospect, I think my case for gpt is more based in aesthetics and default choices. Corruption improvements are nice but corruption is not a problem. My default choice is to always use gpt except when compatibility with older pc's is important (I use mbr to make my debian live images more compatible with older pc's) or when dealing with windows in some cases. I was just wondering why hardkernel decided to use MBR.

Edit:
I realize now that the odroid boots like a bios based pc by design, so the obvious choice is to use mbr.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Universal Installer for Odroid XU3/XU4

Unread postby ryk » Tue Jan 17, 2017 6:04 am

Hi, I am a bit confused so i will ask for the procedure step to step.
I have an Odroid c2.
I have downloaded multiinstaller_C2.img and the images of android/linux/openelec and renamed them as described in Github.
I have a 8gb emmc card and a 4 gb sdcard.
Do i put all the flies to emmc card and boot ?
ryk
 
Posts: 6
Joined: Sun May 08, 2016 6:18 am
languages_spoken: english, greek
ODROIDs: C2

Re: Universal Installer for Odroid XU3/XU4

Unread postby loboris » Tue Jan 17, 2017 6:24 am

ryk wrote:Hi, I am a bit confused so i will ask for the procedure step to step.
I have an Odroid c2.
I have downloaded multiinstaller_C2.img and the images of android/linux/openelec and renamed them as described in Github.
I have a 8gb emmc card and a 4 gb sdcard.
Do i put all the flies to emmc card and boot ?

4GB SD card will probably be too small for android&linux&openelec.
You can install OS's to both (both can be inserted at the same time) SDCard & eMMC and select to boot to any OS on SDCard or eMMC in boot menu.
You can copy multiinstaller_C2.img to sd card or emmc.
Put installation images/archives to USB flash drive or USB hard drive (in the root directory.)
USB drive can be formated as FAT32, NTFS, EXT4 or BTRFS and can have multiple partitions.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Universal Installer for Odroid XU3/XU4

Unread postby ryk » Tue Jan 17, 2017 7:41 am

I thought that emmc alone won't be enough, so I added the 4gb sd.
So I need and a usb stick/drive also. That part I didn't catch it at first.
Well, I will try it tomorrow and post the results.

Thanks for your help!!!
Edit: Should i make partitions on emmc and sd for each os?
ryk
 
Posts: 6
Joined: Sun May 08, 2016 6:18 am
languages_spoken: english, greek
ODROIDs: C2

Re: Universal Installer for Odroid XU3/XU4

Unread postby loboris » Tue Jan 17, 2017 8:17 am

ryk wrote:I thought that emmc alone won't be enough, so I added the 4gb sd.
So I need and a usb stick/drive also. That part I didn't catch it at first.
Well, I will try it tomorrow and post the results.

Thanks for your help!!!
Edit: Should i make partitions on emmc and sd for each os?

What you have to do:
  • Prepare SDCARD or EMMC: write the multiboot installer image to SDCard or EMMC using dd command under Linux or image writing software under Windows
  • Copy the installation images/archives to USB drive (renamed to correct names)
  • Insert USB drive and SDCARD/EMMC into C2
  • Boot your Odroid C2 and follow the instructions
8GB emmc is enough to install android + libreelec + minimal Linux

I have prepared full Ubuntu Mate desktop image which is much smaller than Hardkernel's image, I'll upload it to GDrive tommorow.

I have tested triple boot with Android & LibreElec (from links in previous post) & my Xenial Mate image on 8GB card and it works very good.

If you are using my Xenial Mate image, I recommend select btrfs for linux partition format to get ~40% more space (btrfs can use compression).

If you don't have usb stick/drive, you can use sdcard inserted into USB Card Reader!
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Universal Installer for Odroid XU3/XU4

Unread postby loboris » Tue Jan 17, 2017 7:50 pm

Xenial Mate image is now available on GDrive:
https://drive.google.com/open?id=0B1hyW7T0dqn6M3VVSE8td18waE0
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Universal Installer for Odroid XU3/XU4

Unread postby rooted » Wed Jan 18, 2017 3:34 am

You can't really run Android from a slow SD card, the ioops are too slow and applications will randomly fail to load.
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Universal Installer for Odroid XU3/XU4

Unread postby tebor8 » Wed Jan 18, 2017 4:17 am

Would installing Lakka as one of the OSes work for this? I'm looking to do a LibreELEC + Android + Lakka boot on a C2 (Lakka is now in Nightlies).
tebor8
 
Posts: 13
Joined: Tue Nov 01, 2016 4:02 pm
languages_spoken: english
ODROIDs: c2

Re: Universal Installer for Odroid XU3/XU4

Unread postby mad_ady » Wed Jan 18, 2017 4:05 pm

I think you need at least an Ubuntu image - but loboris will clarify this...
User avatar
mad_ady
 
Posts: 2890
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Thu Jan 19, 2017 6:39 am

Got my odroid C2 and finally play time :D
I flashed the installer image and I am now collecting the installers but I am stuck at getting the correct installers. I want to install libreelec but there are only .img.gz images. Openelec has .tar files but they are only for updating, it is not the entire OS. Fresh install images for openelec are also .img.gz files.
Similar for android, its not clear what the difference is between the official installers (.img files) and the __daily__.tar.gz. Revision is the same but different packaging.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Universal Installer for Odroid XU3/XU4

Unread postby loboris » Thu Jan 19, 2017 8:01 am

barturblits wrote:Got my odroid C2 and finally play time :D
I flashed the installer image and I am now collecting the installers but I am stuck at getting the correct installers. I want to install libreelec but there are only .img.gz images. Openelec has .tar files but they are only for updating, it is not the entire OS. Fresh install images for openelec are also .img.gz files.
Similar for android, its not clear what the difference is between the official installers (.img files) and the __daily__.tar.gz. Revision is the same but different packaging.

For test on C2 triple boot:
Android (rename to update.tar.gz):
http://www.odroid.in/mirror/dn.odroid.com/S905/Android/ODROID-C2/daily-odroidc2-eng-s905_5.1.1_master-285-v2.9.tar.gz
Linux, minimal or desktop (unpack and rename to linux.img):
https://drive.google.com/open?id=0B1hyW7T0dqn6M3VVSE8td18waE0
LibreElec (rename to oelec.tar):
https://mega.nz/#!ntMhUQQB!7yfX1eZl6iQzUeNkVM-EbfcNQFFBsEp-O8Xwkx3A8OE

LibreElec tar files are complete installation files, the same is true for Android tar.gz and multiinstaller uses them to install Android and LibreElec.

@tebor8 I don't have any info on Lakka, can you give me the links to C2 installation images...
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Thu Jan 19, 2017 8:34 am

Thanks!
I probably need a newer version or beta to get my hifi shield 2 working but I found the libreelec tar files on a mirror. Could not find them on the official site.

I just ran the installer and had some problems and questions.
It found linux and android. After 'continue' it extracted android, not sure if it also installed it but it is not present in the boot menu. After this I got the linux installer and partitioner. system, data etc were all 8M so I concluded android was not installed yet. I made all partitions larger, data, system, etc. Reserved some space for libreelec for another install session and chose install multiboot kernel: no. I guessed all OS' should have their own kernel but that might be wrong. Start installation and it installed ubuntu and I could boot into it. After reboot I could not find android as boot option so started the installer again. Same result, found android and linux install images (I used the android 6 version). Continue and I am the installer/partitioner again and all partition sizes are reset. So it seems I cannot add a new install. Is it correct you cannot add a new install after you set everything up? You have to start from scratch?
Should I install multiboot kernel and why or why not?
What is the partition userdata? Is it the android sdcard / storage?
What is reserved data?

Gonna try again with the correct libreelec tar and multiboot kernel enabled this time, see what happens.

Edit: Found the log on the usb flash and it has errors:

mkdir: can't create directory '/run/inst': File exists
tar: daily-odroidc2-eng-s905_6.0.1_master-15/cache.img: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/hardkernel-720.bmp.gz: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/flashing.sh: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/rootsystem.img: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/README: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/sd_fusing.sh: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/recovery.img: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/u-boot.bin: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/userdata.img: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/release_files: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/meson64_odroidc2.dtb: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/bl1.bin.hardkernel: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15/Image: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: daily-odroidc2-eng-s905_6.0.1_master-15: Cannot change ownership to uid 106, gid 114: Operation not permitted
tar: Exiting with failure status due to previous errors

Found the problem. Untar on fat32 has a permission error, should probably be a warning (without fail). Formatted the usb flash to ext4 and android installs correctly.
Booting it now. Let's see how android 6 looks.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Thu Jan 19, 2017 10:34 am

After reboot of android, I could not boot into android anymore. Libreelec partition also was empty. Maybe an android 6 problem.
Tried android 5.1.1 and libreelec 7.10 and it worked.
then I tried to update libreelec 7.10 to 7.90 through /storage/.update but that broke multiboot.
How can libreelec be updated? There is no update option in the bootmenu like android has.
I am now trying a fresh setup with android 5.1.1 and libreelec 7.90 (and ubuntu).

Libreelec 7.90 did not boot so concluded: stable versions of android and libreelec work but beta's won't.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Universal Installer for Odroid XU3/XU4

Unread postby loboris » Thu Jan 19, 2017 7:21 pm

barturblits wrote:After reboot of android, I could not boot into android anymore. Libreelec partition also was empty. Maybe an android 6 problem.
Tried android 5.1.1 and libreelec 7.10 and it worked.
then I tried to update libreelec 7.10 to 7.90 through /storage/.update but that broke multiboot.
How can libreelec be updated? There is no update option in the bootmenu like android has.
I am now trying a fresh setup with android 5.1.1 and libreelec 7.90 (and ubuntu).

Libreelec 7.90 did not boot so concluded: stable versions of android and libreelec work but beta's won't.

Thanks for testing.
Here are some comments:
  • There are some problems when installing from USB drive fat partition, I'' try to fix it.
  • Android update must be executed from the boot menu, not in Hardkernel's way
  • openElec/LibreElec update is not implemented, but it can be easily done manualy, it is just needed to copy SYSTEM, KERNEL, and meson64_odroidc2.dtb->meson64_odroidc2.dtb.oelec from openElec tar
    I'll add it to boot menu later
  • openElec partition is always empty after installation, it is used by openElec to store configuration, plugins and user data
  • 2nd Linux installation is possible only if openElec is not installed
  • userdata is the boot partition, and it is mounted in Android as sdcard and i Linux as /media/boot
  • reserved partition is the name for openelec partition when openelec is not installed and is left unformated during the install, but can be used later in Linux (for swap or data partition)
  • Partition structure of the multiboot card is fixed, all the partition are always created, if not used the size is set to 8Mb (but can be changed in menu)
  • Install multiboot Linux kernel option is used only on C2, if used, included kernel is used which can boot from btrfs partition and can also be used if the kernel from install img does not work
  • at the moment, installation card is always erased and partitioned when installing, later I will add the option to install to the existing multiboot partitions if detected, so that already installed OS's will be preserved
This menu is presented after detection of the available install images/archives and before any change is made to the installation card:
Image
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Universal Installer for Odroid XU3/XU4

Unread postby barturblits » Thu Jan 19, 2017 8:35 pm

loboris wrote:Thanks for testing.
Here are some comments:
  • There are some problems when installing from USB drive fat partition, I'' try to fix it.
  • Android update must be executed from the boot menu, not in Hardkernel's way
  • openElec/LibreElec update is not implemented, but it can be easily done manualy, it is just needed to copy SYSTEM, KERNEL, and meson64_odroidc2.dtb->meson64_odroidc2.dtb.oelec from openElec tar
    I'll add it to boot menu later
  • openElec partition is always empty after installation, it is used by openElec to store configuration, plugins and user data
  • 2nd Linux installation is possible only if openElec is not installed
  • userdata is the boot partition, and it is mounted in Android as sdcard and i Linux as /media/boot
  • reserved partition is the name for openelec partition when openelec is not installed and is left unformated during the install, but can be used later in Linux (for swap or data partition)
  • Partition structure of the multiboot card is fixed, all the partition are always created, if not used the size is set to 8Mb (but can be changed in menu)
  • Install multiboot Linux kernel option is used only on C2, if used, included kernel is used which can boot from btrfs partition and can also be used if the kernel from install img does not work
  • at the moment, installation card is always erased and partitioned when installing, later I will add the option to install to the existing multiboot partitions if detected, so that already installed OS's will be preserved
This menu is presented after detection of the available install images/archives and before any change is made to the installation card:
Image


Nice thanks!
- I will try to update libreelec by replacing those files.
- wondering about using the multiboot kernel and its kernel modules, those are supplied by the distro right? Need some modules to get the hifi shield 2 working.
- in the end I came across some new bugs. When installing android 5.1.1, libreelec 7.10 and your ubuntu mate image together, I was focusing to get libreelec and android working and when that worked I found out that the ubuntu was not working anymore (after fresh install). Gonna look into that tonight. Monitor output was black, no terminal output etc. Blue light was on without blinking.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby alcyon71 » Fri Jan 20, 2017 4:11 am

barturblits wrote:After reboot of android, I could not boot into android anymore. Libreelec partition also was empty. Maybe an android 6 problem.
Tried android 5.1.1 and libreelec 7.10 and it worked.
then I tried to update libreelec 7.10 to 7.90 through /storage/.update but that broke multiboot.
How can libreelec be updated? There is no update option in the bootmenu like android has.
I am now trying a fresh setup with android 5.1.1 and libreelec 7.90 (and ubuntu).

Libreelec 7.90 did not boot so concluded: stable versions of android and libreelec work but beta's won't.


When I tried android 6, daily-odroidc2-fra-s905_6.0.1_master-15-v1.3.tar.gz worked for me.
alcyon71
 
Posts: 4
Joined: Wed Jan 11, 2017 5:46 am
languages_spoken: french, english
ODROIDs: Odroid C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Fri Jan 20, 2017 5:22 am

alcyon71 wrote:When I tried android 6, daily-odroidc2-fra-s905_6.0.1_master-15-v1.3.tar.gz worked for me.


Might be a librelec 7.90 problem or an interaction effect. I got android 6 and 5.1.1, libreelec 7.10 and ubuntu mate working but not all at the same time.
Gonna try some more combinations and try to debug it.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby tebor8 » Fri Jan 20, 2017 8:42 am

@tebor8 I don't have any info on Lakka, can you give me the links to C2 installation images...


@loboris
Here you go:
http://mirror.lakka.tv/nightly/Odroid_C2.arm-8.0/
tebor8
 
Posts: 13
Joined: Tue Nov 01, 2016 4:02 pm
languages_spoken: english
ODROIDs: c2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Fri Jan 20, 2017 8:55 am

Can't get a triple boot working. Or libreelec works and ubuntu does not or the other way around:
libreelec 7.1 oct on off works correctly then ubuntu does not boot
libreelec 7.11 and 7.1.2 do not boot but then ubuntu does boot
Strange.

Edit:
Tried latest dev 20170110 LE 8.0 version in the triple boot and then ubuntu and LE are both not booting (kernel does not start)
Seems like LE and ubuntu share the same kernel and initrd. I'll try the multiboot kernel and check the code later today.
Android seems to use its own kernel btw, boots everytime.
With multibootkernel, ubuntu starts, LE not.
Tried the official ubuntu image (5+GB) and LE 8 (no mulitboot kernel selected) but still both will not boot.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Sat Jan 21, 2017 9:05 am

LE 8.0 is working now. Found out boot.ini files (boot parameters) change a lot between versions. I used original boot.ini from LE 8.0 and manually added the changes from the installer.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby locomot1f » Sat Jan 21, 2017 12:42 pm

tebor8 wrote:
@tebor8 I don't have any info on Lakka, can you give me the links to C2 installation images...


@loboris
Here you go:
http://mirror.lakka.tv/nightly/Odroid_C2.arm-8.0/


this would be awesome!!!
locomot1f
 
Posts: 55
Joined: Sun Jan 01, 2017 1:51 am
languages_spoken: english
ODROIDs: C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Mon Jan 23, 2017 10:41 am

Did not get ubuntu working by changing the boot.ini file in contrast to LE 8.0 which is still working. Seems there is also a corruption in the ubuntu install itself. Went to the code (ubuntu and the installer) a couple of times but no luck in finding it.

Looked at the format of volumio and lakka. Lakka is identical to OE/LE, same file locations, partition use. Volumio is very similar, only needs a custom boot.ini, no changes in the system itself. Both OS's load kernel, initrd, dtb and a squashfs file. Most work will be adding it to the gui.
I prefer the installer to use the distro's boot.ini and change it instead of using one single prebuilt boot.ini for all versions. Also using the image file name as boot option, extension as install type and a number before the extension as boot order rank would be very nice, then it is possible to install an unlimited possible OS's and easy control the order:

volumio-2.030-2016-11-19-odroidc2.img.1.volumio
LibreELEC-Odroid_C2.aarch64-7.90.010.tar.2.elec
Lakka-Odroid_C2.arm-8.0-devel-20161226183507-r25089-g0a2d7ed.tar.3.elec
ubuntu64-16.04lts-mate-odroid-c2-20170106.img.4.linux
daily-odroidc2-eng-s905_6.0.1_master-15-v1.3.tar.gz.5.android

In case of duplicate numbers, alphabetical order can be used.

@Loboris : Do you accept patches?
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Tue Jan 31, 2017 7:20 am

I made some changes to the ramfs, rebuild uInitrd and copied the file to the boot partition but I got problems when booting the new uInitrd. So I tried to just ./pack the default ramfs but that also gave boot problems, OS's are not detected when manually built. I am running debian jessie so I tried to built a backports package of the latest (nov 2016) uboot-tools from sid and did a fresh rebuild of the ramfs but still no luck. Output looks ok, no errors, no warnings on building. Any idea how to debug or fix this?
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Wed Feb 01, 2017 8:34 am

Changing default os in boot.ini.multi does not work. This is easily solved by editing the 'init' file in the ramfs (uInitrd) image by changing default_boot to default_os in the cmdline resolving at line 113/114. But because I still have not managed to build a working uInitrd myself I had to workaround this by editing the boot.ini.multi for the time being.

Reported the issue on github:

https://github.com/loboris/Odroid_Multiboot/issues/4
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby malomehi » Thu Feb 02, 2017 8:25 am

I have installed Ubuntu+LibreElec.
The issue I found was that Ubuntu only booted the first time but not any more after restarting.
I managed to solve this issue by updating the *.linux files in the multiboot folder with the ones in the Ubuntu boot folder. This way the next boot in Ubuntu will be ok.
The problem that I see here is that I might need to do this every time the Ubuntu kernel is updated, for example with apt-get.
It would be nice if this could be done automatically.

The second issue I have is that I cannot find a way to update LibreElec to 7.90. I tried the manual update suggested by loboris but it does not work.
malomehi
 
Posts: 7
Joined: Thu Feb 02, 2017 8:09 am
languages_spoken: english spanish
ODROIDs: ODROID-C2

Re: Universal Installer for Odroid XU3/XU4

Unread postby ryk » Fri Feb 03, 2017 12:38 am

loboris wrote:
ryk wrote:I thought that emmc alone won't be enough, so I added the 4gb sd.
So I need and a usb stick/drive also. That part I didn't catch it at first.
Well, I will try it tomorrow and post the results.

Thanks for your help!!!
Edit: Should i make partitions on emmc and sd for each os?

What you have to do:
  • Prepare SDCARD or EMMC: write the multiboot installer image to SDCard or EMMC using dd command under Linux or image writing software under Windows
  • Copy the installation images/archives to USB drive (renamed to correct names)
  • Insert USB drive and SDCARD/EMMC into C2
  • Boot your Odroid C2 and follow the instructions
8GB emmc is enough to install android + libreelec + minimal Linux

I have prepared full Ubuntu Mate desktop image which is much smaller than Hardkernel's image, I'll upload it to GDrive tommorow.

I have tested triple boot with Android & LibreElec (from links in previous post) & my Xenial Mate image on 8GB card and it works very good.

If you are using my Xenial Mate image, I recommend select btrfs for linux partition format to get ~40% more space (btrfs can use compression).

If you don't have usb stick/drive, you can use sdcard inserted into USB Card Reader!


I tried as suggested, (with the files given by loboris) and everything is working. I tried with newer android and librelec, but no go. An update function/utility would be great.
One other thing is that odroid doesn't not recognize both emmc and sd cards. If i put both, it sees only sd card in installation.
Also in linux mode, ethernet is in use but it doesn't seems connected or managed. Wifi is not usable (not working), although the correct module is loaded.
ryk
 
Posts: 6
Joined: Sun May 08, 2016 6:18 am
languages_spoken: english, greek
ODROIDs: C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Fri Feb 03, 2017 5:29 am

malomehi wrote:I have installed Ubuntu+LibreElec.
The issue I found was that Ubuntu only booted the first time but not any more after restarting.
I managed to solve this issue by updating the *.linux files in the multiboot folder with the ones in the Ubuntu boot folder. This way the next boot in Ubuntu will be ok.
The problem that I see here is that I might need to do this every time the Ubuntu kernel is updated, for example with apt-get.
It would be nice if this could be done automatically.

The second issue I have is that I cannot find a way to update LibreElec to 7.90. I tried the manual update suggested by loboris but it does not work.

Nice! trying it now. if it works I can write a bash script which we can put in /etc/kernel/postinst.d/. After each kernel update it will copy uInitrd, Image and the dtb file to the multiboot folder.
Did you change the boot.ini.oelec file for 7.90? I did a diff of boot.ini.oelec provided by loboris and the one in 7.90 with meld and got it working. This works for me:

http://pastebin.com/H65hZ2MT

Edit:
It worked! Ubuntu runs again. Thanks.
Have to figure out how to detect what kernel version is installed before copying the files to /media/emuserdata. Maybe try something with the highest number.
Kernel packages provide postinstall scripts which copy the dtb, vmlinuz and uInitrd files to the root of the boot partition with the correct naming (if you dont use multiboot). I tried to make a script which copies those files to /media/boot/multiboot with .linux extensions but somehow my scripts is in conflict with those scripts. So have to work on that some more.
Ouch, one double quote too many probably was the problem.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby malomehi » Fri Feb 03, 2017 9:33 am

I finally found the problem with LibreELEC.
It is in boot.ini.oelec
The partitions labels are wrong!!!
It says:
setenv bootrootfs "boot=LABEL=userdata disk=LABEL=oelec"
It should say:
setenv bootrootfs "boot=LABEL=emuserdata disk=LABEL=emoelec"

Now I have both latest Ubuntu and latest LibreELEC working with dual boot.
malomehi
 
Posts: 7
Joined: Thu Feb 02, 2017 8:09 am
languages_spoken: english spanish
ODROIDs: ODROID-C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Fri Feb 03, 2017 8:36 pm

Got the script working.

I first backup the old kernel/initrd/dtb files. You can comment these lines if you do not want this. Also this script is also ran when installing an older kernel so multiboot will boot the last installed kernel, not the latest kernel.
Additionally I noticed uInitrd is not updated on the /media/boot partition when update-initramfs is ran wtih apt-get update or synaptic. I'll try to write a script for that as well and add the copy to the multiboot as well.

Multiboot update kernel script is here:

http://pastebin.com/wFtZuL1D

I named it zz-copy-boot-files-multiboot so it is ran after the required kernel update steps (cannot be run earlier in the postinstall process).
Place the file in /etc/kernel/postinst.d and make sure to make it executable (run as root: chmod +x /etc/kernel/postinst.d/zz-copy-boot-files-multiboot)
I did not test it thoroughly so bugs could show up and you have to fix it manually.

Todo:
Have to add some 'file/dir exist' tests so apt-get will not give a failed install when files are missing.

Just did a fresh install of ubuntu and libreelec, got rid of android but made the android partitions larger so I can try to install lakka and volumio on those partitions.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby malomehi » Sat Feb 04, 2017 3:56 am

barturblits wrote:Got the script working.

I first backup the old kernel/initrd/dtb files. You can comment these lines if you do not want this. Also this script is also ran when installing an older kernel so multiboot will boot the last installed kernel, not the latest kernel.
Additionally I noticed uInitrd is not updated on the /media/boot partition when update-initramfs is ran wtih apt-get update or synaptic. I'll try to write a script for that as well and add the copy to the multiboot as well.

Multiboot update kernel script is here:

http://pastebin.com/wFtZuL1D

I named it zz-copy-boot-files-multiboot so it is ran after the required kernel update steps (cannot be run earlier in the postinstall process).
Place the file in /etc/kernel/postinst.d and make sure to make it executable (run as root: chmod +x /etc/kernel/postinst.d/zz-copy-boot-files-multiboot)
I did not test it thoroughly so bugs could show up and you have to fix it manually.

Todo:
Have to add some 'file/dir exist' tests so apt-get will not give a failed install when files are missing.

Just did a fresh install of ubuntu and libreelec, got rid of android but made the android partitions larger so I can try to install lakka and volumio on those partitions.


I think that by doing that you are copying the multiboot boot files instead of the Linux boot files.
I understand that you need to copy the files from /boot and not from /media/boot. I might be wrong, please correct me if that is the case.
malomehi
 
Posts: 7
Joined: Thu Feb 02, 2017 8:09 am
languages_spoken: english spanish
ODROIDs: ODROID-C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Sat Feb 04, 2017 5:14 am

malomehi wrote:
I think that by doing that you are copying the multiboot boot files instead of the Linux boot files.
I understand that you need to copy the files from /boot and not from /media/boot. I might be wrong, please correct me if that is the case.


It might seem that way but the repo kernel in this odroid specific distro does something extra compared to normal linux distro's. Extra postinst scripts are provided which copy the new kernel, uInitrd and meson64_odroidc2.dtb to /media/boot (root dir of /dev/mmcblk0p1) which is the correct place when using ubuntu on an odroid without multiboot. My scripts then copies those files to /media/boot/multiboot and adds the .linux extension. It might be more elegant to move them instead of copying but I am not sure if that would break something and the kernel/initrd in /boot are also left untouched so I kept that convention.

So the process in short:
1. install kernel/initrd to /boot (default linux distro behavior)
2. copy and rename kernel/initrd to /media/boot (odroid specific behavior)
3. copy and rename kernel/initrd to /media/boot/multiboot (multiboot specific behavior)
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Sat Feb 04, 2017 5:21 am

Lakka and volumio are very picky.

I did a reformat with only linux and oelec, made the dummy android partitions larger and formatted them with ext4. Now trying to get volumio running by replacing boot.ini.linux with the volumio boot.ini.
I put volumio on /dev/mmcblk0p2 (location is variable through boot parameters) and created volumio_data on /dev/mmcblk0p3 (device location is hard coded in the init in uInitrd) and changed the boot.ini accordingly but it does not boot. Gonna have to hook it up to the usb UART to see what it spits out. No output on the tv and the led stays constant blue.

Edit: it's working. Made a dumb typo in both ini's.
I now have 3 boot options: linux, oelec and linux2.
I put volumio under linux2. Lakka also works and can also be set at linux2.
It will not work when setting it under android.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby malomehi » Sun Feb 05, 2017 12:01 am

barturblits wrote:
It might seem that way but the repo kernel in this odroid specific distro does something extra compared to normal linux distro's. Extra postinst scripts are provided which copy the new kernel, uInitrd and meson64_odroidc2.dtb to /media/boot (root dir of /dev/mmcblk0p1) which is the correct place when using ubuntu on an odroid without multiboot. My scripts then copies those files to /media/boot/multiboot and adds the .linux extension. It might be more elegant to move them instead of copying but I am not sure if that would break something and the kernel/initrd in /boot are also left untouched so I kept that convention.



Thanks for the clarification. Do you think that by making a backup of the linux files we have the risk of running out of space in the partition?
malomehi
 
Posts: 7
Joined: Thu Feb 02, 2017 8:09 am
languages_spoken: english spanish
ODROIDs: ODROID-C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Sun Feb 05, 2017 5:06 am

malomehi wrote:Thanks for the clarification. Do you think that by making a backup of the linux files we have the risk of running out of space in the partition?

No backups are not cumulative. After a kernel update it overwrites the previous backup with the new backup so there is always only one backup kernel/initrd/dtb. Just to make it a bit easier to recover, you can always manually mount the linux partition and copy the needed files to the multiboot folder.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby malomehi » Sun Feb 05, 2017 5:23 am

Yes, I understand that backups are overwritten. At the moment my /dev/mmcblk0p1 partition (with no backups) is only 108M of available space, that's why I asked.
malomehi
 
Posts: 7
Joined: Thu Feb 02, 2017 8:09 am
languages_spoken: english spanish
ODROIDs: ODROID-C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby mad_ady » Sun Feb 05, 2017 3:39 pm

The kernel, initrd and dtb should be under 20MB
User avatar
mad_ady
 
Posts: 2890
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Sun Feb 05, 2017 8:55 pm

malomehi wrote:Yes, I understand that backups are overwritten. At the moment my /dev/mmcblk0p1 partition (with no backups) is only 108M of available space, that's why I asked.

Aha ok. Is that before or after your first kernel update?
You could also change the script and move the kernel etc from /media/boot to multiboot instead of copying.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby dante6913 » Mon Feb 13, 2017 4:03 am

Hi, first i would like to thank you all for your great work.
I tried the installer, my goal was to put ubuntu on a emmc card, android and libreelec on a sd card.
I prepared the emmc card with the installer and the usb stick (ext4) with the files from loboris. My first issue was that i coudn't set the correct resolution, i need vesa 1280X1024 but setting it to the boot.ini just gives me a mess. i had to use 1080p, later on boot.ubuntu.ini was able to set the correct resolution, but in android i don't know how to change it.
So, i need some help, please!

Solution
Found it, i had to go to the sd car and change boot.android.ini!
Now trying to install the latest hardkernel ubuntu mate image...
dante6913
 
Posts: 53
Joined: Sat Oct 01, 2016 7:16 am
languages_spoken: english, Portuguese
ODROIDs: C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby asplundj » Mon Feb 13, 2017 8:49 pm

Will I be able to wake up with IR after power off (http://odroid.com/dokuwiki/doku.php?id=en:c2_ir_wake_up) when using multiboot?
asplundj
 
Posts: 8
Joined: Fri Feb 10, 2017 4:12 pm
languages_spoken: english
ODROIDs: ODROID C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby rooted » Wed Feb 15, 2017 3:38 am

asplundj wrote:Will I be able to wake up with IR after power off (http://odroid.com/dokuwiki/doku.php?id=en:c2_ir_wake_up) when using multiboot?

Unless not using the stock uBoot, yes.
User avatar
rooted
 
Posts: 3673
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby crazyquark » Fri Feb 17, 2017 6:20 am

Hello,

I've tried to get this to run on an emmc card with Libreelec and Android 6 (v2.2).
It only boots once(Android only) and after a reboot I get a purple screen and the blue LED stays on/solid.

:(

Edit:
Seems that installer v2.2 is not complete/ready for production :).
I switched to the prepared image from GDrive and I am able to boot Android now but not Libreelec.

Edit2:
Got Libreelec to boot as well by manually editing boot.ini.oelec and matching it with the boot.ini from the original LibreElec tar.
Yey!

Edit3:
Booting Libreelec just once ruins the boot.ini and it only boots itself after that, no more menu.

Edit4:
The only config that worked for me is:
Using the prebuilt multiboot image (v2.1) flashed to eMMC:
1. Install Android 6.0.1 (v2.2) amd Libreelec 7.1(the one loboris linked) on eMMC
2. Install the c2 slimmed down Xenial on SD card

If I install the Linux on the eMMC it messes things up.
crazyquark
 
Posts: 203
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Sat Feb 18, 2017 8:37 am

crazyquark wrote:Hello,

I've tried to get this to run on an emmc card with Libreelec and Android 6 (v2.2).
It only boots once(Android only) and after a reboot I get a purple screen and the blue LED stays on/solid. :(

Edit:
Seems that installer v2.2 is not complete/ready for production :).
I switched to the prepared image from GDrive and I am able to boot Android now but not Libreelec.

Edit2:
Got Libreelec to boot as well by manually editing boot.ini.oelec and matching it with the boot.ini from the original LibreElec tar.
Yey!

Edit3:
Booting Libreelec just once ruins the boot.ini and it only boots itself after that, no more menu.

Edit4:
The only config that worked for me is:
Using the prebuilt multiboot image (v2.1) flashed to eMMC:
1. Install Android 6.0.1 (v2.2) amd Libreelec 7.1(the one loboris linked) on eMMC
2. Install the c2 slimmed down Xenial on SD card

If I install the Linux on the eMMC it messes things up.


Where did you find v2.2? I used the prebuilt image (v2.1) and tried to change some stuff in the init in uInitrd but after repacking I got errors and it is not recognized as multiboot setup.
I looked at the last 3 commits and saw that the init for C2 changed from version v2.3 to v2.1. Maybe v2.2 is older?

I started with a triple boot of android 6, ubuntu (loboris) and libreelec 7.x. After some manual editing of the boot.ini files they all worked. After that I started fresh and installed ubuntu and LE and made the android partitions larger to put volumio and lakka on them. Menu now has a triple boot (LE on oelec, lakka on linux and volumio on linux2) and I can boot into ubuntu through a script ran from one of those three os'. I just put it on github:

https://github.com/barturblits/Odroid_C ... ot_scripts
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby dante6913 » Sun Feb 19, 2017 8:50 am

Can anyone help, and tell me how can I install opengapps with android 6 with the multiboot installer. I tried with de c2 app but doesn't seem to work.
dante6913
 
Posts: 53
Joined: Sat Oct 01, 2016 7:16 am
languages_spoken: english, Portuguese
ODROIDs: C2

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby crazyquark » Thu Feb 23, 2017 8:06 pm

barturblits wrote:
Where did you find v2.2? I used the prebuilt image (v2.1) and tried to change some stuff in the init in uInitrd but after repacking I got errors and it is not recognized as multiboot setup.
I looked at the last 3 commits and saw that the init for C2 changed from version v2.3 to v2.1. Maybe v2.2 is older?

I started with a triple boot of android 6, ubuntu (loboris) and libreelec 7.x. After some manual editing of the boot.ini files they all worked. After that I started fresh and installed ubuntu and LE and made the android partitions larger to put volumio and lakka on them. Menu now has a triple boot (LE on oelec, lakka on linux and volumio on linux2) and I can boot into ubuntu through a script ran from one of those three os'. I just put it on github:

https://github.com/barturblits/Odroid_C ... ot_scripts


I got v2.2 by building the image from the github repo:
https://github.com/loboris/Odroid-installer

About your scripts: how do you apply them?
Copy the boot.ini on the sdcard after doing the install?
crazyquark
 
Posts: 203
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Multiboot&Universal Installer for Odroid C1, C2 and XU3/

Unread postby barturblits » Fri Feb 24, 2017 8:27 am

crazyquark wrote:
I got v2.2 by building the image from the github repo:
https://github.com/loboris/Odroid-installer

About your scripts: how do you apply them?
Copy the boot.ini on the sdcard after doing the install?


Ok, didnt know that was version 2.2. Also tried from github but could not get it to work properly.
Yes, do a standard install android and/or ubuntu and/or libreelec and then boot into for example ubuntu (or another OS that works). Ubuntu has /media/boot mounted rw but libeelec and android not. So:

For libreelec:
mount --remount,rw /flash

You can follow my custom extension naming or loboris' his. I change all file extensions for an os and the reference in the boot.ini.xxx file and when I want to add it to the boot menu I only change the boot.ini.xxx to loboris his accepted extension So for example I mv/cp boot.ini.ubuntu to boot.ini.linux in the multiboot folder. Mostly because I also boot lakka and volumio. If you follow my extensions you probably do not have to change anything for the standard supported OS' (lakka and volumio will need some changing). If you want to use loboris his naming then change the variables in boot.ini.xxx:

fatload mmc 0:1 ${initrd_loadaddr} multiboot/uInitrd.ubuntu
fatload mmc 0:1 ${loadaddr} multiboot/Image.ubuntu
fatload mmc 0:1 ${dtb_loadaddr} multiboot/meson64_odroidc2.dtb.ubuntu

to

fatload mmc 0:1 ${initrd_loadaddr} multiboot/uInitrd.linux
fatload mmc 0:1 ${loadaddr} multiboot/Image.linux
fatload mmc 0:1 ${dtb_loadaddr} multiboot/meson64_odroidc2.dtb.linux

Watch out with libreelec, you cannot easily change SYSTEM to SYSTEM.libreelec or something similar. Then you will need to make changes to the source of LE and manually compile it again.
Volumio also has this kind of restraint, location of volumio system and its file name can be easily adjusted but the data partition is hardcoded to be on mmcblk0p3. I do not use android so that partition was free but if you use android be careful when sharing partitions with multiple OS'.
barturblits
 
Posts: 51
Joined: Fri Jan 06, 2017 6:33 pm
languages_spoken: english, dutch, german

PreviousNext

Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest