Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29
Rep:
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
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
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
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.
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29
Original Poster
Rep:
Quote:
Originally Posted by cordx
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.
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29
Original Poster
Rep:
Quote:
Originally Posted by cordx
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?
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/
Distribution: Antix 19.2, Androidx86, Windows, MX linux
Posts: 29
Original Poster
Rep:
Quote:
Originally Posted by cordx
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!
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...
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.