LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-30-2010, 03:49 PM   #1
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Rep: Reputation: 30
How do add lilo entry for ubuntu


I'm currently dual-booting slack 13.0 and ubuntu 10.04
When slack was originally installed, I had an earlier version of
ubuntu on it, and lilo did not pick up the ubuntu.
At that time, I didn't care, because I had no use for the 'old' ubuntu.

When I installed ubuntu 10.04, the boot config file (/boot/grub/grub.cfg)
did include an entry for slackware. Great!

I am looking forward to upgrading slack to 13.1, but I want to make sure
this time that I can also boot ubuntu, should I need to use it and I sure
as heck hope I don't but - just in case - can someone point me to either
1)Slack installation instructions that would enable me to include the other distro in the initial install
OR
2)Instructions on how to edit andprocess lilo.conf after the slack
installation - I've done so in the past, but it has been a long time.
Advice will be appreciated.
What follows is a dump of df from the ubunutu 'side'..
Code:
tim@bart:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda6             52866604   6227476  43953640  13% /
none                   1478976       300   1478676   1% /dev
none                   1483192       360   1482832   1% /dev/shm
none                   1483192        84   1483108   1% /var/run
none                   1483192         0   1483192   0% /var/lock
none                   1483192         0   1483192   0% /lib/init/rw
/dev/sda7             52866604   8722428  41458688  18% /home
/dev/sda8             19223252    276480  17970288   2% /usr/local
/dev/sda2             80242696  27494944  48671660  37% /mnt/slack-home
/dev/sda1             80882992   7840016  68934356  11% /mnt/slack-root
/dev/sda3             19220528    985108  17259072   6% /mnt/slack-usr-local
 
Old 06-30-2010, 03:59 PM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
If grub is working and has a slack entry just don't install lilo at all. IMO anyway.
 
1 members found this post helpful.
Old 06-30-2010, 05:20 PM   #3
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dive View Post
If grub is working and has a slack entry just don't install lilo at all. IMO anyway.
Understood. I had thought of that. Let's take a look at the
existing grub entry for slack 13.0
Code:
menuentry "Linux (on /dev/sda1)" { 
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 697651e6-f6cd-4f67-858f-feb0f1ab11f1
    linux /boot/vmlinuz root=/dev/sda1 ro  vt.default_utf8=0 vga = normal
}
I can see this line with:
Code:
/boot/vmlinuz
not changing because I believe that 'vmlinuz' is a symlink.
Now, for this line (in total):
Code:
search --no-floppy --fs-uuid --set 697651e6-f6cd-4f67-858f-feb0f1ab11f1
Can anything about the arguments in the line above create an issue?
If not, then I can just pick skip in the Install Lilo panel
Thank you
tim
 
Old 06-30-2010, 08:32 PM   #4
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 518

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by Tim Johnson View Post
Now, for this line (in total):
Code:
search --no-floppy --fs-uuid --set 697651e6-f6cd-4f67-858f-feb0f1ab11f1
Can anything about the arguments in the line above create an issue?
If not, then I can just pick skip in the Install Lilo panel
Thank you
tim
The only problem I can think of is if you ever format the partition and reinstall Slackware, the UUID will change and Grub won't be able to find your root partition.

You'll have to boot into Ubuntu and run 'sudo update-grub' to fix it every time this happens.

Btw, to boot Ubuntu from LILO, you can mount your ubuntu partition somewhere like /mnt/ubuntu, add the following to lilo.conf:
Code:
# Chainload Grub2 since Ubuntu seems to prefer it
image = /mnt/ubuntu/boot/grub/core.img
  label = Ubuntu
And run
Code:
/sbin/lilo

Last edited by piratesmack; 06-30-2010 at 08:47 PM.
 
1 members found this post helpful.
Old 07-01-2010, 11:03 AM   #5
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by piratesmack View Post
The only problem I can think of is if you ever format the partition and reinstall Slackware, the UUID will change and Grub won't be able to find your root partition.
Ah! That raises another question. My current layout for slackware 13.0
is
/
/home
/usr/local/bin
So, if I were to upgrade to 13.1 I would not need to format
/?
thank you
 
