LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-27-2007, 10:25 AM   #46
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258

I use chain loading in my multiboot configuration. I have GRUB configured to chain boot to Windows XP's NTLDR and I have NTLDR configured to chain boot to GRUB. The Master Boot Record has the standard code to boot whichever partition is set Active and I can change that to select the default boot loader to start. In either case the bootloader can chain to the other operating system.

I know that a Logical partition contains a Partition Boot Sector. I just wasn't aware that any boot loader would install itself using the boot sector of a Logical partition. If you did that, the only way to start that bootloader would be to chain to that Logical partition from some other boot loader.

As was pointed out, there is an advantage to using the bootloader that comes with a particular distro since you know that it will load the kernel for that distro.

I would be happier if Linux distros were more standardized and didn't require their own special boot loaders or driver installation disks. I think that's part of the reason why companies don't support Linux. Which Linux should they support?

It will be interesting to see what happens to LILO and GRUB as the BIOS is eliminated and computers begin using the Intel Extensible Firmware Interface for booting. Also, PCs are more likely going to require special drivers for even the things that used to be standard hardware like disk controllers. That could create a separate class of "Windows PCs" and more standardized "Open System" PCs.
 
Old 01-18-2012, 02:02 PM   #47
tix
Member
 
Registered: May 2011
Posts: 31
Blog Entries: 6

Rep: Reputation: 1
LILO and GRUB - Slackware 13.1 and Ubuntu 11.10

Error encountered when adding Ubuntu to LILO

Fatal: Setup length exceeds 31 maximum; kernel setup will overwrite boot loader

I have run into a similar problem when dual booting:
-->Slackware 13.1 (kernel upgraded to 2.6.38)
-->Ubuntu 11.10 (kernel 3.0)

My theory to explain the solution provided in "SECTION 2 - My Solution" is that you cannot load a system
running "kernel 3.0.x" using a boot loader for a system running "kernel 2.6.x" .


SECTION 1 - Problem Definition:
--------------------------------

1) Installed Slackware 13.1 on /dev/sda1 with swap on /dev/sda2

2) Installed Ubuntu 11.10 on /dev/sda3 with swap on /dev/sda4

3) Grub was installed by default on MBR after installation of Ubuntu, but unfortunately GRUB could not load my Slackware properly

4) Used Slackware 13.1 CD 1 to boot my system into Slackware and re-run liloconfig to reconfigure LILO boot loader

5) Created an ubuntu directory in Slackware /boot directory (/boot/ubuntu)

6) Copied vmlinuz-3.0.0-12-generic from Ubuntu 11.10 partition /dev/sda3 into Slackware /boot/ubuntu directory

7) In "/boot/Ubuntu" directory, used mkinitrd to make a ramdisk for the Ubuntu 11.10 "mkinitrd vmlinuz-3.0.0-12-generic" which created a file called "initrd.gz"

8) Re-run liloconfig in expert mode and added the lines:
#--------------------lilo.conf (snippet)------------------------
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Slackware
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/ubuntu/vmlinuz
initrd=/boot/ubuntu/initrd.img
root = /dev/sda3
label = Ubuntu
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
#--------------------lilo.conf (snippet)------------------------

9)Rerun lilo

10) Error message "Fatal: Setup length exceeds 31 maximum; kernel setup will overwrite boot loader"
An important thing to note is that *Slackware entry was added by lilo but not *Ubuntu entry

*****************************************************************************
MY SOLUTION: I used GRUB to dual boot both Slackware 13.1 and Ubuntu 11.10
*****************************************************************************

SECTION 2 - My Solution
------------------------

1) In Slackware, used "mkinitrd" to make a ramdisk (initrd.gz) for "vmlinuz"
i.e. in directory /boot --> "mkinitrd vmlinuz" which created a file called "initrd.gz"
!remember! - if you already have an initrd.gz file then copy to somewhere else before it is overwritted with the new initrd.gz

2) Mounted Ubuntu partition in Slackware and copied "vmlinuz" and "initrd.gz" to /dev/sda3 (ubuntu partition) into the "/boot/slackware" directory for Ubuntu
!note a! - a folder called "slackware" was created in Ubuntu "boot" directory where the "vmlinuz" and "initrd.gz" for Slackware 13.1 was placed, i.e. "/boot/slackware"
!note b! - you can also copy it on a flash disk or cd-rom disk if you don't know how to mount the Ubuntu drive or don't have support for ext3 in your Slackware kernel

