LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-05-2018, 04:50 AM   #1
irajeevankumar
LQ Newbie
 
Registered: Feb 2018
Posts: 4

Rep: Reputation: Disabled
Exclamation How to install a universal grub2 to a usb having android x86 lineageos ?


Help a newbie please...Sorry for my Botched English though...


I have installed a latest android_X86 #LineageOS to a USB Drive. I tried Android Live for a while and decided to INSTALL the OS on another PENDRIVE[Lineage-USB] because i want to use android portably.

While installing i did chose the option install GRUB2 to the drive but when i reboot the system at the end of installtion, my pc cant able to boot it. I did a small search and found a live system called SuperGrub2 which is basically a universal Grub capable of booting whatever operating system installed on any connected device.And i've installed the latter on an other usb[SUPERGRUB2-USB].

SUPERGRUB2-USB boots the Lineage-USB successfully on every devices i have and runs like a charm. Its quite ok for a while using two pendrives simultaneously to boot a single OS but later it seems just WIERD. So now all i need is a Similar Grub setup for my Lineage-USB so that i can boot it from any available pc/laptop/sbc etc.


FYI:
# Attached Screeshot of SuperGrub2 Menu showing installed bootable Android Os.

# Lineage-USB is in EXT4 file system | GPT | created using Gparted on a linux host

# GRUB folder does present on that Lineage-USB after andoid_x86 installation. That folder has only one file called "grub.cfg".
The list of command inside that grub.cfg file are as follows:-

set timeout=10


menuentry "Android-x86 14.1-rc1" {
search --set=root --file /cm-x86-14.1-rc1/kernel
linux /cm-x86-14.1-rc1/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug
initrd /cm-x86-14.1-rc1/initrd.img
}
menuentry "Android-x86 14.1-rc1 (DEBUG mode)" {
search --set=root --file /cm-x86-14.1-rc1/kernel
linux /cm-x86-14.1-rc1/kernel root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug DEBUG=2
initrd /cm-x86-14.1-rc1/initrd.img
}

I dont know why grub did'nt shows up when i boot the Lineage-USB. Help me..
Attached Thumbnails
Click image for larger version

Name:	hh.jpg
Views:	126
Size:	217.9 KB
ID:	26917  

Last edited by irajeevankumar; 02-06-2018 at 06:17 AM.
 
Old 02-05-2018, 07:18 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,692

Rep: Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204
Quote:
While installing i did chose the option install GRUB2 to the drive but when i reboot the system at the end of installtion, my pc cant able to boot it.
What does 'can't boot' mean? You will need to be more specific as to exactly what happens when you try.
When you installed Grub to the pendrive, did you get an option to install to the MBR or the partition on which Android was?
If so, which did you select?
If it is GPT, did you create a BIOS boot partition as part of the install or are you doing an EFI boot?
You indicate there is no Grub folder but that you have a grub.cfg file, where (in what folder) is it?
 
1 members found this post helpful.
Old 02-05-2018, 07:59 AM   #3
irajeevankumar
LQ Newbie
 
Registered: Feb 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
What does 'can't boot' mean? You will need to be more specific as to exactly what happens when you try.
After installing i tried to boot from USB black screen with a Dash just blinks and bios goes to my host PC's bootloader.

Quote:
Originally Posted by yancek View Post
When you installed Grub to the pendrive, did you get an option to install to the MBR or the partition on which Android was?
If so, which did you select?
No i didnt got any option to choose where to intall grub. But im sure that by default its been installed in my android partition itself


Quote:
Originally Posted by yancek View Post
If it is GPT, did you create a BIOS boot partition as part of the install or are you doing an EFI boot? You indicate there is no Grub folder but that you have a grub.cfg file, where (in what folder) is it?
No i didnt create any seperate BIOS boot Partition. I tried EFI boot.EXT4 is the only partition i created. Grub folder is in android partition itself inside boot folder and thats where grub.cfg file is.



Quote:
Thank you for replying to my post.
What should i do ?
#Do i need to change partition table from GPT to MBR.
#If we need to stick with GPT do i need to create a separate partition for bios boot. If so what file system should i use to create bios boot partiition.
#Then... will the installer automaticaly identifies where to install grub

Last edited by irajeevankumar; 02-05-2018 at 09:07 AM.
 
Old 02-05-2018, 05:06 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,692

Rep: Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204
Quote:
No i didnt got any option to choose where to intall grub. But im sure that by default its been installed in my android partition itself
Then you would need to put an entry in the host systems boot menu. If you have an older Legacy system, you have boot code in the MBR which points to the boot menu and from there you make a selection of the OS. If you have an EFI system, you need an EFI entry. If you are using GOT partitioning, you need either a BIOS boot partition or an EFI partition with an EFI entry for your Android. If you want to use Android portable on different computers, you will need boot code in the MBR or a separate EFI partition. I don't have any familiarity with Android so have no idea how it would work.
 
1 members found this post helpful.
Old 02-06-2018, 05:59 AM   #5
irajeevankumar
LQ Newbie
 
Registered: Feb 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
If you want to use Android portable on different computers, you will need boot code in the MBR or a separate EFI partition. I don't have any familiarity with Android so have no idea how it would work.
I just created a separate VFat partition and flagged that as a Boot and then i reinstalled android again on Ext4 and installer's Grub EFI installs itself on that VFAT partition.

IT WORKS !!!

But i can use the USB only on a UEFI system. As you've mentioned earlier i need the same boot code in MBR to make the USB work in different computers .how to do that ? Any Ideas.

Last edited by irajeevankumar; 02-06-2018 at 06:16 AM.
 
Old 02-06-2018, 06:59 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,692

Rep: Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204Reputation: 2204
I've never tried this but you might try installing Grub to the MBR of the pendrive pointing to the /boot/grub directory or wherever the grub.cfg file is. No idea if this will work.
 
1 members found this post helpful.
Old 02-06-2018, 07:13 AM   #7
irajeevankumar
LQ Newbie
 
Registered: Feb 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you but how can i do that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: How to Replace CyanogenMod with LineageOS on Your Android Device LXer Syndicated Linux News 0 03-23-2017 07:45 AM
How To Install Android-x86 tb75252 Linux - Mobile 3 07-19-2016 08:46 AM
LXer: Android on a Stick, or how to install Android-x86 on a USB stick LXer Syndicated Linux News 0 03-28-2015 05:10 AM
[SOLVED] Android x86 will not allow live usb boot up Novatian Linux - Newbie 2 02-07-2015 04:20 PM

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

All times are GMT -5. The time now is 10:39 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