Old 07-01-2010, 12:31 PM   #6
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287
I have been booting Ubuntu and Slackware since Slackware 12.0.
I have never used Slackware's lilo. I have always used Ubuntu's grub.
Let Ubuntu 10.04 grub2 control the MBR.
When you install Slackware, choose not to install lilo.
Then boot Ubuntu, and run
Code:
sudo update-grub
This will add 4 entries for booting Slackware. You will want to choose the one that is for Slackware's huge-smp kernel (just hit e over each grub entry for Slackware until you find the huge-smp one, then boot that).
Then create an initrd for the generic-smp kernel as instructed in the README in the /boot directory in Slackware.

After you create the initrd to boot the generic-smp kernel, you will need to create a custom boot entry for the Slackware generic-smp kernel in Ubuntu's /etc/grub.d/ directory as per this tutorial:
https://wiki.ubuntu.com/Grub2#User-defined%20Entries
Unfortunately, just running
Code:
sudo update-grub
in Ubuntu will not add an entry to boot the generic-smp kernel for Slackware that includes the initrd line. I have done this many times. The only solution is to add a custom entry for the generic-smp kernel per the link I gave.
For reference, here is my custom Slackware boot file:
I named this file 31_Slackware32-13.1
You can name yours whatever you want. Here is the contents:
Code:
############# Name of this file in /etc/grub.d/ directory is: <31_Slackware32-13.1> ##########
## Adapted from: https://wiki.ubuntu.com/Grub2
## Specifically for custom menu entries: https://wiki.ubuntu.com/Grub2#User-defined%20Entries
##
## Another good tutorial: https://help.ubuntu.com/community/Grub2
## Specifically for custom menu entries: https://help.ubuntu.com/community/Grub2#Creating%20the%20Custom%20Menu
## Remember to make this file executable in Ubuntu.
#
echo "Adding Slackware32-13.1 on /dev/sda5" >&2
cat << EOF
menuentry "Slackware32-13.1 on /dev/sda5" {
        set root='(hd0,5)'
        linux  /boot/vmlinuz-generic-smp-2.6.33.4-smp root=UUID=825d396e-4e04-477f-83e6-c8121e219a31 ro 
        initrd  /boot/initrd.gz
}
EOF
Remember to make this file executable in Ubuntu.
You will of course have to change the device and partition entries to match where your Slackware install is. And use the UUID for your Slackware install.
Write back if you need more help.
I have been dual booting Ubuntu and Slackware since Slackware 12.0, and I have never used lilo.
This is just my opinion, but I just think that grub is better for booting several linux distros (like I do) than lilo.

Last edited by tommcd; 07-01-2010 at 12:41 PM.
 
1 members found this post helpful.
Old 07-01-2010, 01:29 PM   #7
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Thank you. All of this is very useful!
Quote:
And use the UUID for your Slackware install.
1)How do I get the UUID? I believe it is
Code:
ls -l /dev/disk/by-uuid
but a second opinion would be helpful
2)Also, I asked earlier if I needed to format / to upgrade
from 13.0 to 13.1. I'm sure that you can answer that question.
cheers
tim
 
Old 07-01-2010, 01:36 PM   #8
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287
Quote:
Originally Posted by Tim Johnson View Post
1)How do I get the UUID? I believe it is
Code:
ls -l /dev/disk/by-uuid
but a second opinion would be helpful
That command will work. A more useful one is:
Code:
sudo blkid
This will list all of your partitions and their respective UUIDs. (You may be able to run blkid without sudo on Ubuntu. I am not on my Ubuntu system at the moment).
Quote:
Originally Posted by Tim Johnson View Post
2)Also, I asked earlier if I needed to format / to upgrade
from 13.0 to 13.1. I'm sure that you can answer that question.
cheers
tim
I have always done clean installs of Slackware instead of upgrades. If you want to upgrade from 13.0 to 13.1 (the only upgrade that is supported) just follow the UPGRADE.txt and the Changes_And_Hints.txt on any Slackware mirror, or on the first Slackware install CD:
http://slackware.oregonstate.edu/sla....1/UPGRADE.TXT
http://slackware.oregonstate.edu/sla..._AND_HINTS.TXT

Last edited by tommcd; 07-01-2010 at 01:41 PM.
 
1 members found this post helpful.
Old 07-01-2010, 01:53 PM   #9
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by piratesmack View Post
Btw, to boot Ubuntu from LILO, you can mount your ubuntu partition somewhere like /mnt/ubuntu, add the following to lilo.conf:
Code:
# Chainload Grub2 since Ubuntu seems to prefer it
image = /mnt/ubuntu/boot/grub/core.img
  label = Ubuntu
And run
Code:
/sbin/lilo
That seems to be to be the cleanest solution from a Slackware/LILO point of view.
 
Old 07-01-2010, 04:20 PM   #10
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Lufbery View Post
That seems to be to be the cleanest solution from a Slackware/LILO point of view.
How do you reconcile:
Code:
image = /mnt/ubuntu/boot/grub/core.img
  label = Ubuntu
With the following (excerpted) entries for 3 different kernels and
three different menuentries in grub.cfg
Code:
....
linux   /boot/vmlinuz-2.6.32-23-generic root=UUID=fa49ad01-122a-4899-9228-4d232382989a ro   quiet splash
      initrd  /boot/initrd.img-2.6.32-23-generic
....
    linux   /boot/vmlinuz-2.6.32-22-generic root=UUID=fa49ad01-122a-4899-9228-4d232382989a ro   quiet splash
      initrd  /boot/initrd.img-2.6.32-22-generic
....
    linux   /boot/vmlinuz-2.6.32-21-generic root=UUID=fa49ad01-122a-4899-9228-4d232382989a ro   quiet splash
      initrd  /boot/initrd.img-2.6.32-21-generic
....
??
IOWS: Will referencing
Code:
/boot/grub/core.img
give me a choice
of the 3 (thus far ) ) kernels.
And unlike slackware (my experience only, of course) it is not uncommon
to have a kernel panic after synaptic pushes a new kernel on me.
[sigh!]
 
Old 07-01-2010, 04:32 PM   #11
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
Personally, I prefer the chainloading approach, with the distro in each 'other' partition installing its own bootloader to its own root partition: zero maintenance. Below is the relevant section from the machine I'm on at the moment. The label for Slack-Current could just as easily say Ubuntu if you have Ubuntu install its bootloader to /dev/sda8. This is from /etc/lilo.conf:

Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda7
  label = Slack-13-1
  read-only  # Partitions should be mounted read-only for checking
other = /dev/sda8
  label = Slack-Current
other = /dev/sda2
  label = Windows7
  table = /dev/sda
 
2 members found this post helpful.
Old 07-01-2010, 05:00 PM   #12
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Hi DonnieP: I am unfamiliar with chainloading, although I have seen
the term numerous times:
So to clarify let's say that I have
Code:
other = /dev/sda6
label = my_numerous_and_ever_growing_unbuntu_kernels
then if I were to make that selection would I then see control
passed to grub.cfg on /dev/sda6?
thanks
tim
 
Old 07-02-2010, 05:46 AM   #13
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
Quote:
Originally Posted by Tim Johnson View Post
Hi DonnieP: I am unfamiliar with chainloading, although I have seen
the term numerous times:
So to clarify let's say that I have
Code:
other = /dev/sda6
label = my_numerous_and_ever_growing_unbuntu_kernels
then if I were to make that selection would I then see control
passed to grub.cfg on /dev/sda6?
thanks
tim
Yes - as long as you're careful on the Ubuntu installation to select sda6 rather than sda for the bootloader (i.e., root rather than mbr). I think you might have to select 'advanced' on one of the Ubuntu install screens to accomplish this.
 
1 members found this post helpful.
Old 07-02-2010, 10:30 AM   #14
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
I really appreciate all of the help here. I'm inclined to notate
this as solved, but I'll check back at the end of the day to see
if there are any further comments.
thanks

tim
 
Old 07-02-2010, 10:52 AM   #15
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,029
Blog Entries: 52

Rep: Reputation: Disabled
That method mentioned by DonnieP definitely worked with the old grub, I used it when I dual-booted Slack with either Debian or Ubuntu. Never tried it with grub2, though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add Ubuntu 9.04 to lilo sevic33 Linux - Newbie 2 05-27-2009 10:33 AM
Add route entry ust Linux - Newbie 5 09-04-2008 09:43 PM
add entry to startup? TomalakBORG Suse/Novell 1 11-22-2005 05:53 PM
slackware entry in lilo decimal3 Linux - Newbie 2 09-26-2004 04:20 PM
How to add entry for Windows in lilo Wynd Linux - General 2 09-04-2003 04:58 PM


All times are GMT -5. The time now is 06:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration