LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2020, 03:30 PM   #1
respectablenoob
LQ Newbie
 
Registered: Jun 2020
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29

Rep: Reputation: Disabled
adding android x86 to grub-how?


I installed windows 10 and MX Linux in a dual boot and would like to add android x86 to the grub menu after installation but I have no idea what I should write in the grub40_custom file. I installed android-x86_64-9.0-r2.
My specs:
4GB RAM
Intel Pentium silver N5000
UHD graphics 605
1366x768
1TB HDD

I hope any one can help.
 
Old 08-20-2020, 04:06 PM   #2
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
have you tried running update-grub in mx to see if it adds android to the grub menu?
 
Old 08-20-2020, 04:25 PM   #3
respectablenoob
LQ Newbie
 
Registered: Jun 2020
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
have you tried running update-grub in mx to see if it adds android to the grub menu?
Yes that was the first thing I tried. It detects all other os's but not android. Thanks for taking the time to comment.
 
1 members found this post helpful.
Old 08-20-2020, 07:55 PM   #4
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
here is a fairly similar question with a solution from a couple of years ago: https://askubuntu.com/questions/1014...-grub2#1015281.

when i ran android-x86_64-9.0-r2 live in a virtual machine, the efi directory was located in a directory named Android-x86_9.0-r2_(x86_64) so if the first doesn't work in a grub40_custom file you may want to give that version a try.

Last edited by cordx; 08-20-2020 at 08:28 PM. Reason: wording
 
1 members found this post helpful.
Old 08-20-2020, 10:58 PM   #5
respectablenoob
LQ Newbie
 
Registered: Jun 2020
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
here is a fairly similar question with a solution from a couple of years ago: https://askubuntu.com/questions/1014...-grub2#1015281.

when i ran android-x86_64-9.0-r2 live in a virtual machine, the efi directory was located in a directory named Android-x86_9.0-r2_(x86_64) so if the first doesn't work in a grub40_custom file you may want to give that version a try.
So do you think that I use the 40_custom file or use the x86 version? Because my computer is not powerful enough for a virtual machine. Thanks
 
Old 08-20-2020, 11:13 PM   #6
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
since the answer in that link wasn't from too long ago, i would try something very similar but with the version you installed: android-x86_64-9.0-r2.
Quote:
menuentry "Android 9" {
set root='(hdX,Y)'
linux /android-x86_64-9.0-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive acpi_sleep=s3_bios,s3_mode SRC=/android-x86_64-9.0-r2
initrd /cm-x86-14.1-rc1/initrd.img
}
of course you need to replace hdX,Y with your drive (X is usually 0 for a single drive system) and partition number for Y. after you add that you would want to update grub again. i read some other threads that said they needed to make that file executable. the one on my system already is, but you might want to check yours just to be sure.

mind you, i haven't tried any of this personally. i'm just going off of what was in that link.

feel free to ignore what i said about the virtual machine for now.
 
Old 08-22-2020, 04:58 PM   #7
respectablenoob
LQ Newbie
 
Registered: Jun 2020
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
since the answer in that link wasn't from too long ago, i would try something very similar but with the version you installed: android-x86_64-9.0-r2.

of course you need to replace hdX,Y with your drive (X is usually 0 for a single drive system) and partition number for Y. after you add that you would want to update grub again. i read some other threads that said they needed to make that file executable. the one on my system already is, but you might want to check yours just to be sure.

mind you, i haven't tried any of this personally. i'm just going off of what was in that link.

feel free to ignore what i said about the virtual machine for now.
Thanks! I will try this later today and later tell you if it worked.
 
1 members found this post helpful.
Old 08-23-2020, 03:56 PM   #8
respectablenoob
LQ Newbie
 
Registered: Jun 2020
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
since the answer in that link wasn't from too long ago, i would try something very similar but with the version you installed: android-x86_64-9.0-r2.

of course you need to replace hdX,Y with your drive (X is usually 0 for a single drive system) and partition number for Y. after you add that you would want to update grub again. i read some other threads that said they needed to make that file executable. the one on my system already is, but you might want to check yours just to be sure.

mind you, i haven't tried any of this personally. i'm just going off of what was in that link.

feel free to ignore what i said about the virtual machine for now.
It didn't work. I also tried entries from other sites to no avail. Any suggestions?
 
1 members found this post helpful.
Old 08-24-2020, 06:44 PM   #9
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
it might help to know what you tried and if you got any error messages. when i was working with grub2/iso boot (which uses similar menu entries) sometimes running a web search for the error i got from a failed boot attempt helped me refine the menu entry.

another idea is to check android's files from mx to make sure that the kernel and initrd are located in a directory with a name like:
Quote:
linux /android-x86_64-9.0-r2/kernel quiet root=/dev/ram0
SRC=/android-x86_64-9.0-r2
initrd /android-x86_64-9.0-r2/initrd.img
that was part of what i meant with my comment about a vm. the kernel on that one (which was different because it was running live) was in an entirely different directory.

another question i had is whether or not android offered to install grub? i don't think i have ever had it as a full install so i don't know if that is an option. of course, on the off chance it does and you want to try that, i would have a full offline clonezilla image of mx and win10 before trying such a thing if it were my system.

the last thing i can think of is to simply contact the android-x86 folks and see if they can help: https://www.android-x86.org/contact.html. sometimes the downside of going with a less used distro is that the general help tips just don't work with them.

