LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   problem dual booting fedora with slackware (https://www.linuxquestions.org/questions/slackware-14/problem-dual-booting-fedora-with-slackware-460849/)

Deepak Jain 07-04-2006 05:58 AM

problem dual booting fedora with slackware
 
Hello all,
i've windows, slackware 10.2 and fedora core 4 installed on my machine.
bootloader of slackware is in MBR.

Quote:

root@darkstar:~# fdisk -l

Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1275 10241406 c W95 FAT32 (LBA)
/dev/hda2 1276 3737 19776015 f W95 Ext'd (LBA)
/dev/hda5 1276 2550 10241406 83 Linux
/dev/hda6 2551 2563 104391 83 Linux
/dev/hda7 2564 2596 265041 82 Linux swap
/dev/hda8 2597 3737 9165051 8e Linux LVM
root@darkstar:~#
Quote:

root@darkstar:~# cat /etc/fstab
/dev/hda7 swap swap defaults 0 0
/dev/hda5 / reiserfs defaults 1 1
/dev/hda1 /mnt/C vfat defaults 1 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
/dev/hda8 /mnt/fedora1 auto defaults 1 0
/dev/hda6 /mnt/fedora ext3 defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
root@darkstar:~#
Quote:

# Windows bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda5
label = Linux
read-only
image = /mnt/fedora/vmlinuz-2.6.11-1.1369_FC4
root = /dev/hda6
label = fedora
initrd = /mnt/fedora/initrd-2.6.11-1.1369_FC4.img
read-only
# Linux bootable partition config ends
config, initrd, systemap, vmlinuz of fedora are in /mnt/fedora/.

where is the problem now ???

any kind of help will be appreciated.

regards

akus 07-04-2006 06:34 AM

When you will boot with such a config, at boot time nothing exists under /mnt yet, i think. Your fedora will appear under /mnt only when slackware is booted.
therefore, you will have to have:
image = /boot/vmlinuz-2.6.11-1.1369_FC4
root = /dev/hda6
label = fedora
initrd = /boot/initrd-2.6.11-1.1369_FC4.img
and your initrd and kernel must be in boot directory of your Fedora install

Randux 07-04-2006 07:02 AM

Quote:

Originally Posted by akus
When you will boot with such a config, at boot time nothing exists under /mnt yet, i think. Your fedora will appear under /mnt only when slackware is booted.

What you said is correct but is the wrong way to understand configuring Lilo. Lilo is not configured at boot time, so his entries are correct. When you multiboot with Lilo you have to have paths to your other Linux' kernels mounted. As long as Lilo installs and he specified everything correctly, the system will boot properly.

OP you didn't give any discussion of what happened. And is your Fedora installation really only 100M?

Please show your lilo command and output and explain what happens when you try to boot. Can you boot anything?

akus 07-04-2006 07:49 AM

Quote:

Originally Posted by Randux
What you said is not correct but is the wrong way to understand configuring Lilo. Lilo is not configured at boot time, so his entries are correct.

Well, i know that lilo is NOT configured at boot time.
This config will work if kernel and initrd (with /dev/hda6 as root!) are indeed kept in /mnt/fedora/
(this would be strange place to choose however)

I think that, then when lilo was installed with such config, Deepak Jain was booted in Slackware, therefore lilo didn't complain.
But when you try to boot now with root=/dev/hda6, lilo will look for the kernel in the directory /mnt/fedora and won't find it.
Am I wrong?

update.
I created directory fedora in my /mnt, and I put there one kernel and System.map.
Then I added entry in my lilo:

image = /mnt/fedora/2.6.16
root = /dev/hda9
label = lunarnew
read-only # Non-UMSDOS filesystems sh

And then I installed lilo with no complains.
But If I reboot and choose "lunarnew", it will not find kernel, becuase in my lunarnew install, there is no /mnt/fedora dir at all

Randux 07-04-2006 08:25 AM

Quote:

Originally Posted by akus
Well, i know that lilo is NOT configured at boot time.
This config will work if kernel and initrd (with /dev/hda6 as root!) are indeed kept in /mnt/fedora/
(this would be strange place to choose however)

Not really- when you are setting up a multiboot with Lilo all you have to do is have the paths to all your kernels mounted. It doesn't mean that you run your Linux like this all the time. I multiboot 5 OS + Winbloze. Most of the time I don't have filesystems for my other OS mounted in my main Linux. But I have to mount all the paths to the kernels when I want to run Lilo.

Quote:

Originally Posted by akus
I think that, then when lilo was installed with such config, Deepak Jain was booted in Slackware, therefore lilo didn't complain.
But when you try to boot now with root=/dev/hda6, lilo will look for the kernel in the directory /mnt/fedora and won't find it.
Am I wrong?

Yes- you are wrong. It's a little surprising, but if you think about it, it makes sense. Lilo only needs to know where the kernels are when you run lilo. When he is configuring, he does what he has to do and creates whatever files he needs to create. During boot time he does not need access to the paths by using any Linux mountpoints. This makes sense because as you pointed out, nothing is available until Linux comes up. So if your original idea was correct, nothing could ever be booted since you would have to have a running system so you could read the files.

Quote:

Originally Posted by akus
update.
I created directory fedora in my /mnt, and I put there one kernel and System.map.
Then I added entry in my lilo:

image = /mnt/fedora/2.6.16
root = /dev/hda9
label = lunarnew
read-only # Non-UMSDOS filesystems sh

And then I installed lilo with no complains.
But If I reboot and choose "lunarnew", it will not find kernel, becuase in my lunarnew install, there is no /mnt/fedora dir at all

I don't think that's what he did. Maybe I'm wrong. The idea is to point to the kernel where it already exists, not to create copies of kernels. What you want to do is mount the path to the existing kernel.

For example, if his FC system is on hda6 he can do:

1. mkdir /mnt/Fedora
2. mount /dev/hda6/boot /mnt/Fedora
3. run lilo
4. umount /mnt/Fedora

If he did what you said, I haven't tested that. It doesn't make sense to start copying stuff all over the place. Just leave it where it is and mount the path. That's why UNIX/Linux has a mount command.

In this thread I gave an example of a multiboot with Lilo using temporary mountpoints (mountpoints that only exist while I run Lilo):

http://www.linuxquestions.org/questi...d.php?t=420172

akus 07-04-2006 09:01 AM

Ok, I spent 15 minutes experimenting, and I have to admit that I was wrong.
You are right, it has indeed much more sense for lilo to remember only physical place on the disk, where kernel is located.
Thanks for illuminating explanation!

Marsanghas 07-04-2006 09:12 AM

It's much easier to have 1 boot partition with the fedora and the slackware kernels on it (and system.maps etc) IMHO

Randux 07-05-2006 01:07 AM

Quote:

Originally Posted by akus
Ok, I spent 15 minutes experimenting, and I have to admit that I was wrong.
You are right, it has indeed much more sense for lilo to remember only physical place on the disk, where kernel is located.
Thanks for illuminating explanation!

You're welcome. I also had to run many tests when I was trying to learn this :p The great thing about Linux is how you can try many different ways.

Randux 07-05-2006 01:12 AM

Quote:

Originally Posted by MarsDude
It's much easier to have 1 boot partition with the fedora and the slackware kernels on it (and system.maps etc) IMHO

It's a waste of a partition since the installers are going to put this stuff in /boot for each distro anyway. If you want to copy it into one place, you certainly can. Now you have two copies. What will you do- delete the original in /boot or leave it there?

I think it's easier to leave everything where it is installed. And it can be risky- if you tell the installer to mount /boot on your special partition, some of them may wipe out the partition.

I prefer to keep all of my distros completely separate, sharing nothing. That way I can do anything to any distro without disabling my other distros.


All times are GMT -5. The time now is 11:44 AM.