LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   dual boot two disks with separate /boot partitions (http://www.linuxquestions.org/questions/slackware-14/dual-boot-two-disks-with-separate-boot-partitions-754614/)

[GOD]Anck 09-12-2009 07:33 AM

dual boot two disks with separate /boot partitions
 
I have a machine with 2 disks, one has slackware 12.2 (/dev/sda) and the other has slackware 13 (/dev/sdb). Both disks have a separate /boot as the first primary partition. I installed lilo into MBR (boot=/dev/sda) and would like to be able to dual boot. How do I set this up?

I tried this lilo.conf:

Code:

image = /boot/vmlinuz
  root = /dev/sda2
  label = Slackware-12.2
  read-only
image = /boot/vmlinuz
  root = /dev/sdb2
  label = Slackware-13.0
  read-only

This obviously doesn't work; when I try to boot Slackware 13, it loads the kernel image from /dev/sda.. how can I tell it where to look for the kernel image?

linus72 09-12-2009 07:39 AM

maybe just put the 13.0 kernel in a different named folder

Code:

image = /boot/slack/vmlinuz
  root = /dev/sdb2
  label = Slackware-13.0
  read-only

so, just put it in a diff folder named whatever and try that

[GOD]Anck 09-12-2009 08:36 AM

Quote:

Originally Posted by linus72 (Post 3679871)
maybe just put the 13.0 kernel in a different named folder

Code:

image = /boot/slack/vmlinuz
  root = /dev/sdb2
  label = Slackware-13.0
  read-only

so, just put it in a diff folder named whatever and try that

Hmm but, unless I put the 13.0 kernel in /boot on sda, lilo still wouldn't know where to find it?

Would it be possible to set up chain loading like one would do with Vista? I guess I'd have to boot 13.0 from DVD and run liloconfig to write a loader to the second disk's superblock and then use an other=/dev/sdb stanza to chain load from the MBR on sda.. would that work?

gegechris99 09-12-2009 03:23 PM

Hello,

Let say that you are using lilo from 12.2.

You need to mount the /boot partition of the other Slackware version (13.0) on Slackware 12.2. For example using /mnt/13.0 as the mount point, the /etc/lilo.conf file in 12.2 should look like this:

Code:

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda2
initrd = /boot/initrd.gz
label = Slackware-12.2
read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /mnt/13.0/boot/vmlinuz
root = /dev/sdb2
initrd = /mnt/13.0/boot/initrd.gz
label = Slackware-13.0
read-only
# Linux bootable partition config ends

If you do not use any initrd image, remove the lines "initrd" in my example.

Do not forget to mount the 13.0 /boot partition before running lilo.

Of course, if you use lilo from 13.0, you need to mount the /boot directory from 12.2 in 13.0

[GOD]Anck 09-12-2009 04:05 PM

Thanks, that works like a charm!

gegechris99 09-12-2009 04:32 PM

Hello,

I'm glad to hear that it worked as prescribed :)

You can indicate that this thread is SOLVED but selecting the correct option in the "Thread Tools" menu on top of your first post.


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