this veers into the realm of unrequested advice, but i did notice when checking out their site that the bulk of their sponsors are online casinos. not that there is anything inherently good bad or in-between about them. i would just question why so very many would be interested in a smaller distro and what that might mean for what that distro does on my system /unrequested
https://www.android-x86.org/
 
Old 08-29-2020, 06:32 AM   #10
respectablenoob
LQ Newbie
 
Registered: Jun 2020
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
it might help to know what you tried and if you got any error messages. when i was working with grub2/iso boot (which uses similar menu entries) sometimes running a web search for the error i got from a failed boot attempt helped me refine the menu entry.

another idea is to check android's files from mx to make sure that the kernel and initrd are located in a directory with a name like:

that was part of what i meant with my comment about a vm. the kernel on that one (which was different because it was running live) was in an entirely different directory.

another question i had is whether or not android offered to install grub? i don't think i have ever had it as a full install so i don't know if that is an option. of course, on the off chance it does and you want to try that, i would have a full offline clonezilla image of mx and win10 before trying such a thing if it were my system.

the last thing i can think of is to simply contact the android-x86 folks and see if they can help: https://www.android-x86.org/contact.html. sometimes the downside of going with a less used distro is that the general help tips just don't work with them.

this veers into the realm of unrequested advice, but i did notice when checking out their site that the bulk of their sponsors are online casinos. not that there is anything inherently good bad or in-between about them. i would just question why so very many would be interested in a smaller distro and what that might mean for what that distro does on my system /unrequested
https://www.android-x86.org/
Yes android offers to install grub, I tried but it doesn't detect any linux distros and there is no update-grub. i will see about contacting android x86. i am marking this thread as solved now. Thanks for your help!
 
Old 10-23-2020, 10:45 PM   #11
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,065

Rep: Reputation: 146Reputation: 146
Question

Quote:
Originally Posted by respectablenoob View Post
Yes android offers to install grub, I tried but it doesn't detect any linux distros and there is no update-grub. i will see about contacting android x86. i am marking this thread as solved now. Thanks for your help!
The thing is, apparently Android-x86 is actually using GRUB1, which the GRUB software development team says is deprecated so is given zero support . But the thread isn't solved, is it? I want to boot Android-x86 also. Certainly, ask in their Google group and/or IRC (one or both mentioned in their website if you look closer) but (as I didn't hear back in either) I'm not hopeful about getting any help from them booting generic x86 PCs...

Last edited by dchmelik; 10-23-2020 at 11:10 PM.
 
Old 10-19-2021, 09:02 AM   #12
Crocodillian
LQ Newbie
 
Registered: Oct 2021
Posts: 4

Rep: Reputation: Disabled
This works for me.

For Android-x86 9.0-r2:

Code:
        menuentry "Android-x86" --class android-x86 {
          savedefault
          set root='(hd2,gpt5)'
          linux /android-9.0-r2/kernel quiet root=/dev/ram0
          initrd /android-9.0-r2/initrd.img
        }
If you need to find out your root device, boot grub, press c for command line, and run the command ls.

Last edited by rtmistler; 10-19-2021 at 06:19 PM.
 
1 members found this post helpful.
Old 10-20-2021, 06:08 AM   #13
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Install this? https://www.rodsbooks.com/refind/
For me, it helped on a notebook where the UEFI was a bit weird and could not see Debian.
Refind first start, then the detected OS are proposed.
My thoughts for now.
 
Old 12-30-2021, 10:37 PM   #14
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,065

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by Crocodillian View Post
For Android-x86 9.0-r2:
Code:
        menuentry "Android-x86" --class android-x86 {
          savedefault
          set root='(hd2,gpt5)'
          linux /android-9.0-r2/kernel quiet root=/dev/ram0
          initrd /android-9.0-r2/initrd.img
        }
Thanks; this worked for a few weeks/months, then after some updates (to Slackware64-current & GRUB2) the menu entry disappeared. I read there were some changes to GRUB2 that maybe altered how it detects (or actually doesn't detect) OSs. Is there still a way to do this?

Last edited by dchmelik; 12-30-2021 at 10:38 PM.
 
Old 12-31-2021, 01:41 AM   #15
Crocodillian
LQ Newbie
 
Registered: Oct 2021
Posts: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by dchmelik View Post
Thanks; this worked for a few weeks/months, then after some updates (to Slackware64-current & GRUB2) the menu entry disappeared. I read there were some changes to GRUB2 that maybe altered how it detects (or actually doesn't detect) OSs. Is there still a way to do this?
You should have the file
Code:
/etc/grub.d/40_custom
where you can paste this menu entry, with your correct root device.

After this, run:

Code:
grub-mkconfig -o /boot/grub/grub.cfg
and the menu entry should appear in your boot menu.

The command may be
Code:
grub2-mkconfig
and the config file may be
Code:
/boot/grub2/grub.cfg
depending on how your distro works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LineageOS-x86 broke android-x86 GRUB2 on external hdd dual boot mahaju Linux - Newbie 16 02-23-2020 07:17 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
LXer: Android-x86 4.0 RC1 Released (Android Ice Cream Sandwitch Optimized For Netbooks / Laptops) LXer Syndicated Linux News 0 02-27-2012 08:20 PM
LXer: Android-x86 - run Google Android on a netbook LXer Syndicated Linux News 0 12-06-2009 01:30 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration