Any known way to use lilo to boot Android?
That's basically the question. The Android installer (Android 4.4.2) writes a grub.cfg which is this:
Code:
default=0 |
LILO stands for "Linux Loader" and that's a good description of what it is. It can only boot Linux. Well, that's not quite true; lilo comes with a chainloader which it can also boot, and which can then boot early versions of Windows, but nobody uses those now. Lilo can't boot a modern NTFS-based Windows and I doubt if it could boot Android either.
GRUB stands for "Grand Unified Bootloader" and again, it's a good description. Grub can boot just about anything. That's why everybody uses it now. Personally I hate grub because it's so complicated. I use lilo whenever I can; it's just as good as grub on a pure Linux system and much easier to understand. But grub wins hands down on a mixed (multiboot) system. It's not true that nobody uses lilo. Crux uses it and Slackware was using it too when I last looked. |
[GO TO the final paragraph where the real question is if you like.]
I tried Didier's link to no avail. Then I went on reading the grub info file. And this is what I've done, having been rewarded by success. (a) I installed Android 4.4.2 in partition 7. Mount it on /media. (b) I created a small partition[, partition 8. Mount it on /mnt/boot. (c) > mkdir /mnt/boot/android-4.4-r2 > cp /media/android-4.4-r2/* /mnt/boot/android-4.4-r2 > cp -r /media/grub /mnt/boot (d) Crear /mnt/boot/grub/grub.cfg con vim con el siguiente contenido: default=0 timeout=6 menuentry "Android KitKat" { set root='(hd0, 7)' linux /android-4.4-r2/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 SRC=/android-4.4-r2 initrd /android-4.4-r2/initrd.img } hd0 is sda, hd1 is sdb and so on. 7 is the 7th partition. (e) > grub-install --boot-directory=/mnt/boot /dev/sda (f) Reboot (g) End of procedure. You can choose to let the OS installer to create a grub.cfg to see how it looks. It's pretty much like that listed above, but it had (hd0, 6) instead of (hd0, 7) [????] I wanted to make it simple, so I did not installed slackware. Now, I guess the grub.cfg file for Slackware 14.1 won't be much different but, just in case, I would like somebody to guide me in the process if you don't mind. The lilo.conf I use is (essentially): Code:
boot = /dev/sda |
The Grub entry in your initial post is in the format used by Grub Legacy while the entry in your last post is in Grub2 Format. They are not interchangeable. Your comment about "(hd0,6) instead of (hd0,7) is one difference between Grub Legacy and Grub2. Grub Legacy counts drives and partitions from zero while Grub2 counts drives from zero and partitions from one. So in Grub Legacy, sda7 is equal to (hd0,6) and in Grub to it is equal to (hd0,7).
I'm not sure what your question is, but if you want to boot Slackware on sda5 from the Grub2 in Android, the entry below should chainload to Slackware. Not enough info to give a direct boot entry. Quote:
Quote:
Quote:
|
Two things, then: can't Android be booted by LILO? Consider 4.4.2 is a deprecated version, I mean, perhaps it not being so modern, it can. One, and the other: in case it can't, I gave the exact entry I have in lilo.conf to boot Slackware. Anything else you need (I'd like to boot Slackware directly from the initial bootloader)?
|
I see no problem with booting android using lilo -what's getting booted is linux, after all.
|
That is exactly what I thought. The grub.cfg is
Code:
#menuentry "Android KitKat" { Code:
image = /mnt/android-4.4-r2/kernel |
The link below to another post here at LQ has an entry in lilo.conf to boot Ubuntu which, according to the post, does boot.
http://www.linuxquestions.org/questi...ubuntu-613632/ I downloaded and isntalled Android and tried to boot with an entry similar to this post and got the same result you did. I reinstalled it and installed Grub Legacy on Android and ran lilo again from Slackware. I got a message in the lilo output indicating the boot sector had a problem (didn't write it down so don't remember it exactly). The basics of it was that Grub was not installed correctly. Since Android by default uses Grub Legacy, I reinstalled Grub Legacy from another Linux system and then put the entry below in lilo.conf, re-ran lilo and booted it sucessfully from the Slackware Lilo boot menu. The problem I had was that Android did not install Grub correctly. Code:
other = /dev/sdb10 |
In case this helps, this is the custom file (for grub) I used to boot Android-x86 when I had it installed on my PC (it worked fine in my case):
Code:
menuentry "Android 4.4" { |
Quote:
I installed Android in partition 7 and told it to install the Grub bootloader. I suppose it put it in the first disk sector. Anyways it wrote a menu.lst. Then I booted in linux, and mounted /dev/sda7 on /mnt/boot, with menu.lst renamed to grub.cfg and issued the following command: Code:
root@server:~# grub-install --boot-directory=/mnt/boot /dev/sda7 |
Installing a bootloader to a partition installs some code to a specific location/sector of the partition.
Quote:
http://www.control-escape.com/linux/lilo-cfg.html The image line in Lilo should tell the Lilo bootloader on your Slackware partition where to look (which partition) for the kernel on the android partition. I'm not sure why you changed the name of the menu.lst file to grub.cfg? menu.lst or grub.conf are the default names for the Grub Legacy boot menu file, what you see on-screen when you boot. grub.cfg does the same for Grub2. If you installed Grub in Android, did you try booting with the lilo entry I suggested above, the 'other' entry? If Grub installed to your android partition, it should chainload from Lilo. Quote:
Quote:
Are you now trying to install Grub2 to the Android partition and forgetting about booting it from Lilo? The Grub2 entries I have on various distributions all have the 'insmod ext2' entry even though the filesystems are ext4 so I wouldn't worry about it. Android installs Grub Legacy by default and you are trying to install Grub2 so you need to decide which to use, either should work but Grub Legacy is simpler to install. Good luck with it. |
why not using Syslinux?
|
Well, a friend of mine, who does not know anything about computers, has Android 4.4.2 on it's tablet. I wanted to install that OS in my notebook to get familiar with it and be able to help my friend. So, anotther OS won't do.
|
Quote:
If you have the default Grub Legacy installed to the boot sector of the android partition, the 'other' entry I posted above should work. At least it worked on my system. |
So the installer when it runs the grub program writes the bootloader not to the MBR but to the same partition I chose?
|
All times are GMT -5. The time now is 07:59 PM. |