LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware, Lilo, Debian, Grub (http://www.linuxquestions.org/questions/slackware-14/slackware-lilo-debian-grub-4175472763/)

Sefid par 08-09-2013 06:52 AM

Slackware, Lilo, Debian, Grub
 
Recently I have installed Debian beside Slackware on another partition.
I needed Grub to load it, So I installed it.
Grub could load Slackware, But not properly, Slackware couldn't open X environment by 'startx'
Then I installed Lilo by Slackware. It could load Slackware properly, But when Debian loaded to login screen, crashed.

I had this problem by Slackware 11 too, which The lilo configured by Slackware 11 could not load Slackware 14.
What can I do in these situations?
What is the problem with these?

How can I make a lilo to boot both Slackware and Debian?

Didier Spaier 08-09-2013 07:43 AM

Quote:

Originally Posted by Sefid par (Post 5006194)
I had this problem by Slackware 11 too, which The lilo configured by Slackware 11 could not load Slackware 14.

This is a known limitation of lilo's version shipped in Slackware 11. Rebuild a 'lilo' package for Slackware 11 using the newer source shipped in Slackware 14 would have solved it.

Quote:

Originally Posted by Sefid par (Post 5006194)
What can I do in these situations?
What is the problem with these?

How can I make a lilo to boot both Slackware and Debian?

To investigate further, we need to know more about your system and settings, so please provide following informations (copy and paste them, of even better attach the files to your next post):
  • full content of Slackware's /etc/lilo.conf
  • full content of Debian's /etc/fstab
  • full content of Slackware's /etc/fstab
  • full output of following commands, typed on Slackware (the latter as root):
    Code:

    cat /proc/partitions
    fdisk -l


cynwulf 08-09-2013 08:05 AM

You don't need grub for either Slackware nor Debian. Just install lilo once in either one and boot from that.

Captain Pinkeye 08-09-2013 08:49 AM

Quote:

Originally Posted by Sefid par (Post 5006194)
Grub could load Slackware, But not properly, Slackware couldn't open X environment by 'startx'

I don't understand this bit. Could someone please explain to me how the bootloader can affect starting X?

Sefid par 08-09-2013 08:59 AM

3 Attachment(s)
Code:

#fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe820841d

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048    3074047    1536000    7  HPFS/NTFS/exFAT
/dev/sda2        3074048    86960127    41943040    7  HPFS/NTFS/exFAT
/dev/sda3        86960128  170481663    41760768    7  HPFS/NTFS/exFAT
/dev/sda4      170483710  564758527  197137409    f  W95 Ext'd (LBA)
/dev/sda5      170483712  183066623    6291456  82  Linux swap
/dev/sda6      183068672  187262975    2097152  83  Linux
/dev/sda7      187265024  396980223  104857600  83  Linux
/dev/sda8      396982272  480868351    41943040  83  Linux
/dev/sda9      480870400  522813439    20971520  83  Linux
/dev/sda10      522815488  564758527    20971520  83  Linux

Code:

#cat /proc/partitions
major minor  #blocks  name

  8        0  312571224 sda
  8        1    1536000 sda1
  8        2  41943040 sda2
  8        3  41760768 sda3
  8        4          1 sda4
  8        5    6291456 sda5
  8        6    2097152 sda6
  8        7  104857600 sda7
  8        8  41943040 sda8
  8        9  20971520 sda9
  8      10  20971520 sda10

/etc/fstab for Debian and Slackware & lilo.conf are attached.
Quote:

Originally Posted by cynwulf (Post 5006241)
You don't need grub for either Slackware nor Debian. Just install lilo once in either one and boot from that.

Do you mean to install two lilos? One on Debian and another on Slackware? Though I need only one!

jprzybylski 08-09-2013 10:06 AM

I personally use Slackware's Lilo (installed on the MBR, the device would be something like /dev/sda) to boot Debian's Grub (installed wherever Debian's root is, ex. /dev/sda3). That way, I still have lots of control over my overall boot, but if I want to use Debian, Debian can keep control of how it wants to start.

xflow7 08-09-2013 10:19 AM

Quote:

Originally Posted by Captain Pinkeye (Post 5006260)
I don't understand this bit. Could someone please explain to me how the bootloader can affect starting X?

Could it be that the GRUB installation is configured to pass some particular kernel parameter that LILO is not? For instance, to prevent loading the nouveau driver so it doesn't conflict with the NVIDIA blob?

Didier Spaier 08-09-2013 03:53 PM

The problem lies in /etc/lilo.conf. You use the same kernel (Slackware's) to boot both Debian and Slackware, as you have the same line:
Code:

image = /boot/vmlinuz
in stanzas for Debian and Slackware. This can't work, or only by chance.

Do this in Slackware:
  1. As root, type "mkdir /debian" (without the quotes, of course)
  2. Add following line to /etc/fstab after the line for /dev/sda7:
    Code:

    /dev/sda9        /debian            ext4        defaults        1  2
  3. Type "mount /debian"
  4. Check in /debian/boot the name of Debian's kernel. I will assume that it's "vmlinuz", else adapt next step accordingly.
  5. In /etc/lilo.conf, replace the line before " root = /dev/sda9" with:
    Code:

    image = /debian/boot/vmlinuz
  6. Run as root "lilo -t -v " and if all goes well, "lilo".
Now you should be able to boot Slackware or Debian.

Sefid par 02-19-2014 09:05 PM

I got failed on Debian, After that, Now I need this for Ubuntu 12.04. I added the image and also initrd to lilo.conf as:
Code:

# Linux bootable partition config begins
image = /friend/boot/vmlinuz-3.11.0-15-generic
  root = /dev/sda9
  label = Kinect
  read-only  # Partitions should be mounted read-only for checking

But Ubuntu loaded on Standard screen resolution and also mouse/keyboard did not work. Then I added the initrd:
Code:

# Linux bootable partition config begins
image = /friend/boot/vmlinuz-3.11.0-15-generic
  root = /dev/sda9
  initrd = /friend/boot/initrd.img-3.11.0-15-generic
  label = Kinect
  read-only  # Partitions should be mounted read-only for checking

Skip checking didn't work.
Also I got warning:
Code:

Warning: LBA32 addressing assumed
Added Linux  *
Added Kinect  +
Added Windows
One warning was issued.

So I added lba32 to lilo.conf and the warning did not appear.

Now screen resolution got correct but there is another problem:
I get the error on Ubuntu boot:
Code:

the disk drive for / is not ready yet or not present. Continue to wait; or press s to skip mounting or M for manual recovery.
What is the next step to get Ubuntu work correctly?
Thanks in advance.

colorpurple21859 02-19-2014 09:31 PM

The error could be caused by several different things. Googling the error message comes up with several different ways to fixed it based on what was done or happened during the installation and or software updates. Could be from a drive that was attached during the install resulting in a bad fstab entry or updates/software install resulting in partition being mounted in read only mode.

tommcd 02-19-2014 09:49 PM

Quote:

Originally Posted by Sefid par (Post 5121278)
I got failed on Debian, After that, Now I need this for Ubuntu 12.04. I added the image and also initrd to lilo.conf as ... What is the next step to get Ubuntu work correctly?

I have been dual booting Ubuntu + Slackware + other distros for several years now.
My preference is to use Ubuntu's grub2 to boot everything.
If you would like to use Ubuntu's grub2 to boot all of your Linux distros, here is how to reinstall grub2 to your computer MBR:
https://help.ubuntu.com/community/Re...tallingWindows
Or you can use a boot repair CD:
https://help.ubuntu.com/community/Boot-Repair
The only problem here is that Ubuntu's grub2 will create multiple boot entries for Slackware since there are huge and generic kernels in the Slackware boot directory.
Since I use an initrd to boot the Slackware generic kernel as Pat V recommends, I just create my own custom boot file for Slackware in Ubuntu's /etc/grub.d/ directory that I name 31_Slackware64-14.1. This way it show up at the bottom of the Ubuntu grub2 menu. I make the file executable. Here is the contents of the file:
Code:

## Remember to make this file executable in Ubuntu.
#
echo "Adding Slackware64-14.1 on /dev/sda5" >&2
cat << EOF
##!/bin/sh
#exec tail -n +3 $0
menuentry "Slackware64-14.1 on /dev/sda5" {
        set root=(hd0,5)
        linux  /boot/vmlinuz-generic-3.10.17 root=/dev/sda5 ro
        initrd  /boot/initrd.gz
}
EOF

Note that my Slackware is on /dev/sda5. Be sure to adjust this depending on where your Slackware partition is.
Note also that I have commented out the lines:
Code:

##!/bin/sh
#exec tail -n +3 $0

I have seen reports on the Ubuntu forums that some people needed those lines to boot other distros from ubuntu's grub2, but I have never needed them. I just keep them in the file for reference.
Then just be sure to run
Code:

sudo update-grub
from Ubuntu after you create the custom boot file for Slackware for the changes to be written to your Ubuntu's /boot/grub/grub.cfg file.
Also, using Ubuntu's grub2 will also let you easily boot Debian if you are still using that after you run "sudo update-grub".
Hope this helps.

enorbet 02-20-2014 06:13 AM

I'm not sure that I've even owned a single OpSys PC since 1993, and many have more than 3 on them. Wait, even in DOS days I often had M$DOS and Novell or Caldera. Hmmmm... In any case with GUI type operating systems, and with my propensity to "muck about and break stuff" I developed the habit of redundant or chainload type booting. If I have 5 operating systems, each one gets a bootloader installed to root, but just one get's it in MBR as well. That insures only one major fail point and pointing to any partition boots it. Simple.

I have had occasion recently where a few systems don't seem to like "Other = /dev/foo2, Label = Foo2" so I keep a local copy of kernel and initrd in it's own subdirectory, like this -

Code:

#####
image = /boot/vmlinuz-custom-3.12
root = /dev/sda9
 label = Slack14-13.12
 read-only ##
###
other = /dev/sda8
label = Stubuntu
###
image = /boot/suse/vmlinuz-3.11.6-4-desktop
root = /dev/sdb8
label = OpenSuSe
read-only##
##
image = /boot/solydk/vmlinuz-3.11-2-amd64
        initrd = /boot/solydk/initrd.img-3.11-2-amd64
        root = /dev/sda12
        append = "nomodeset"
        label = SolydK
read-only##
##
other = /dev/sda3
label = Win7
#####

I only resort to the latter if simple chainloading doesn't work. I like redundancy. It has saved my bacon many times.

cynwulf 02-20-2014 10:52 AM

As you only have one fixed disk (/dev/sda) just install one bootloader in the root controlled by one OS. It doesn't matter which. If you find grub2 easier, just use that. It can usually scan all /boot partitions on the disk and just add entries for all kernels.

Regarding lilo, the issue surrounding the /boot/vmlinuz symlink, confuses me somewhat. I don't think Debian uses that anyway, so you can simply specify the kernel you want to load - e.g. /boot/vmlinuz-3.2.0-4-amd64 for Debian and /boot/vmlinuz-generic-3.10.17-smp for Slackware (or just /boot/vmlinuz assuming the generic kernel is symlinked to that).

Short version: Your original lilo config should work if you specify the correct partition and kernel image. Generally if running lilo passes, then it should work. The problems you reported initially don't seem related.

If you want something more automated - install grub2 once on one OS, do not install grub2 (or lilo for that matter) for two OS.

brianL 02-20-2014 02:14 PM

Quote:

Originally Posted by jprzybylski (Post 5006305)
I personally use Slackware's Lilo (installed on the MBR, the device would be something like /dev/sda) to boot Debian's Grub (installed wherever Debian's root is, ex. /dev/sda3). That way, I still have lots of control over my overall boot, but if I want to use Debian, Debian can keep control of how it wants to start.

That's what I've done whenever dual-booting Slackware with Debian (or any other distro). Only needs two lines in lilo.conf:
Code:

other = /dev/sda3
  label = Debian


Sefid par 02-21-2014 03:22 AM

Thanks all, Your solutions worked properly;

First I installed Grub2 on Ubutnu again and worked fine.
But as lilo is more comfortable for me, I installed lilo again and configured it as brianL said. It worked fine.
LILO finds and boots grub2 from Ubuntu's partition.

my Lilo's partitions setup is as this:

Code:

# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda8
  label = Linux
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
# Linux bootable partition config begins
other = /dev/sda9
label = Kinect
# Linux bootable partition config ends

# Windows bootable partition config begins
other = /dev/sda2
  label = Windows
  table = /dev/sda
# Windows bootable partition config ends



All times are GMT -5. The time now is 10:48 AM.