LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   dual booting Slack 13.0 and 13.37 (https://www.linuxquestions.org/questions/slackware-14/dual-booting-slack-13-0-and-13-37-a-918613/)

wufo 12-13-2011 09:19 PM

dual booting Slack 13.0 and 13.37
 
I am trying to dual boot my present Slack 13.0 and a new install of 13.37 on a separate disk. Now in lilo I of course have
image = /boot/vmlinuz
root = /dev/hda1
label = Linux
read-only

Ok, I this disk out and do a 13.37 install on the new disk and boot as a test. All ok.

I then reinstall the orignal 13.0 as master (hda) and the 13.37 disk as slave (hdb).

I then add to lilo.conf
# Slackware 13.37
image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
root = /dev/hdb1
label = Slackware_13.37
read-only

I copy the image, config and System.map files for 37 from hdb1 to /boot on hda1. However trying to boot 37 causes an error about not having a valid root device and lists sdb1, not hdb1, as a possibility.
But, changing root=/dev/hdb1 to /dev/sdb1 causes a lilo error.

So, how do I can I get both to boot?

tj

MS3FGX 12-13-2011 10:20 PM

Hm, tricky. Sounds like the 13.37 kernel is using the newer ATA drivers that refer to all hard disks as "sdX" rather than the old way of having "hdX" for IDE and "sdX" for SCSI/USB. You could try putting the Slackware 13.37 line in LILO as using /dev/sdb1 as root, but that might just give you an error message when you attempt to install LILO to the MBR about the device not existing.

Perhaps the best option would be to setup LILO on the primary drive to chainload LILO from the second drive. This would also prevent you from having to copy the kernel from 13.37 into the 13.0 system, as they would be completely separate entities.

JimBrewster 12-14-2011 08:10 AM

Quote:

Originally Posted by MS3FGX (Post 4549348)
You could try putting the Slackware 13.37 line in LILO as using /dev/sdb1 as root, but that might just give you an error message when you attempt to install LILO to the MBR about the device not existing.

I think that will do the trick, as AIUI the 'root = /dev/hdb1' line is passed to the kernel at boot time, not read by the lilo installer.

MS3FGX 12-14-2011 07:31 PM

Quote:

Originally Posted by JimBrewster (Post 4549675)
I think that will do the trick, as AIUI the 'root = /dev/hdb1' line is passed to the kernel at boot time, not read by the lilo installer.

That was my impression as well, but I have never personally tested it.

colorpurple21859 12-14-2011 09:31 PM

this might work:
Quote:

root = /dev/hdb1
append "root=/dev/sdb1"

wufo 12-15-2011 04:10 PM

I have tried to find out how to chainload lilo for this problem until I am about to give up on linux completely. The only info I can find out is how to chainload Windows boot loader. So if some kind soul would could help with a lilo.cfg skeleton for this I would greatly appreciate it.
Problem Slackware 13.37 started using /dev/sd for all hard drives (why I will never know) instead of sticking to /dev/hd (I always read that hd was for IDE and sd for SCSI, why did they start calling all sd?). Slack 13.0 on /dev/hda1, Slack 13.37 on /dev/sdb1. Copy Slack 13.37 /boot/(kernel, map, config) to hda1. I add entry to hda1/etc/lilo.cfg
#image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
root = /dev/hdb1
label = Slackware_13.36
read-only
When I boot 13.37 it tries, but then dies complaining about /dev/hda1, remember it now uses sd style.
I change to root = /dev/sdb1 and lilo says no way not knowing what /dev/sdb1 is.

With chainloading does lilo residing on MBR of /dev/sdb have to have been configured special?

My ultimate goal is to dual boot and NOT have to copy the kernel, map and config files for 13.37 from sdb1 to hda1.

tj

MS3FGX 12-15-2011 08:17 PM

Quote:

Originally Posted by wufo (Post 4550994)
I have tried to find out how to chainload lilo for this problem until I am about to give up on linux completely. The only info I can find out is how to chainload Windows boot loader. So if some kind soul would could help with a lilo.cfg skeleton for this I would greatly appreciate it.
Problem Slackware 13.37 started using /dev/sd for all hard drives (why I will never know) instead of sticking to /dev/hd (I always read that hd was for IDE and sd for SCSI, why did they start calling all sd?). Slack 13.0 on /dev/hda1, Slack 13.37 on /dev/sdb1. Copy Slack 13.37 /boot/(kernel, map, config) to hda1. I add entry to hda1/etc/lilo.cfg
#image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
root = /dev/hdb1
label = Slackware_13.36
read-only
When I boot 13.37 it tries, but then dies complaining about /dev/hda1, remember it now uses sd style.
I change to root = /dev/sdb1 and lilo says no way not knowing what /dev/sdb1 is.

With chainloading does lilo residing on MBR of /dev/sdb have to have been configured special?

My ultimate goal is to dual boot and NOT have to copy the kernel, map and config files for 13.37 from sdb1 to hda1.

tj

You seem to have just rewritten your original post and not read/tried what has been posted so far in the topic.

I mentioned in my first post that all devices are now called "sdX" and the hd/sd naming convention has gone away. colorpurple21859 brought up a good suggestion with the "append" line, did you try that? What is the exact error you get when trying to chainload into the second LILO install, and what does your configuration look like when attempting to chainload?

wufo 12-15-2011 10:39 PM

Success...
First I forgot to mention in my last post that the append="root=/dev/sdb1" worked to make lilo happy to run and boot 13.37, as long as the 13.37 files were in /dev/hda1/boot. That's when I started working towards chainloading so I didn't have to copy them from their disk, /dev/sdb1, to /dev/hda1. But, I had to educate myself on chainloading since I had never done it before. I correctly surmised that the loader in the /dev/sdb1 MBR had to be modified to point to /dev/sdb1 as root instead of /dev/sda1 when I first installed/tested with it being the only hd in the system. I did that but once again lilo complained about /dev/sdb1. So, append to the rescue again. here are the pertinent lilo.conf extracts.
All this was done under Slack 13.0.

/dev/hda1/etc/lilo.com (which is Slack 13.0)

# Slackware 13.37
other = /dev/hdb
image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
root = /dev/hdb1
append = "root=/dev/sdb1"
label = Slackware_13.37
read-only
Issue /sbin/lilo

/dev/sdb1/etc/lilo.conf (which is Slack 13.0)
image = /boot/vmlinuz
root = /dev/hdb1
append = "root=/dev/sdb1"
label = linux
read-only # Partitions should be mounted read-only for checking
Issue /sbin/lilo -C /mnt/hd/etc/lilo.conf -b /dev/hdb

Just did a quick test and all seems to work.

tj

colorpurple21859 12-16-2011 05:08 AM

I do tend to forget things now adays, and one thing I failed to mention to allow booting without chainloading, under slack13 mount the slack13.37 somewhere, lets say /mnt. Then your lilo.conf under slack13 would look something like this:
Quote:

image = /mnt/boot/vmlinuz
root = /dev/hdb1
label = Slackware_13.37
append = "root=/dev/sdb1"
read-only
then run lilo. This should allow you to boot slack13.37 from slack13 without chainloading and without coping slack13.37 kernels to the slack13 boot folder. To chainload I think all you need is the following:
Quote:

other slack13.37
root = /dev/hdb
or it may be root = /dev/hdb1 depending on where you installed slack13.37 lilo during installation.

wufo 12-16-2011 02:51 PM

I was wrong, it still ain't working. I guess you cannot chainload lilo with the /dev/sdxx and /dev/hdxx problems. I have tried so many variations that I am now confused on what did what. Once on shutdown the system froze and had to cycle power, then when I turned it back on instead of loading it printed:
"L99 99 99 99 99 99 99" filling up half the screen". Had to boot off of cd mmounting hda1 as root and rerun /sbin/lilo before I could get it to boot from hard drive again.
Any way I give up on chainloading lilo, it probably can be done, but no documentation on how to overcome the hd/sd problem.

Quote:

Originally Posted by colorpurple21859 (Post 4551457)
I do tend to forget things now adays, and one thing I failed to mention to allow booting without chainloading, under slack13 mount the slack13.37 somewhere, lets say /mnt. Then your lilo.conf under slack13 would look something like this:

then run lilo. This should allow you to boot slack13.37 from slack13 without chainloading and without coping slack13.37 kernels to the slack13 boot folder. To chainload I think all you need is the following:

or it may be root = /dev/hdb1 depending on where you installed slack13.37 lilo during installation.

So, how do you do this?

tj

colorpurple21859 12-16-2011 03:01 PM

When you installed Slack13.37 did you install slack13.37 lilo during the inital setup and if so where was it installed? To mount a partition as root issue the following command:
Quote:

mount /dev/hdb1 /mnt

astrogeek 12-16-2011 06:00 PM

You are not using the chain loading method correctly...

Quote:

Originally Posted by wufo (Post 4551249)
/dev/hda1/etc/lilo.com (which is Slack 13.0)

# Slackware 13.37
other = /dev/hdb
image = /boot/vmlinuz-huge-smp-2.6.37.6-smp
root = /dev/hdb1
append = "root=/dev/sdb1"
label = Slackware_13.37
read-only
Issue /sbin/lilo

This is not a valid chain loading stanza. The only things you can specify are the target (other) and the label. You cannot specify an image, root or append attribute. So the way this should be set in the 13.0 lilo.conf is:

Code:

other = /dev/hdb
label = Slackware_13.37

This will simply pass control to whatever bootloader resides on the MBR of /dev/hdb - which must be the loader owned by the 13.37 installation - but specified in 13.0 context (/dev/hdb)

The trick for you is to get the 13.0 system booting - as apparently you have, then...

1. Mount the 13.37 drive somewhere, say /mnt/drive2, like mount /dev/hdb1 /mnt/drive2

/**** UPDATED FROM THIS POINT ****/
2. cd /mnt/drive2 (so that we save our work to the 13.37 filesystem)

Now you must install the bootloader for THIS context (13.37) using the 13.0 device names, but append root=/dev/sdb1 so it will recognize the root device at runtime (13.37 context)...

3. copy /mnt/drive2/etc/lilo.conf to .../lilo.conf-temp and change these lines to the 13.0 context:
(REMEMBER- YOU ARE NOW IN THE 13.37 FILESYSTEM)

Code:

boot=/dev/hdb ##13.37 device in 13.0 context
 ...
image=/mnt/drive2/boot/.... ##The actual 13.37 kernel location within 13.0 fs
label=Slackware_13.37
root=/dev/hdb1 ##Doesn't really matter, will be replaced by append...
append=" root=/dev/sdb1 " ##The actual root in 13.37 context

Then lilo -C .../lilo.conf-temp

This will install the loader to the 13.37 boot device, boot=/dev/hdb in 13.0 context, and should allow you to boot via chaining from the "other" stanza of the drive1 loader...

You can use this to manage the 13.37 loader permanently if you like, and manage BOTH loaders from 13.0. But I usually prefer to have each install manage its own loader - so AFTER you have chanied into 13.37 as above, you will want to edit the "real" lilo.conf, changing the boot=/dev/hdb to boot=/dev/sdb and image=/boot/... without the mount path, all else should be OK, then run lilo again from within 13.37...

Should be a piece of cake!

wufo 12-16-2011 09:27 PM

Well, that seemed to have worked and thanks.
One thing though, when was running lilo running lilo on /mnt/hd (13.37 disk) I got warnings about /dev/hdb NOT being first disk and another saying the sector map was on a different disk.

Oh, well now on with setting up 13.37.

Again thanks to all.

tj

colorpurple21859 12-16-2011 09:55 PM

Quote:

One thing though, when was running lilo running lilo on /mnt/hd (13.37 disk) I got warnings about /dev/hdb NOT being first disk and another saying the sector map was on a different disk.
Those warnings are normal when Slack isn't installed on the first hard drive


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