LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 09-22-2023, 07:14 PM   #1
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Rep: Reputation: 147Reputation: 147
Question Android-x86 GRUB2?


I'm trying to use GRUB2 to boot Android-x86. The following menu entry works fine on a ThinkPad 20FR but not 20UB (which just boots to Android command-line).

Code:
menuentry "Android" --class android-x86 {
    savedefault
    set root='(hd0,msdos5)'
    linux /android-9.0-r2/kernel quiet root=/dev/ram0
    initrd /android-9.0-r2/initrd.img
}

Last edited by dchmelik; 09-22-2023 at 07:15 PM.
 
Old 10-19-2023, 02:46 AM   #2
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
I would use the UUID of the partition rather than relying on BIOS generated names.
I'm only guessing, but i'd say that android probably couldn't find it's root partition during the boot process on the 20UB.
Screenshots (even off your phone) are very helpful for diagnostics.
 
Old 10-19-2023, 02:49 AM   #3
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Original Poster
Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by Person_1873 View Post
I would use the UUID of the partition rather than relying on BIOS generated names.
I didn't use a BIOS generated name; I used the name of the partition I installed Android on, which has identical configuration/partitioning scheme to the similar/variant device (ThinkPad 20FR) Android works on.

Quote:
I'm only guessing, but i'd say that android probably couldn't find it's root partition during the boot process on the 20UB.
Screenshots (even off your phone) are very helpful for diagnostics.
You didn't really read, did you? It already boots to this partition on the ThinkPad 20UB laptop (what I said it is) but just boots to Android command-line/shell (it's not a rescue shell but bash or something).

Last edited by dchmelik; 10-19-2023 at 02:54 AM.
 
Old 10-19-2023, 05:58 PM   #4
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
Well without screenshots or error messages, your post leaves a lot of room for interpretation.
Perhaps you could post some more useful information rather than attacking the person trying to help?
 
1 members found this post helpful.
Old 10-19-2023, 07:29 PM   #5
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Original Poster
Rep: Reputation: 147Reputation: 147
I wasn't attacking, just pointing out you missed a couple things including that it's a laptop. I don't know of a way to take a screenshot in Android shell and there is no error message. It just says the following.

Code:
Detecting Android-x86... found at /dev/nvme0n1p5
console:/ #
The command ls shows files/directories/folders with 'android' in them and I can also su, so as originally said, Android does actually boot, just doesn't start GUI. Where would I get an error message about that?

Last edited by dchmelik; 10-19-2023 at 07:31 PM.
 
Old 10-19-2023, 11:15 PM   #6
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
Not super familiar with android x86, but you can always take a photo with your phone & post that.
I found a similar issue over on stackoverflow where one of the answers suggests to modify your boot options to force the use of the vesa graphics driver. This feels like the right answer to me
http://https://stackoverflow.com/questions/18223402/how-to-start-gui-from-command-line-in-android-x86#:~:text=To%20fix%20this%2C%20you%20have,then%20boot%20to%20Android%20GUI.
 
1 members found this post helpful.
Old 10-19-2023, 11:33 PM   #7
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Original Poster
Rep: Reputation: 147Reputation: 147
As in the Stack Overflow answer, I added 'nomodeset xforcevesa' after linux in /etc/grub.d/40_custom, and regenerated /boot/grub/grub.cfg but this didn't change anything... that was for Android 8.1 but I have 9.0 (latest on Android-x86.org last time I checked).
 
Old 10-19-2023, 11:47 PM   #8
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
so it would appear that to access the system logs in android, you need to run "logcat" from the command line.

if you run:
logcat -d > /sdcard/log.txt

you should get a log file that we can examine to figure out what is actually happening.
 
1 members found this post helpful.
Old 10-20-2023, 02:33 AM   #9
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Original Poster
Rep: Reputation: 147Reputation: 147
I couldn't create a log because Android-x86 started read-only, and I couldn't find out how to mount a USB flash drive to write to instead (dmesg, /dev, lsusb being different, and there's no lsscsi).
 
Old 10-20-2023, 11:08 PM   #10
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
you can remount your filesystem as rw

# mount -o remount,rw /sdcard

you may need to adjust the mountpoint to suit your system
 
Old 10-20-2023, 11:18 PM   #11
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Original Poster
Rep: Reputation: 147Reputation: 147
With those instructions I managed to get a log but it's about 422KB... don't know that it'd fit here and may be better to put somewhere else...
 
Old 10-21-2023, 03:51 AM   #12
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
You can post to pastebin and share the link
 
Old 10-21-2023, 10:41 PM   #13
dchmelik
Senior Member
 
Registered: Nov 2008
Location: USA
Distribution: Slackware, FreeBSD, Illumos, NetBSD, DragonflyBSD, Plan9, Inferno, OpenBSD, FreeDOS, HURD
Posts: 1,067

Original Poster
Rep: Reputation: 147Reputation: 147
Post Android-x86 log

Here's the Android-x86 log though I'm not expecting anyone to look through much of this because it's almost half a megabyte, so unless you know exactly what things to search for, I don't want to waste a lot of people's time. I still have the older ThinkPad I can use if I really want to use Android. I wish I could report this to Lenovo but they'd probably just say they don't 'support' Android...
 
Old 10-21-2023, 11:19 PM   #14
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
I can see from the log that patchoat is failing to load, this is what brings up your ART (android runtime).
it seems to be attempting to load an address that is not available on the newer machine.
have you tried a fresh install on the newer machine? IIRC android can be a bit funny about changing hardware since it's designed for phones & tablets
 
Old 10-21-2023, 11:26 PM   #15
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
On a deeper reading of the log, your android install is referring to it's internal config files to locate hardware that was configured at install time.
This is not being found since it's booting on fundamentally different hardware.
I think without significant re-writing of configuration files, you'll have a lot of trouble running the same installation on multiple devices.
I suggest having individual installations per hardware configuration.
 
  


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
[SOLVED] How to install a universal grub2 to a usb having android x86 lineageos ? irajeevankumar Linux - Newbie 6 02-06-2018 07:13 AM
LXer: Turn Your Netbook into an Android Device with Android x86 LXer Syndicated Linux News 0 03-03-2012 06:00 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

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