tripleboot based on codewalkerster Android+ubuntu+libreelec

Moderators: mdrjr, odroid

tripleboot based on codewalkerster Android+ubuntu+libreelec

Unread postby jesusrp » Tue Jul 05, 2016 3:19 am

I´ve tried to follow this guide (http://codewalkerster.blogspot.com.es/2 ... n.html?m=1) but I would need some details:

First instructions are these, but I don´t know if they have to be done over an ubuntu installation or over an android installation (I guess over Ubuntu):
Copy rootfs and boot partition of Ubuntu to your desktop Ubuntu.
Another question is what would be the PWD for executing these commands:
$ mkdir boot
$ sudo cp -a /media/username/boot/* boot/
$ mkdir rootfs
$ sudo cp -a /media/username/rootfs/* rootfs/

Thank you
Last edited by jesusrp on Fri Feb 02, 2018 6:16 pm, edited 2 times in total.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby codewalker » Tue Jul 05, 2016 11:32 am

1. make bootable android disk.
2. make bootable Ubuntu disk.
3. copy odroid-c2 ubuntu files to your desktop Ubuntu PC.
4. copy files in PC to android disk.
User avatar
codewalker
 
Posts: 497
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby jesusrp » Tue Jul 05, 2016 7:06 pm

codewalker wrote:1. make bootable android disk.
2. make bootable Ubuntu disk.
3. copy odroid-c2 ubuntu files to your desktop Ubuntu PC.
4. copy files in PC to android disk.


Sorry but I don´t understand. The steps could be this and should be done in a Linux Desktop?:

1) Download & extract android self installable image: http://dn.odroid.com/S905/Android/ODROI ... 1.9.img.xz
2) extract it to have an .img file
3) Flash it to a sdcard by using Win32DiskImager
4,5 and 6) The same steps but with ubuntu provided by hardkernel
7) mount these SDCARDS in the ubuntu desktop
8) Perform the rest of the steps, copying and editing files from ubuntu sdcard to Android sdcard

Thank you very much in advance.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby odroid » Tue Jul 05, 2016 7:22 pm

1~6 : okay.

7. Mount the C2 Ubuntu SD card in the Ubuntu x86 PC
8. Copy boot/rootfs partitions in the SD card to your Ubuntu x86 PC and edit the copied files as described on the blog.

The blog has been slightly updated for better understanding.
If there is something unclear, please let us know.
http://codewalkerster.blogspot.kr/2016/ ... n.html?m=1
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby jesusrp » Tue Jul 05, 2016 8:31 pm

Excellent!

I will try to replicate the steps and come back to you in case of any doubts.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby jesusrp » Wed Jul 06, 2016 5:50 am

The comment I have is that when I executed this:

sudo tune2fs /dev/sdc4 -U e139ce78-9841-40fe-8823-96a304a09859

It threw this error:
tune2fs 1.42.12 (29-Aug-2014)
The UUID may only be changed when the filesystem is unmounted.

Si I executed umount /dev/sdc4 and re-executed:
sudo tune2fs /dev/sdc4 -U e139ce78-9841-40fe-8823-96a304a09859

after that I re-mounted android SDCARD.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby odroid » Wed Jul 06, 2016 11:07 am

We will add the "unmount" step in the instruction.

Is the dual-boot working now?
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby jesusrp » Wed Jul 06, 2016 5:12 pm

Yes, it works perfectly. Thank you very much.

I´m planning to add a last post to this thread with all details in order to help everyone.

In order to do that I will repeat the process again from square one.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby odroid » Wed Jul 06, 2016 6:25 pm

Great!
We will also update our guide based on your details.
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby jesusrp » Thu Jul 07, 2016 12:21 am

My last comments would be that in the red text instead ubuntu it should be android and the green text should be ubuntu instead android


in Adnroid
$ su
# mount -o rw,remount /
# vi /system/bin/boot_ubuntu.sh

#!/bin/sh
mv /storage/internal/boot.ini /storage/internal/boot.ini.ubuntu
mv /storage/internal/boot.ini.android /storage/internal/boot.ini
reboot

I will repeat the full process again tomorrow and give full steps.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot or triple boot from SDCARD(codewalkerster.blogs

Unread postby codewalker » Thu Jul 07, 2016 11:38 am

Thank you.
I updated.
jesusrp wrote:My last comments would be that in the red text instead ubuntu it should be android and the green text should be ubuntu instead android


in Adnroid
$ su
# mount -o rw,remount /
# vi /system/bin/boot_ubuntu.sh

#!/bin/sh
mv /storage/internal/boot.ini /storage/internal/boot.ini.ubuntu
mv /storage/internal/boot.ini.android /storage/internal/boot.ini
reboot

I will repeat the full process again tomorrow and give full steps.
User avatar
codewalker
 
Posts: 497
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Thu Jul 07, 2016 6:02 pm

I´ve repeated the process several times and its not working any longer, I mean, android works perfectly but ubuntu is not booting, seems that booting process starts but is stopped at the very begining, the result is a black screen.

PLease, tell me what am I doing wrong.

In a x86 Windows PC perform the following steps (I don´t know if there is a Win32DiskImager for linux):
1) Download, extract and flash ANDROID image to a SDCARD by using Win32DiskImager
2) Download, extract and flash UBUNTU image to a SDCARD by using Win32DiskImager

In a x86 UBUNTU PC perform the following steps:
3) Insert & mount UBUNTU SDCARD recently flashed.

4) In a directory of your choice create a directory in order to copy contents from UBUNTU SDCARD:
$ mkdir odroid-c2_ubuntu
$ cd odroid-c2_ubuntu

Inside this path perform the following steps:
5)Create a directory named boot and copy the contents from boot directory from the UBUNTU SDCARD (in my case sdcard is mounted under /media/jesus):
$ mkdir boot
$ sudo cp -a /media/jesus/boot/* boot/

6)Create a directory named rootfs and copy the contents from rootfs directory from the UBUNTU SDCARD:
$ mkdir rootfs
$ sudo cp -a /media/jesus/rootfs/* rootfs/

7) Delete rootfs/aafirstboot from the local UBUNTU PC filesystem:
$ rm -rf rootfs/aafirstboot

8) Edit rootfs/etc/fstab located in the local UBUNTU PC filesystem (replacing the word boot by the word VFAT):
$ sudo vi rootfs/etc/fstab
LABEL=VFAT /media/boot vfat defaults,rw,owner,flush,umask=000 0 0

9) Remove UBUNTU SDCARD then insert & mount android SDCARD into X86 UBUNTU PC.

In my case, my UBUNTU PC is not mounting android flashed SDCARD unless I previously booted odroid with this SDCARD at least one time.

10) Detect in what device the ANDROID SDCARD was mounted in (in my case it was /dev/sdc4)

11) Umount ANDROID SDCARD and change UUID of this device to e139ce78-9841-40fe-8823-96a304a09859:
$ umount /dev/sdc4
$ sudo tune2fs /dev/sdc4 -U e139ce78-9841-40fe-8823-96a304a09859

12) mount again ANDROID SDCARD in x86 UBUNTU PC, in my case I´ve unplugged and plugged again the android SDCARD
13) Copy ODROID-C2 to android SDCARD the Ubuntu SDCARD files that you copied into UBUNTU X86 PC local filesystem, by performing this steps:

Create a backup of android boot.ini in order to be able to boot android:
$ mv /media/jesus/VFAT/boot.ini /media/jesus/VFAT/boot.ini.android

Copy ubuntu boot directory content to android SDCARD:
$ cp boot/* /media/jesus/VFAT/
Copy ubuntu rootfs directory content to android SDCARD:
$ sudo cp -a rootfs/* /media/jesus/e139ce78-9841-40fe-8823-96a304a09859/
$ sync

Insert SDCARD in Odroid and boot odroid.

When in ubuntu create an executable script in order to reboot to android

$ vi boot_android.sh
#!/bin/bash
mv /media/boot/boot.ini /media/boot/boot.ini.ubuntu
mv /media/boot/boot.ini.android /media/boot/boot.ini
reboot

Add execution permissions, ie like this:
$chmod +x boot_android.sh

reboot to android by executing
$ boot_android.sh

When in android perform the following steps in the terminal emulator app:
$ su
# mount -o rw,remount /

Create a script for rebooting to linux
# vi /system/bin/boot_ubuntu.sh
#!/bin/sh
mv /storage/internal/boot.ini /storage/internal/boot.ini.ubuntu
mv /storage/internal/boot.ini.android /storage/internal/boot.ini
reboot

Add permissions to be executed:
# chmod 777 /system/bin/boot_ubuntu.sh

Please, if you find any mistake in this step list warn me!!!
Last edited by jesusrp on Fri Feb 02, 2018 6:09 pm, edited 2 times in total.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Fri Jul 08, 2016 3:35 pm

Where can I find a description of the steps and requirements of the boot process in odroid?

How can I monitor boot process?

Ubuntu boot is failing, nothing is written on the screen and I don´t know whats going wrong.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby odroid » Fri Jul 08, 2016 4:21 pm

Normally, we use the USB-UART kit cable to monitor u-boot and kernel booting process.

If you add console=tty0 in bootargs in the boot.ini file, you can see some portion of the kernel boot process on the HDMI screen.
Is the blue LED blinking when Ubuntu boot fails?
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Fri Jul 08, 2016 4:29 pm

Yes its blinking. Is that a clue?
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby odroid » Fri Jul 08, 2016 5:13 pm

It means the Kernel loaded and running at least.
Some part of the root file system could be corrupted.
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Sat Jul 09, 2016 12:49 am

Even adding this (console=tty0) to ubuntu boot.ini nothing is printed on the screen. Is there a log file?

What are the steps and what are the files that odroid uses at boot?

Boot process is based on u-boot, probably it looks for certain files in the sdcard. Which ones and in which order?

Is the boot.ini the first file gathered by u-boot?
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby odroid » Sat Jul 09, 2016 8:26 am

Yes, u-boot loads the boot.ini file and runs it like an init scrip.
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Sat Jul 09, 2016 6:27 pm

Previously to read the boot.ini it shows a hardkernel image in the screen, so odroid is booting android even before reading boot.ini

Why? How?

Ive deleted boot.ini from VFAT folder and boot goes on and succeed, after that I can see a new boot.ini in the VFAT folder.
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby odroid » Tue Jul 12, 2016 10:02 am

U-boot shows Hardkernel logo. Android doesn't.
When the boot.ini doesn't exist, u-boot is trying to use the boot script in "env" area.
http://odroid.com/dokuwiki/doku.php?id= ... tion_table

In the Android boot process, the boot.ini file is generated automatically if it doesn't exist.
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby oid » Sat Jul 23, 2016 6:11 am

jesusrp wrote:I´ve repeated the process several times and its not working any longer, I mean, android works perfectly but ubuntu is not booting, seems that booting process starts but is stopped at the very begining, the result is a black screen.


Any progress on this? I seem to have the same issue.

I tried to make the installation a bit easier because I retried it all the time but since it is not working I am not sure if it is correct at all:

Code: Select all
1) download android and ubuntu images
2) with android image create the image using the standard install procedure
3) in a user folder use the ubuntu image to add to the standard android install you created @2:
(assuming the downloaded ubuntu image is in your home dir)

(make sure to have the right /dev/sd by checking dmesg)
unxz selfinstall-odroidc2-eng-s905_5.1.1_master-242-v1.9.img.xz
sudo dd if=selfinstall-odroidc2-eng-s905_5.1.1_master-242-v1.9.img of=/dev/sdb bs=1M conv=fsync
sync;sync;sync
boot odroid-c2 with the created disk.

plug the disk back into the desktop and (make sure to have the proper /dev/sd drive again, 4th partition):
sudo tune2fs /dev/sdb4 -U e139ce78-9841-40fe-8823-96a304a09859
unxz ubuntu64-16.04lts-mate-odroid-c2-20160525.img.xz

# mount the VFAT system, the rootsystem and the big media system (not the cache partition)
sudo mount -o loop,ro,offset=1048576 ubuntu64-16.04lts-mate-odroid-c2-20160525.img /mnt
mv /media/`whoami`/VFAT/boot.ini  /media/`whoami`/VFAT/boot.ini.android
sudo cp /mnt/* /media/`whoami`/VFAT/
cp /media/`whoami`/VFAT/boot.ini  /media/`whoami`/VFAT/boot.ini.ubuntu
sync;sync;sync
sudo umount /mnt

sudo mount -o loop,ro,offset=135266304 ubuntu64-16.04lts-mate-odroid-c2-20160525.img /mnt
sudo cp -a /mnt/* /media/`whoami`/e139ce78-9841-40fe-8823-96a304a09859/

sudo sed -i 's/LABEL=boot/LABEL=VFAT/g' /media/`whoami`/e139ce78-9841-40fe-8823-96a304a09859/etc/fstab
sync;sync;sync
sudo umount /mnt
sudo rm -rf /media/`whoami`/e139ce78-9841-40fe-8823-96a304a09859/aafirstboot
sync;sync;sync
oid
 
Posts: 3
Joined: Thu Feb 25, 2016 1:34 am
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Mon Jul 25, 2016 7:02 pm

I´ve finally succeed but I don´t know what was wrong.

In order to achieve it I´ve made several tests doing different things,but I don´t know what I´ve done in a different way when I succeed.

Once I have it working I´ve made a backup of the full sdcard by using ubuntu Disks utility, and whenever I have a problem I restore that base to the sdcard.

As far as I remember last time I´ve made all copying steps with "cp -a".
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english

Re: dualboot from SDCARD(codewalkerster.blogspot)

Unread postby jesusrp » Fri Feb 02, 2018 6:13 pm

Just to inform you that I tested this method and works for creating a tripleboot Android, ubuntu and Libreelec.
It is required to increase the size of VFAT partition.

I will try to detail the steps, but it is mainly based on this:

In a x86 Windows PC perform the following steps (I don´t know if there is a Win32DiskImager for linux):
1) Download, extract and flash ANDROID image to a SDCARD by using Win32DiskImager
2) Download, extract and flash UBUNTU image to a SDCARD by using Win32DiskImager

In a x86 UBUNTU PC perform the following steps:
3) Insert & mount UBUNTU SDCARD recently flashed.

4) In a directory of your choice create a directory in order to copy contents from UBUNTU SDCARD:
$ mkdir odroid-c2_ubuntu
$ cd odroid-c2_ubuntu

Inside this path perform the following steps:
5)Create a directory named boot and copy the contents from boot directory from the UBUNTU SDCARD (in my case sdcard is mounted under /media/jesus):
$ mkdir boot
$ sudo cp -a /media/jesus/boot/* boot/

6)Create a directory named rootfs and copy the contents from rootfs directory from the UBUNTU SDCARD:
$ mkdir rootfs
$ sudo cp -a /media/jesus/rootfs/* rootfs/

7) Delete rootfs/aafirstboot from the local UBUNTU PC filesystem:
$ rm -rf rootfs/aafirstboot

8) Edit rootfs/etc/fstab located in the local UBUNTU PC filesystem (replacing the word boot by the word VFAT):
$ sudo vi rootfs/etc/fstab
LABEL=VFAT /media/boot vfat defaults,rw,owner,flush,umask=000 0 0

9) Remove UBUNTU SDCARD then insert & mount android SDCARD into X86 UBUNTU PC.

In my case, my UBUNTU PC is not mounting android flashed SDCARD unless I previously booted odroid with this SDCARD at least one time.

10) Detect in what device the ANDROID SDCARD was mounted in (in my case it was /dev/sdc4)

11) Umount ANDROID SDCARD and change UUID of this device to e139ce78-9841-40fe-8823-96a304a09859:
$ umount /dev/sdc4
$ sudo tune2fs /dev/sdc4 -U e139ce78-9841-40fe-8823-96a304a09859

12) mount again ANDROID SDCARD in x86 UBUNTU PC, in my case I´ve unplugged and plugged again the android SDCARD
13) Copy ODROID-C2 to android SDCARD the Ubuntu SDCARD files that you copied into UBUNTU X86 PC local filesystem, by performing this steps:

Create a backup of android boot.ini in order to be able to boot android:
$ mv /media/jesus/VFAT/boot.ini /media/jesus/VFAT/boot.ini.android

Copy ubuntu boot directory content to android SDCARD:
$ cp boot/* /media/jesus/VFAT/
Copy ubuntu rootfs directory content to android SDCARD:
$ sudo cp -a rootfs/* /media/jesus/e139ce78-9841-40fe-8823-96a304a09859/
$ sync
jesusrp
 
Posts: 96
Joined: Mon May 02, 2016 9:55 pm
languages_spoken: english


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 2 guests