[SOLVED] Export grub entry from treusted grub android to grub pc
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Export grub entry from treusted grub android to grub pc
Hi everyone i am having an issue trying to add my android hdd boot to grub-pc config file where i have my linux and windows .
Sadly osprober does not catch android installation on other disk , if i want to launch android from that disk i have to boot computer from that hdd other wise it will not work .
The current config on trusted grub menu in android hdd is :
menuentry 'Kali GNU/Linux, with Linux 5.6.0-kali1-amd64 (recovery mode)' --class kali --class gnu-linux --class gnu >
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd4,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos5 --hint-efi=hd4,msdos5 --hint-baremetal=ahci>
else
search --no-floppy --fs-uuid --set=root 31365657-7bbe-4808-98aa-2ee71f8d377b
fi
echo 'Loading Linux 5.6.0-kali1-amd64 ...'
linux /boot/vmlinuz-5.6.0-kali1-amd64 root=UUID=31365657-7bbe-4808-98aa-2ee71f8d377b ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.6.0-kali1-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-0CAB802F0A7DDDAC' {
insmod part_msdos
insmod ntfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1>
else
search --no-floppy --fs-uuid --set=root 0CAB802F0A7DDDAC
fi
parttool ${root} hidden-
chainloader +1
}
My question is , how to i export the startup line from trusted grub to grub-pc and make it boot to android , copy and paste does not work , i have tried grub customizer without sucess .
I tried to install it here and was unable because i got error "gcc unable to compile executables" despite that i tried multiples versions of gcc and always got the same error .
menuentry 'Android-x86 7.1-r5'{
set root=(hd1,1)
linux /android-7.1-r5/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug SRC=/android-7.1-r5
initrd /android-7.1-r5/initrd.img
}
added to /etc/grub.d/40_custom and rerun update-grub.
may have to change hd1 in the 'set root=" line to something else if the android disk isn't the second drive. grub2 counts drives from 0 and partitions from 1.
The other option is dhainloading
Code:
menuentry 'Android-x86 7.1-r5'{
set root=(hd1)
chainloader +1
}
Last edited by colorpurple21859; 11-22-2021 at 02:25 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.