Install Grub2

496 views
Skip to first unread message

Ivan Vishev

unread,
Jun 11, 2015, 6:38:43 AM6/11/15
to andro...@googlegroups.com
Hi everyone!

Not really an Anddroidx86 question, but also related.

In order to use gapps in Lollipop it's needed to use ext4 format. To use ext4 format it's needed to install grub2 manually, because grub(0.97) cannot boot ext3 format.
I don't have any OS an my computer, i want to install Androidx86 only.
So that is the place where the problems beginn. I've tried to install it from Ubuntu Live CD and Kali Linux with no luck. I'am not expert in Unix systems, so maybe someone can help me. Thanks!
I managed to download and to build grub source. But the installation doesn't work. Later somehow( i really don't know how) i've managed to install grub, but i cannot create any grub.cfg file to boot Android.

Advanced question:

How to add grub2 to source to create a "proper" .iso

Mauro Rossi

unread,
Jun 11, 2015, 1:17:38 PM6/11/15
to andro...@googlegroups.com
Until someone integrates grub2 in the installer, the easiest way is to take a 20-40 Gbyte Hard Drive

Install Ubuntu, but manually creating partitions
/dev/sda1 -> Ubuntu OS
/dev/sda2 -> created for Android-x86, but not used at Ubuntu installation
/dev/sda3 -> Swap partition for Ubuntu

at this point you can install lollipop-x86 by formatting /dev/sda2 as EXT4 partition anytime you want,
and edit 40_custom grub menu entries and use sudo update-grub as described in another post of this forum.

By using two partition of the same Hard Drive you will not have issues in finding the hd, partition,
but in any case you can use grub command line to check,

because infact you will have grub2 on your Hard Drive, it was just installed separately by Ubuntu.

Mauro

Ivan Vishev

unread,
Jun 11, 2015, 5:27:02 PM6/11/15
to andro...@googlegroups.com
Hi Mario!
Thanks for your answer!
Unfortunately i have only 8 GB disk space.
I've already installed GRUB, what i am missing is how to start android from GRUB.

Ivan Vishev

unread,
Jun 11, 2015, 5:45:21 PM6/11/15
to andro...@googlegroups.com
Hi everyone!
I've managed to set GRUB2 to load the needed files and android is also loading, but not completely.
I only see the android command line with root@x86:/
I can also type some commands and get response (like pwd or netconfig).
Why is the GUI doesn't starting? Any idea?
Thanke!

Ivan Vishev

unread,
Jun 19, 2015, 4:52:45 AM6/19/15
to andro...@googlegroups.com
So, i've managed to install grub2 and to run android from it.
Here is the way to do it:
Install Ubuntu to usb-stick, run Ubuntu Live.
Open terminal and install grub in this manner
sudo grub-install --force --boot-directory=/media/username/AndroidHDD /dev/sda
I'am not sure about the --force options, because sometimes  install run perfekt without force, but sometime not.
in  --boot-directory you set the path(!) to Android HDD 
at the and you set the partition where GRUB2 should be installed. In my case it was /dev/sda. Note, don't install grub to /dev/sdaX. GRUB should be placed on you whole disk and not just to one partition.
After everything works fine, you actually should create an grub.cfg file with sudo grub-mckonfig, but it doesnt worked for me, so i created my own file(copied from ubuntu). To load android i've created this menu entry:

menuentry "Android x86" --class android --class linux --class os {
set root="(hd0,msdos1)"
linux /android-2015-06-19/kernel quiet root=/dev/ram0  SRC=/android-2015-06-19 androidboot.hardware=android_x86
initrd /android-2015-06-19/initrd.img
}

In set root="(hd0,msdos1)" you have to right your partition where android is installed. 
If i write set root="(hd0,1)"  it also works fine.
linux /android-2015-06-19/kernel  should be replaced with your paath.

The only one question still unanswered is how to put GRUB2 to .iso image. But it seems to be a little bit complicated.
Reply all
Reply to author
Forward
0 new messages