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/cant-add-ubuntu-in-lilo-conf-855333/)

ponce 01-11-2011 05:49 AM

please, don't post questions twice: you got already an answer in the other topic.

Miter_J 01-11-2011 06:05 AM

Quote:

Originally Posted by ponce (Post 4220363)
please, don't post questions twice: you got already an answer in the other topic.

Sorry but I don't think these are the same. The third one of that thread is kinda like this one but that thread is over now.:)

Miter_J 01-11-2011 06:06 AM

Quote:

Originally Posted by SeSoX (Post 4220353)
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 :)

IMO this is not a "full path" cuz this path doesn't exist at all when booting because nobody mounted it. Maybe this just help lilo to find out the physical address.
In fact I don't know what's right at all cuz my brain is messed up :banghead:
I don't know if what I think is right.
I'm writing it down. If anyone finds it incorrect, please let me know cuz this is only what I think is right.
When run "lilo" in slack, lilo find that my image is "/mnt/hd/boot/vmlinuz" and the initrd is in the same folder. So it looks for the PHYSICAL ADDRESS for this file. Assume the image's address is 000000 and the initrd's address is 100000. Then lilo write these infomation into MBR. When booting Ubuntu, lilo checks the address 000000 and 100000 and finds out the two files and then boot using them.
But what about grub? What's the way it works? Does it write the file's location just like "/boot/vmlinuz" and just search for the files using this path when booting? If so, how could grub know where to search since I have 2 /(one for ubuntu and one for slack)?

SeSoX 01-11-2011 06:38 AM

Well, if it already works I wouldn't worry that much about how they work. Anyway t3 already explained how lilo and grub work. For more information I'd send you to grub or lilo documentation or just check the wikipedia. I think you can ask again if you have a more specific question :)

Miter_J 01-11-2011 06:50 AM

Quote:

Originally Posted by SeSoX (Post 4220410)
Well, if it already works I wouldn't worry that much about how they work. Anyway t3 already explained how lilo and grub work. For more information I'd send you to grub or lilo documentation or just check the wikipedia. I think you can ask again if you have a more specific question :)

:scratch:I feel uncomfortable without knowing why it functions this way 0.0
Waiting for someone teaching me, then~
:)

igadoter 01-11-2011 10:01 AM

@Miter J
Calm down. At this moment you have the solution which works. Maybe is not perfect. Give yourself time. All that stuff about booting systems is rather difficult.

ponce 01-11-2011 10:39 AM

if you like to read something on the subject

http://lmgtfy.com/?q=how+grub+works
http://lmgtfy.com/?q=how+lilo+works

(sorry, my BOFH inner soul overwhelmed me)

T3slider 01-11-2011 01:56 PM

Quote:

Originally Posted by Miter_J (Post 4220375)
I'm writing it down. If anyone finds it incorrect, please let me know cuz this is only what I think is right.
When run "lilo" in slack, lilo find that my image is "/mnt/hd/boot/vmlinuz" and the initrd is in the same folder. So it looks for the PHYSICAL ADDRESS for this file. Assume the image's address is 000000 and the initrd's address is 100000. Then lilo write these infomation into MBR. When booting Ubuntu, lilo checks the address 000000 and 100000 and finds out the two files and then boot using them.
But what about grub? What's the way it works? Does it write the file's location just like "/boot/vmlinuz" and just search for the files using this path when booting? If so, how could grub know where to search since I have 2 /(one for ubuntu and one for slack)?

That's basically correct. For GRUB, it writes the file's location (/boot/vmlinuz) to the MBR (well, actually, it just writes information required for locating the GRUB configuration files, like menu.lst for GRUB legacy, so even if you modify the file you still don't need to rewrite to the MBR...), and it differentiates between Slackware's and Ubuntu's kernels based on the 'root' path that you provide (sda1 vs. sda2, for example, in the form of hd0,0 vs. hd0,1 for GRUB legacy). GRUB mounts the partition (hd0,0 for example, corresponding to sda1 in GRUB legacy) and locates the /boot/vmlinuz file on that partition. GRUB is a more elegant solution, and provides a method of troubleshooting at boot-time (so you don't need to boot the system using a third-party kernel or do some LiveCD chroot nonsense if you make a mistake like you do with LILO). However, it is more complex than LILO, and assuming there are no errors when you run `lilo`, and you are pointing to the correct root device in /etc/lilo.conf, you can be confident that it will boot properly when you reboot the system. With GRUB, you're guessing about what the file locations will be on the other distro when it boots, making it a tad more confusing (to me, anyway), but it is more flexible overall. The only tricky part with GRUB is when you boot with a separate /boot partition -- then you must specify the files as if they are at the root of the filesystem instead of in /boot on the root (/) partition. For example:
Code:

root (hd0,0)
kernel /boot/vmlinuz-2.6.7 root=/dev/sda1

if /boot is on your / partition, or
Code:

root (hd0,0)
kernel /vmlinuz-2.6.7 root=/dev/sda2

if /boot is on its own partition and / is on /dev/sda2.

paulsm4 01-16-2011 12:09 PM

igadoter -
Quote:

I get the error: page not found.
I think Robert Thompson meant this:

10.c. Alternative: Using LILO


All times are GMT -5. The time now is 01:08 AM.