3) Rebooted machine

4) Using Ubuntu boot cd, loaded into livecd

5) Mounted Ubuntu drive "/dev/sda3" in "/mnt" directory while booted from livecd
i.e. "sudo mount /dev/sda3 /mnt"

"MOTD: sudo, sudo, sudo, yyyyyyyuuuuuccccckkkk!!!"
LOL!

6) Linked "/dev" directory of Ubuntu loaded from livecd to "/dev/" directory in "/dev/sda3" which is already mounted as "/mnt/dev"
i.e. "sudo mount --bind /dev/ /mnt/dev"

7) Linked "/sys" directory of Ubuntu loaded from livecd to "/sys/" directory in "/dev/sda3" which is already mounted as "/mnt/sys"
!note! - if you skip this step then Ubuntu will whine that it cannot read the partition table

8) Changed root device from Ubuntu running on live cd to Ubuntu partition (/dev/sda3) mounted on "/mnt"
i.e. "sudo chroot /mnt"

9) Went to the grub configuration directory (/etc/grub.d)
i.e. "cd /etc/grub.d/"

10) Created a file called "50_Slackware"

11) Made the file created "50_Slackware" executable
i.e. "sudo chmod 755 50_Slackware"

12) Opened the file "50_Slackware" with a text editor and added the following lines

---------------------copy-paste begin---------------------
#!/bin/sh -e
echo "Adding Slackware Linux to GRUB 2"
cat << EOF
menuentry "Slackware 13.1" {
set root=(sd0,1)
linux /boot/slackware/vmlinuz
initrd /boot/slackware/initrd.gz
}
EOF
---------------------copy-paste end---------------------

!notes! the lines:
a) echo "Adding Slackware Linux to GRUB 2" -> line echoed when reloading grub configuration
b) menuentry "Slackware 13.1" -> what you will see in the actual grub menu after reboot
c) set root=(sd0,1) -> my slackware is on /dev/sda1 --> sda1--> a = 0, 1=1 --> (sd0,1)
d) linux /boot/slackware/vmlinuz --> location of "vmlinuz" for slackware as done in step 2) above
e) initrd /boot/slackware/initrd.gz -->location of "vmlinuz" for slackware as done in step 2) above

13) Save file and exit from text editor

14)Update grub (this is needed to update the "grub.cfg" file)
i.e. "sudo update-grub"

15) Re-install grub on the MBR (Master Boot Record) of your hardisk (in my case the hard disk is /dev/sda which has /dev/sda1 for slackware and /dev/sda3 for ubuntu)
"sudo grub-install /dev/sda"

16) You should see output messages saying that Ubuntu was added and Slackware 13.1 was found and added

17) Reboot your machine making sure to remove the live cd when computer has rebooted

18) Behold! Thy Grub screen looketh kewl havin' Slackware 13.1 listed

19) Enjoy!

20) LOL!

--------------------------MOTD----------------------------
"Do you cheat on your wife?" asked the psychiatrist.
"Who else?" answered the patient.
----------------------------------------------------------

Last edited by tix; 01-18-2012 at 02:19 PM.
 
Old 01-18-2012, 02:17 PM   #48
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
The easiest way would have been to install Ubuntu's grub on it's root partition (/dev/sda3), then add this to lilo.conf:
Code:
other = /dev/sda3
  label = Ubuntu
And you don't need two swap partions.

Last edited by brianL; 01-18-2012 at 02:19 PM.
 
Old 01-18-2012, 04:34 PM   #49
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
tix, I suggest that this should be a separate thread if you wish to make further posts about the problem. This was an old thread from 2007 with a different question. Usually it is best to start a new thread when asking a question.
 
  


Reply



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
LILO in Linux Distro dolphs Linux - General 5 02-26-2006 02:59 PM
GRUB or LILO won't boot linux!!! for ANY distro stelmate Linux - Hardware 12 05-27-2005 06:42 PM
appending grub - add other linux distro machiner Fedora 2 10-10-2004 02:38 PM
how to add windows to lilo? mrgrieves Linux - Software 9 06-27-2004 02:09 PM
How to add LILO to existing Linux? Freederick Linux - Newbie 9 03-28-2004 05:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration