LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't add Ubuntu in lilo.conf (https://www.linuxquestions.org/questions/slackware-14/can%27t-add-ubuntu-in-lilo-conf-855333/)

igadoter 01-10-2011 02:59 PM

Quote:

Originally Posted by Miter_J (Post 4219561)
0.0 Sorry.. I'm really a newbie so I'm not sure if I can catch your point.
My slackware is installed in /dev/sda1 and Ubuntu is in /dev/sda5. I mounted the disk sda5 to /mnt/hd and then I added the info using files in /mnt/hd/boot/. So I think I'm running Ubuntu kernel...
Is there a way to detect whether I'm running Ubuntu or Slackware kernel?
BTW, I have no "ub" folder in slackware(at least I didn't find it - -).

Look at this
image = /boot/vmlinuz
root=/dev/hda1
. label = myLinux
image = /boot/vmlinuz
root=/dev/hda2
label=alsomyLinux

The kernel is in fact the same but root partitions are different. Lilo will look at some fixed partition and in the /boot and load the vmlinuz kernel. According to your choice the kernel will mount /dev/hd1 or /dev/hda2. Slackware huge kernel may runs ubuntu because it is huge - it doesn't need additional drivers. Try dmesg command.

T3slider 01-10-2011 04:57 PM

From the lilo.conf entry posted it looks like Ubuntu's kernel is being booted properly when loading Ubuntu -- /mnt/hd/boot/vmlinuz. If it wasn't mounted properly lilo would spit out an error, and unless there's crazy symlinking going on that is Ubuntu's kernel. LILO also references inodes instead of file paths, so assuming the Ubuntu /boot partition was mounted on /mnt/hd I see no reason to assume that Slackware's kernel is being used. If you're paranoid you can check the output of `uname -a` in Slackware and in Ubuntu. They should differ in key places.

Robert.Thompson 01-10-2011 05:58 PM

Quote:

Originally Posted by igadoter (Post 4219657)
I get the error: page not found.

Try this: http://www.gentoo.org/doc/en/handboo...part=1&chap=10

igadoter 01-10-2011 05:59 PM

I don't understand how lilo is at all able to mount any partition under some mount point. Does during a boot lilo mounts /dev/sda1 under /mnt on /dev/sda5 ?

igadoter 01-10-2011 06:03 PM

Quote:

Originally Posted by Robert.Thompson (Post 4219835)

Not much help. It's about (the lilo part) configuring three different kernels for the same root and additionally a W$ partition.

Robert.Thompson 01-10-2011 06:19 PM

You are probably more enthusiastic than I but when I had the same problem yesterday with Windows XP, OpenSuse and Slackware (LILO saw windows & Slackware), I installed Mint Debian onto the OpenSuse partitions (I didn't like it) and installed grub to the MBR as part of the install - now I can boot into Windows, Slackware or Mint.

Originally it was suggested that if I were to re-install Slackware, selecting LILO to MBR, that LILO would pick up OpenSuse as well - I must have don something wrong because it didn't. That's why I installed Mint Debian.

So, if you re-install Ubuntu, it will probably pick up Slackware.

I know, doesn't solve the problem, just circumvents it.

bonixavier 01-10-2011 06:25 PM

The solution to get LILO booting other Linuxes is in the other thread that now has no title.

T3slider 01-10-2011 08:15 PM

Quote:

Originally Posted by igadoter (Post 4219837)
I don't understand how lilo is at all able to mount any partition under some mount point. Does during a boot lilo mounts /dev/sda1 under /mnt on /dev/sda5 ?

LILO doesn't mount anything. LILO is significantly different from GRUB in its execution. GRUB mounts the disk at run-time and tries to load the kernel image/initrd it finds. This means you don't have to rerun anything when you update GRUB, and that you can specify kernel images manually on the GRUB command-line to troubleshoot. LILO takes a much simpler and much more direct route -- less can go wrong, but it isn't as flexible (you must manually run `lilo` to update the MBR after changing lilo.conf). When you run `lilo` after updating lilo.conf, it writes the location of the kernel image and initrd (if there is one) to the MBR directly in the form of inode locations. By doing this, it bypasses the need for any run-time mount points and points directly to the physical location on the hard disk. In GRUB you would specify the location that the kernel image *will have* when the system is booted so it can find it. In LILO you specify the location that the kernel image *has now* and it doesn't need to find it at boot-time since it determines the physical location of that file when writing to the MBR.

Again, based on the lilo.conf portion posted I would be inclined to believe that everything is set up properly...

igadoter 01-11-2011 02:19 AM

@T3Slider
image=/mnt/hd/boot/vmlinuz......(can't remember)
initrd=/mnt/hd/boot/initrd......
label=Ubuntu
root=/dev/sda5
read-only
For me it is absurd. As I understand lilo works during boot it will look under /mnt/hd/ but there should be nothing cause it is used (by default) as a mount point and the directory should be rather empty.

igadoter 01-11-2011 02:29 AM

Quote:

Originally Posted by T3slider (Post 4219930)
When you run `lilo` after updating lilo.conf, it writes the location of the kernel image and initrd (if there is one) to the MBR directly in the form of inode locations. By doing this, it bypasses the need for any run-time mount points and points directly to the physical location on the hard disk.

Sorry but it is very dirty solution. If only what lilo needs is a kernel and initrd it is better to create a directory
/ubuntu on the Slackware partition and tpcopy both the kernel (ubuntu) and its initrd into this directory.

Honestly I think that ubuntu kernel should be booted by GRUB, I dont trust ubuntu developers. They are unable to do anything in a simple manner.

SeSoX 01-11-2011 02:34 AM

Quote:

Originally Posted by Miter_J (Post 4219516)
Haha~ The first "sda7" was just a QUOTE that someone else took for an example~
Now I got this solved.
Just mount the disk and then finding the "image" and "initrd" file would be very easy.
And add

and that's okey~
Now I'm in Ubuntu already.
Thank you, SeSoX

Hi Miter_J, glad it worked :)

I also have to say that the paths are quite weird, wouldn't imagine it would work but if you say it does, I won't say the opposite :)

image=/mnt/hd/boot/vmlinuz......(can't remember)
initrd=/mnt/hd/boot/initrd......
label=Ubuntu
root=/dev/sda5
read-only

With those paths you were showing us I'd say you should use something like the following without the '/mnt/hd/' because that's just a directory in your slackware to mount ubuntu, therefore the real path would be '/boot/file'.

image=/boot/vmlinuz......(can't remember)
initrd=/boot/initrd......
label=Ubuntu
root=/dev/sda5
read-only

brianL 01-11-2011 03:39 AM

Quote:

Originally Posted by bonixavier (Post 4219860)
The solution to get LILO booting other Linuxes is in the other thread that now has no title.

Yeah. I asked for that thread to be merged with this one, but something went badly wrong. Ah well...(what's the smilie for "shrugs shoulders"? :) )

Miter_J 01-11-2011 05:16 AM

Quote:

Originally Posted by SeSoX (Post 4220215)
Hi Miter_J, glad it worked :)

I also have to say that the paths are quite weird, wouldn't imagine it would work but if you say it does, I won't say the opposite :)

image=/mnt/hd/boot/vmlinuz......(can't remember)
initrd=/mnt/hd/boot/initrd......
label=Ubuntu
root=/dev/sda5
read-only

With those paths you were showing us I'd say you should use something like the following without the '/mnt/hd/' because that's just a directory in your slackware to mount ubuntu, therefore the real path would be '/boot/file'.

image=/boot/vmlinuz......(can't remember)
initrd=/boot/initrd......
label=Ubuntu
root=/dev/sda5
read-only

i added this in my slack and these files are in another disk of ubuntu,so l can only mount it first, or l cant find them…
if what t3slider said is right, this might not matter at all since lilo points out the physical address.

SeSoX 01-11-2011 05:29 AM

Yes, probably what t3slider said is right and that's why it works, then you will have to mount it and use the full path, totally right Miter_j :)

Miter_J 01-11-2011 05:31 AM

Quote:

Originally Posted by igadoter (Post 4220205)
@T3Slider
image=/mnt/hd/boot/vmlinuz......(can't remember)
initrd=/mnt/hd/boot/initrd......
label=Ubuntu
root=/dev/sda5
read-only
For me it is absurd. As I understand lilo works during boot it will look under /mnt/hd/ but there should be nothing cause it is used (by default) as a mount point and the directory should be rather empty.

hi igoadoter, if lilo points to the physical address instead of an address as the disk path,this shall not be absurd at all.
im now confused about whether lilo is based on slack or not,and also,whether grub is based on ubuntu. if yes, when slack collapsed, will l be able to boot lilo?if no,how could grub know where to search or which to access since l have 2 root(/) for ubuntu and slack?


All times are GMT -5. The time now is 06:42 PM.