LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Booting from an slave device. (https://www.linuxquestions.org/questions/slackware-14/booting-from-an-slave-device-4175434394/)

stf92 10-27-2012 01:31 PM

Booting from an slave device.
 
Hi:

In the case of two hards disks on the same machine, one as master the other as slave, both in, say, ide 1, any special provision to make an O.S. (slackware) lying on the slave to boot? By special provision I refer to /etc/lilo.conf.

AlleyTrotter 10-27-2012 03:39 PM

Here is a short clip from my /etc/liloconfig which shows 2 bootable partitions on /dev/sda and two on /dev/sdb. partitions can be on any drive as long as lilo is run from master

Code:

# Start LILO global section
boot = /dev/sda
lba32
.......
# Linux bootable partition config begins
image = /boot/vmlinuz-3.6.3
  root = /dev/sda5
  label = Linux
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-3.6.2
  root = /dev/sda5
  label = Last
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /mnt/rescue/boot/vmlinuz
  root = /dev/sdb2
  label = Rescue
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /mnt/current/boot/vmlinuz
  root = /dev/sdb3
  label = Current
  read-only
# Linux bootable partition config ends

Both rescue and current are on sdb but before executing 'lilo' the /mnt/rescue/ /mnt/current partitions must be mounted

There is probably a more elegant solution, but this one has worked for many years
Hope this helps
john
[EDIT] My response describes an sata system, but I am sure that I have used this method on an ide system with hda and cdrom on master and 2 ide drives on slave in the past.[/EDIT]

stf92 10-27-2012 04:28 PM

Quote:

Originally Posted by AlleyTrotter (Post 4816369)
Here is a short clip from my /etc/liloconfig which shows 2 bootable partitions on /dev/sda and two on /dev/sdb. partitions can be on any drive as long as lilo is run from master

Then I have made things irreversibly wrong. I had slack 12.0 in the master hard and, when installing slack 14.0, I did so in the slave. But the Slackware-HOWTO says "run lilo under 14.0" (by the way I chose extN, N > 3 for 14.0 whereas in the 12.0 partition I have ext2. But lilo does not care about filesystems, I think). OK.

Then, according to the HOWTO, I should run lilo under 14.0. But, as you have just pointed out, I will have to run it under 12.0, because its on the master drive. A helpless situation.

AlleyTrotter 10-27-2012 05:04 PM

If I understand your problem you should be able to boot your 12.0 system from the install media. At the install media boot prompt follow the instructions to enter the path to your 12.0 vmlinuz. When done with the bootup edit your lilo.config file as I have shown above and execute lilo, which will install to master drive. Then all should be back to normal. When you boot up you should have the option to boot 12.0 or 14.0.
Hope that helps
john

stf92 10-27-2012 11:49 PM

I think I have misunderstood you, John, and beg your pardon for that. When you said, in post #2, that
Quote:

Originally Posted by AlleyTrotter View Post
Here is a short clip from my /etc/liloconfig which shows 2 bootable partitions on /dev/sda and two on /dev/sdb. partitions can be on any drive as long as lilo is run from master
I took lilo as meaning /sbin/lilo. I now see it can also mean just the lilo boot loader. To be honest, I do not know in which one of the two meanings I must take the word. Could you explain? Regards,

Enrique.

wildwizard 10-28-2012 02:17 AM

You can execute /sbin/lilo from either.

But you must tell it to install itself in the primary disks MBR

What is important is that the lilo.conf file that is read in has all the right info and you need both kernels accessible in the filesystem tree when you run it.

My method usually revolves around having both systems set up so I can run lilo from either.

So :-

1. Have each system mount the others filesystem somewhere so you get the other kernel image
2. Have a lilo.conf for each that has the same basic setup but has different paths for the kernel images

AlleyTrotter 10-28-2012 10:37 AM

My method has /etc/lilo.conf on the master disk (12.0) and executes /sbin/lilo from master. The boot loader is installed to the master disk MBR. This once installed should allow you to select either 12.0 or 14.0 from the lilo prompt.
Hope that clears things up
John


All times are GMT -5. The time now is 11:06 PM.