Grub can't find Android-x86 kernel

2,110 views
Skip to first unread message

Trevor Owen

unread,
Nov 9, 2016, 7:31:29 PM11/9/16
to Android-x86
For several years I have successfully triple-booted my computer with Lubuntu, Windows 7 (now 10), and various versions of Android x86. Last Saturday I installed the Clockworkmod 13 version of Android x86, modified the 40-custom file in /etc/grub.d as I have in the past, and was successfully able to boot CM13 using the Grub menu. Unfortunately I neglected to use the CM13 settings to prevent CM13 from suspending, as I have found in the past when Android x86 suspends on my computer it breaks the boot record somehow, and I have had to use Boot Repair to get back into business. When I discovered I was unable to boot I used a Boot Repair live cd to re-install Grub. After I booted into Lubuntu I wrote a wrote a new 40_custom file entry for CM13 identical to the original (cut and pasted back-up, actually), made the file executable, and ran update-grub. I checked in Grub Customizer to make sure the CM13 entry appeared, then rebooted to get into CM13. When I selected CM13 and pressed "Enter", I got the following error messages:

/cm-x86-13.0-rc1/kernel not found

You need to boot kernel first.

I have checked and re-checked the 40_custom until I am cross-eyed, and probably wouldn't see an error now if it jumped at me. As Android is installed in sda3 (Confirmed from GParted), the line set root='(hd0,3)' should point Grub to the correct partition, and the kernel is located in /cm-x86-13.0-rc1.

Maybe a fresh pair of eyes can find what I am so obviously missing. Any help greatly appreciated.

Here is the CM13 entry in 40_custom

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Android-x86 2.2 (MDPI)" {
set root='(hd0,3)'
linux /cm-x86-13.0-r1/kernel quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-13.0-r1 DATA= DPI=160
initrd /cm-x86-13.0-r1/initrd.img
}

menuentry "Android-x86 2.2 (HDPI)" {
set root='(hd0,3)'
linux /cm-x86-13.0-r1/kernel quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-13.0-r1 DATA= DPI=240
initrd /cm-x86-13.0-r1/initrd.img
}

menuentry "Android-x86 2.2 (VESA)" {
set root='(hd0,3)'
linux /cm-x86-13.0-r1/kernel quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-13.0-r1 DATA= vga=788
initrd /cm-x86-13.0-r1/initrd.img
}

menuentry "Android-x86 2.2 (Debug mode)" {
set root='(hd0,3)'
linux /cm-x86-13.0-r1/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode DEBUG=1 vga=788 SRC=/cm-x86-13.0-r1 DATA=
initrd /cm-x86-13.0-r1/initrd.img
}

Chih-Wei Huang

unread,
Nov 9, 2016, 7:51:12 PM11/9/16
to Android-x86
2016-11-09 7:32 GMT+08:00 Trevor Owen <trevo...@gmail.com>:
> For several years I have successfully triple-booted my computer with Lubuntu, Windows 7 (now 10), and various versions of Android x86. Last Saturday I installed the Clockworkmod 13 version of Android x86, modified the 40-custom file in /etc/grub.d as I have in the past, and was successfully able to boot CM13 using the Grub menu. Unfortunately I neglected to use the CM13 settings to prevent CM13 from suspending, as I have found in the past when Android x86 suspends on my computer it breaks the boot record somehow, and I have had to use Boot Repair to get back into business. When I discovered I was unable to boot I used a Boot Repair live cd to re-install Grub. After I booted into Lubuntu I wrote a wrote a new 40_custom file entry for CM13 identical to the original (cut and pasted back-up, actually), made the file executable, and ran update-grub. I checked in Grub Customizer to make sure the CM13 entry appeared, then rebooted to get into CM13. When I selected CM13 and pressed "Enter", I got the following error messages:
>
> /cm-x86-13.0-rc1/kernel not found

Did you type cm-x86-13.0-rc1 or cm-x86-13.0-r1 ?
(see your CM13 entry below)

Note the release is cm-x86-13.0-rc1
instead of cm-x86-13.0-r1.

Looks like a typo problem...

> You need to boot kernel first.
>
> I have checked and re-checked the 40_custom until I am cross-eyed, and probably wouldn't see an error now if it jumped at me. As Android is installed in sda3 (Confirmed from GParted), the line set root='(hd0,3)' should point Grub to the correct partition, and the kernel is located in /cm-x86-13.0-rc1.
>
> Maybe a fresh pair of eyes can find what I am so obviously missing. Any help greatly appreciated.
>
> Here is the CM13 entry in 40_custom
>
> #!/bin/sh
> exec tail -n +3 $0
> # This file provides an easy way to add custom menu entries. Simply type the
> # menu entries you want to add after this comment. Be careful not to change
> # the 'exec tail' line above.
> menuentry "Android-x86 2.2 (MDPI)" {

2.2... oops...

> set root='(hd0,3)'
> linux /cm-x86-13.0-r1/kernel quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-13.0-r1 DATA= DPI=160
> initrd /cm-x86-13.0-r1/initrd.img
> }

The cmdline has several issues.
Except the possibly wrong /cm-x86-13.0-r1/,
androidboot_hardware=generic_x86 is wrong and must be removed.
acpi_sleep=s3_bios,s3_mode is a very old option
that should not be added now.
DPI=160 is similar.

> menuentry "Android-x86 2.2 (HDPI)" {
> set root='(hd0,3)'
> linux /cm-x86-13.0-r1/kernel quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-13.0-r1 DATA= DPI=240
> initrd /cm-x86-13.0-r1/initrd.img
> }
>
> menuentry "Android-x86 2.2 (VESA)" {
> set root='(hd0,3)'
> linux /cm-x86-13.0-r1/kernel quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-13.0-r1 DATA= vga=788
> initrd /cm-x86-13.0-r1/initrd.img
> }
>
> menuentry "Android-x86 2.2 (Debug mode)" {
> set root='(hd0,3)'
> linux /cm-x86-13.0-r1/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode DEBUG=1 vga=788 SRC=/cm-x86-13.0-r1 DATA=
> initrd /cm-x86-13.0-r1/initrd.img
> }
>



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Trevor Owen

unread,
Nov 11, 2016, 1:06:21 AM11/11/16
to Android-x86
Thank you, Chih-Wei.  I actually discovered the typo myself yesterday, when I booted CM13 manually from the Grub prompt.  Don't know how many times I had reviewed the 40_custom file without seeing it.  I am now able to boot into CM13.  With respect to androidboot_hardware=generic_x86, does it need to be removed or replaced; and, if replaced, what do you recommend?

Chih-Wei Huang

unread,
Nov 11, 2016, 1:17:51 AM11/11/16
to Android-x86
2016-11-10 22:23 GMT+08:00 Trevor Owen <trevo...@gmail.com>:
> Thank you, Chih-Wei. I actually discovered the typo myself yesterday, when
> I booted CM13 manually from the Grub prompt. Don't know how many times I
> had reviewed the 40_custom file without seeing it. I am now able to boot
> into CM13. With respect to androidboot_hardware=generic_x86, does it need
> to be removed or replaced; and, if replaced, what do you recommend?

cm-13.0-x86-rc1 doesn't need it. Just remove it.
For older release (like 6.0-r1 or older) you may
still need to set it correctly.

See this for details:
https://groups.google.com/d/msg/android-x86/Q_kfbZLIFX4/3QEg2sTlAQAJ
Reply all
Reply to author
Forward
0 new messages