Android x86 vmware не запускается графическая оболочка
I managed to get Android-x86 running in VMware player, but if I need to go to the command line by pressing Alt+F1 I cannot go back to the GUI. How do I restart the GUI from the command line?
4 Answers 4
To start the GUI, I had to select VboxVGA instead of VMSVGA in the VirtualBox display settings of the virtual machine.
Note: This is a solution to make it work with VirtualBox in case it helps someone who finds this question. It is possible that the solution to make it work with VMware player is similar.
Mandatory: Unless guest additions are installed, change the default VMSVGA to VBoxVGA.
This was the only change needed to get Android_x86-9.0-r2 +GRUB in VirtualBox 6.1.10 working for me. 👍
In my case it was VBoxSVGA which helped. You should probably try out all the configurations. One of them should help. Sometimes also upping the Video Memory helps.
This answer is for running Android-x86 in VirtualBox, but the question is about running Android-x86 in VMWare Player.
@Jake indeed, I found this question on a search engine so I thought it can be helpful to share how I fixed the issue for people using VirtualBox that found this question (the solution for VMware player may be similar also). I updated the answer to mention that.
To fix this, you have to open the Virtual Machine Settings for your Android virtual machine and then go to the Display settings on the Hardware tab. Make sure that 3D acceleration is ticked! Start your Android virtual machine and wait maybe up to 10 seconds on the command line. It will then boot to Android GUI.
Adding another optional solution, because even though the most voted solution (written by JAGJIT DHALIWAL) helped me, it didn't do the whole job.
When trying to install android x86 8.1 (oreo) the suggested answer didn't do the trick and the my android VM was stuck on GUI initialization, after viewing this video my problem was solved.
What I had to do is:
- to start the vm in debug mode, or open the CLI before GUI init first.
- remount mnt: mount -o remount,rw /mnt
- edit /mnt/grub/menu.lst ( vi /mnt/grub/menu.lst )
- appending this code to the first option (the first line starthing with kernel) nomodeset xforcevesa
- save the file ( :wq or :x )
- reboot and the VM boots like magic with GUI
To go back to GUI try use Alt+F7
Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.
10 Answers 10
Found the solution!
You have to edit menu.lst file . Here is how:
- boot in debug mode (usually the second option in boot menu)
- when booting stops (for me it just hangs there with flashing cursor and without any prompt) enter mount -o remount,rw /mnt
- enter cd /mnt/grub
- enter vi menu.lst
- press Shift+a
- right under the first boot entry find the line starting with kernel initrd=/in (your line might look different; it depends on Android version; in general just find the line that starts with kernel )
- at the end of the line type vga=834 nomodeset xforcevesa
- press ESC then :wq - these commands will save the file and quit vi
- enter cd /
- enter umount /mnt
- enter reboot -f
Now the system should reboot in the VESA mode of your choice.
This will enforces to use the VESA driver for X.
You can replace the vga=xxx by any number you want for your screen resolution. Also tested that 832 works fine (gives 800x600 resolution).
You can find all the VESA modes when you use the iso file and pick the boot option to boot in VESA mode - it will show the list with all modes (numbers are in hex and there is also a redundant letter in front of some modes - ignore it) and you can test them there immediately to see if it works and is good to use in this menu.lst fix, but you have to convert it from hex to dec first using any hex->dec converter.
I'd like to extend and improve @Jay Smith answer based on personal experience. He is right in the core thing that the cause of the issue is VGA resolution used by Android, but he is wrong in his assumption it is disposable fix and should be typed at each boot.
It can be made persistent, and should be! And I show you how:)
- First of all, install the Android from iso image correctly through the wizard steps.
- Do not use EFI GRUB during install.
- Do not use immediate Run Android_x86 option, instead select Reboot and eject the iso. The error mentioned by @Jay Smith
The big drawback of this approach is that the next time you try to boot from the hard drive, GRUB will not be able to find the image
is not related to VGA issue and should be dealt separately. I also met this error and full reinstall helped, so I assume this error is somehow connected with the Run option, 'cause when I selected Reboot I didn't face the error.
- After the install you will boot and will stuck into Android command prompt. Okay, go on then.
- Now you should try to pick up your correct resolution. It won't necessarily be 788 or 794, as they say here, it all depends on your hardware setup. For me 796, 794 and 792 worked for KitKat, Lollipop and Marshmallow images correspondingly, however your values could be different. Here is the table for linking GRUB VGA values to resolutions. To check what match you use trial and error method
Then on boot to GRUB screen choose e key to edit the option
There you will find a long-long string of options to which you should append your VGA option like that nomodeset vga=794
After editing press Enter and b to boot the desired bootrecord.
- Iterate these steps N times to find proper resolution. You will recognize that by the booting of Android:)
- O-la-la, excellent! We achieved the desired result and booted Android for one time. But this is only 50% of job. I guess you don't want to type this VGA crap each time? Okay, let's go on to persist our result.
- Now we need to edit GRUB config to add our desired resolution. While there are ways that allow doing this within the GRUB itself (i.e. debug mode, grub cmd) I wasn't able to get it to work and propose another 100% solution.
We need working Linux installation (physical or virtual, doesn't matter). The problem here is that GRUB folder cannot be accessed from inside Android as it's protected, and it should be accessed externally. And not from Windows because it doesn't recognize ext3/ext4 partitions, only from *nix OSes. So add this disk (VHD, VDI, VMDK or whatever) to your Linux installation for it to have access to android filesystem
Access /grub/menu.lst . Usually it is located in root folder.
There you'll find smth like
Append the desired VGA option to the bootrecord as we did earlier and that's it!
We've done! Now you can reattach your android disk to virtual machine and happily use it.
Using android-x86-4.4-r3.iso, I created a virtual machine in VMware Workstation 11.0.0 on Mac OS X. I just clicked Create virtual machine, chose my Android ISO, and just hit Next repeatedly until finished (just like I do to create Windows VMs).
I wait, but it doesn't change. If I am supposed to enter a command, I don't know what command. Can anybody help me?
Not the answer you're looking for? Browse other questions tagged android android-x86 or ask your own question.
Linked
Related
Hot Network Questions
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo © 2022 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2022.5.11.42086
Я загрузил последнюю версию Android x86 (android-x86-6.0_20160129.iso) из здесь и попытался установить его на жесткий диск на виртуальной машине в VMware Workstation и в Virtualbox.
Теперь вы можете загрузиться в Android. (Работает даже при перезагрузке)
Ваш ISO поврежден, попробуйте переустановить его из Официальная ссылка на сайт Android
У меня была такая же проблема с установкой на моем жестком диске, и для меня следующие шаги помогли:
-
Как и Джей, упомянутый выше: на установочном носителе я нажал клавишу [Tab].
Я записал точно все аргументы вроде androidboot.hardware=android_x86_64 и DEBUG=2 и т. д., которые теперь отображаются для элемента меню загрузки установочного носителя.
Я добавил все эти аргументы в свою конфигурацию grub и обновил grub.
Выполнение этого Android-загрузки и запуск диспетчера окон.
P.S .: Очень неудобно, если рецензент испортил формат ответа и даже проголосовал за вас, не получая контент.
I've downloaded the latest Android x86 (android-x86-6.0_20160129.iso) from here and tried to install it to the HDD on a VM in VMware Workstation and in Virtualbox.
The installation seems to proceed properly (using EXT4, and EFI Grub) and i get a message that it has installed successfully. However when I reboot it passes GRUB, picks the correct Android installation, but it does not boot. I get the result seen in the screenshot below and then a blank screen with a blinking cursor.
I've seen somehow similar questions on Android-SE (here and here), but they use older versions of Android x86 and don't seem to have solutions that work for me.
The VMs in both VMware and Virtualbox have: HDD=4GB(IDE), RAM=2GB, 2 CPUs and they boot through EFI. I've tried nomodeset and xforcevesa in the Grub boot parameters but nothing seems to work.
The .iso does boot up though all the way to the GUI in Live mode (LiveCD).
Any assistance would be greatly appreciated. I have a feeling that the solution might be something linked to the graphics settings but i'm not exactly sure.
I share your feelings (same issue here). Due to some hints, I've even increased graphics memory to 32MB (no improvement). Some posts speak of the need for 2 partitions (1=primary 100MB for grub, 2=extended with the remaining space for Android), didn't help in my case. Another source suggested manually editing/creating the grub.cfg as menu.lst doesn't work (not tried that yet). My other try with Android 5.1 hung in the boot animation ("android" text), so I gave up after 15min. What OS setting is your install based on? I've used "other Linux", as that worked in the past.
BTW: I've just tried again, for me it doesn't even boot into live mode (ends up at the same place then). Related issue on our sister site which I already mentioned: Android-x86 6.0 Marshmallow in VirtualBox:installation stuck on GRUB
@Izzy : Actually from what i've read, the solution at the link in your previous post (and from a bit of experimentation) is not exactly correct, but it works. From my understanding it's actually the creation of the GPT boot sector that allows the Grub stuff to proceed, not the presence of 2 partitions. I read somewhere that the Android x86 partition formatting fails silently if the "Create/Modify partition is not done" first, leading to the grub installer hanging because the disk wasn't even formatted to begin with. (I'll add this "footnote" also to that link)
2 Answers 2
You have to change your virtual disk type to be IDE because the default type in VMware is SCSI, and [the] Android-x86 kernel is not configured to support SCSI. You can follow these steps:
- Edit [the] virtual machine settings after the virtual machine [is] created.
- Choose the hard disk and remove it.
- Add a hard disk to create a new virtual disk, then you can choose IDE as your virtual disk type.
- When finished, you can install android-x86 normally.
On windows, installing the recommended iso for vmware (android-x86_64-9.0-r2-k49.iso) let you stuck at command prompt.
And if you try the debug startup, you might get stucked with a confusing message
random: 7 urandom warning(s) missed due to ratelimiting
Since the live boot vesa start mode works, the urandom error is not the problem. Rather, the required video acceleration seems to be missing from vmware.
As a result you need to configure grub to start androïd in vesa mode.
This can be accomplished following a procedure described here with some mistakes or incompletness or a little outdated.
After the standard install, you need to
- reboot,
- On grub boot choice (white text on black background), keep first choice and type 'e'
After that, you can see existing boot commands in the boot sequence. - Select the upper item and - press e once more
To edit the boot command for GRUB, Use arrows to reach the right position
- replace the word "quiet" by "nomodeset xforcevesa", you should have:
kernel /android-. -r?/kernel nomodeset xforcevesa root=/dev/ram0 androidboot.selinux=permissive SRC=/android-. -r?
presse enter to save. then b to boot.
For the grub configuration to persist upon restart, edit its configuration file:
mkdir /mnt/sda mount /dev/block/sda1 /mnt/sda vi /mnt/sda/grub/menu.lst
Press "i" to use insertion mode:
- replace the word "quiet" by "nomodeset xforcevesa", escape to go back to command mode.
Then ZZ or :wq! to save and quit
You now can restart your vm using your custom configuration.
If ever you wait too long without any action, your screen might turn black, entering the sleep mode. Use your keynoard's menu key to recover a usable screen.
Я скачал последнюю версию Android x86 (android-x86-6.0_20160129.iso) отсюда и попытался установить ее на жесткий диск на виртуальной машине в VMware Workstation и в Virtualbox.
Я видел как-то похожие вопросы на Android-SE ( здесь и здесь ), но они используют более старые версии Android x86 и, похоже, не имеют решений, которые мне подходят.
Виртуальные машины в VMware и Virtualbox имеют: HDD = 4 ГБ (IDE), RAM = 2 ГБ, 2 ЦП, и они загружаются через EFI. Я пробовал nomodeset и xforcevesa в параметрах загрузки Grub, но, похоже, ничего не работает.
.Iso загружается через графический интерфейс в режиме Live (LiveCD).
Будем очень благодарны любой помощи. У меня есть ощущение, что решение может быть связано с настройками графики, но я не совсем уверен.
До сих пор я пробовал "Ubuntu" и "FreeBSD" . позвольте мне возиться с некоторыми другими и посмотреть, поможет ли это.
Кстати, я только что попробовал еще раз, для меня это даже не загружается в режиме реального времени (заканчивается в том же месте). Связанный вопрос на нашем дочернем сайте, о котором я уже упоминал: Android-x86 6.0 Marshmallow в VirtualBox: установка зависла на GRUB
@ Иззи: На самом деле из того, что я прочитал, решение по ссылке в вашем предыдущем посте (и из небольшого количества экспериментов) не совсем правильно, но оно работает. Насколько я понимаю, это на самом деле создание загрузочного сектора GPT, позволяющего продолжить работу Grub, а не наличие 2 разделов. Я где-то читал, что форматирование раздела Android x86 происходит молча, если сначала «Создать / изменить раздел не выполняется», что приводит к зависанию установщика grub, поскольку диск даже не был отформатирован с самого начала. (Я добавлю эту «сноску» также к этой ссылке)
Вы должны редактировать menu.lst file . Вот как:
- загрузка в режиме отладки (обычно это вторая опция в меню загрузки)
- когда загрузка останавливается (для меня она просто висит там с мигающим курсором и без всякого приглашения) введите mount -o remount,rw /mnt
- войти cd /mnt/grub
- войти vi menu.lst
- нажмите Shift + a
- прямо под первой загрузочной записью найдите строку, начинающуюся с kernel initrd=/in (ваша строка может выглядеть иначе; это зависит от версии Android; в общем, просто найдите строку, которая начинается с kernel )
- в конце типа линии vga=834 nomodeset xforcevesa
- затем нажмите ESC :wq - эти команды сохранят файл и выйдут из vi
- войти cd /
- войти umount /mnt
- войти reboot -f
Теперь система должна перезагрузиться в выбранном вами режиме VESA.
Это заставит использовать драйвер VESA для X.
Вы можете заменить на vga=xxx любой номер, который вы хотите для вашего разрешения экрана. Также проверено, что 832 работает отлично (дает разрешение 800х600).
Вы можете найти все режимы VESA при использовании iso-файла и выбрать опцию загрузки для загрузки в режиме VESA - он покажет список со всеми режимами (цифры указаны в шестнадцатеричном формате, а перед некоторыми режимами также есть избыточная буква) не обращайте на это внимания), и вы можете сразу же проверить их там, чтобы увидеть, работает ли он и подходит ли это menu.lst исправление, но сначала нужно преобразовать его из hex в dec, используя любой hex-> dec преобразователь.
Есть ли утомительный альтернативный вариант, который также не допускает ошибок, которые могут быть вызваны 1 опечаткой?
Я хотел бы расширить и улучшить ответ @Jay Smith на основе личного опыта. Он прав в том, что причиной проблемы является разрешение VGA, используемое Android, но он ошибается, полагая, что это одноразовое исправление, которое следует вводить при каждой загрузке.
Это можно сделать настойчиво, и должно быть! И я покажу вам, как :)
- Прежде всего, правильно установите Android из iso-образа, выполнив шаги мастера.
- Как не использовать EFI GRUB во время установки.
- Вы не использовать сразу же запустить Android_x86 вариант, вместо того, чтобы выбрать Reboot и извлечь изо. Ошибка, упомянутая @Jay Smith
Большим недостатком этого подхода является то, что при следующей попытке загрузки с жесткого диска GRUB не сможет найти образ
это не связано с вопросом VGA и должны рассматриваться отдельно. Я также столкнулся с этой ошибкой и помогла полная переустановка, поэтому я предполагаю, что эта ошибка каким-то образом связана с параметром « Выполнить» , потому что при выборе « Перезагрузка» я не сталкивался с ошибкой.
- После установки вы загрузитесь и застрянете в командной строке Android. Хорошо, тогда иди.
- Теперь вы должны попытаться подобрать правильное разрешение. Это не обязательно будет 788 или 794 , как говорят здесь , все зависит от настроек вашего оборудования. Для меня 796, 794 и 792 работали для изображений KitKat, Lollipop и Marshmallow соответственно, однако ваши значения могли быть разными. Вот таблица для привязки значений GRUB VGA к разрешениям. Чтобы проверить, какое совпадение вы используете методом проб и ошибок
Затем при загрузке на экран GRUB выберите клавишу e, чтобы изменить опцию
Там вы найдете длинную строку опций, к которой вы должны добавить свою опцию VGA вот так nomodeset vga=794
После редактирования нажмите Enter и b, чтобы загрузить нужную загрузочную запись.
- Повторите эти шаги N раз, чтобы найти правильное разрешение. Вы узнаете это при загрузке Android :)
- О-ля-ля, отлично! Мы добились желаемого результата и загрузили Android за один раз. Но это только 50% работы. Я полагаю, вы не хотите каждый раз печатать эту VGA-чушь? Хорошо, давайте продолжим наш результат.
- Теперь нам нужно отредактировать, GRUB config чтобы добавить желаемое разрешение. Хотя есть способы, которые позволяют делать это в самом GRUB (например, режим отладки, grub cmd), я не смог заставить его работать и предложить другое 100% решение.
Нам нужна рабочая установка Linux (физическая или виртуальная, не имеет значения). Проблема здесь в том, что к папке GRUB нельзя получить доступ изнутри Android, поскольку она защищена, и к ней следует обращаться извне. И не из Windows, потому что он не распознает ext3/ext4 разделы, только из * nix ОС. Поэтому добавьте этот диск (VHD, VDI, VMDK или любой другой) в вашу установку Linux, чтобы он имел доступ к файловой системе Android
Доступ /grub/menu.lst . Обычно он находится в корневой папке.
Там вы найдете что-то вроде
Добавьте желаемую опцию VGA к загрузочной записи, как мы делали ранее, и все!
Мы сделали! Теперь вы можете подключить свой android-диск к виртуальной машине и с радостью использовать его.
Читайте также: