Ok, I've done some research and finally was able to edit the virtual box image. Here's how:
If you go to vmlite image's grub entries on boot , the kernel entry (one with "kernel" keyword) has an argument --use-cmd-line
, this cmdline
is defined in the first entry cmdline (hd0,2)/cmdline
, which is a file called cmdline
placed inside boot hard disk's third partition.
This file has the kernel options:
init=/init qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemud=ttyS1
Now you must edit this file called cmdline to change vga=788
option to vga=ask
.
Editing: (on a Linux machine)
You need to install vdfuse
.
sudo apt-get install virtualbox-fuse
create two empty folders somewhere.
sudo mkdir /mnt/image
sudo mkdir /mnt/partition
Then mount the virtual box image (vdi, vmdk or vhd etc) to a folder. (Lets say virtualbox disk image file is /tmp/vmlite.vmdk
and we'll mount it to /mnt/image
folder)
vdfuse -w -f /tmp/vmlite.vmdk /mnt/image
Some files will be created in mount folder named EntireDisk, Partition1 , Partition2, Partition3 and so on.
since we are interested in third partition, we will mount the corresponding file to /mnt/partition
:
sudo mount -o loop /mnt/image/Partition3 /mnt/partition
See the contents:
sudo ls -l /mnt/partition
There'd be cmdline, ramdisk and kernel.
Now we edit the cmdline file (we'll use gedit text editor, you can use one you like):
sudo gedit /mnt/partiton/cmdline
make the edits, change vga=788
to vga=ask
, save and close. Verify new file contents:
sudo cat /mnt/partition/cmdline
Unmount files and images:
sudo umount /mnt/partition
sudo umount /mnt/image
and if we don't need those two folders:
sudo rm /mnt/image
sudo rm /mnt/partition
Done, boot image from virtual box. It'll say press ENTER to view available video modes, On Enter a list is shown, type the digit of choice, or type "scan" to search for more display modes.
NOTE: Not all modes worked ,use VESA modes with color depth 24 or 32 and supported aspect ratios.