LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding new os to existing one (https://www.linuxquestions.org/questions/linux-newbie-8/adding-new-os-to-existing-one-139089/)

synapse 01-27-2004 12:19 AM

Adding new os to existing one
 
Hi all

Ok lemme try this , hopefully i explain it correctly!

2 hds curently in the box

hda > 1G with windoze
hdb > 10G with mandrake 9.2
lilo boot loader on hda1

spare > 10G with slack already installed (configured for box above) but not installed on ide cable.

I want to just add this hd into ide2 and edit the lilo.conf to give me the option to start win, mandrake , or slackware.

Any ideas on what i should add to lilo.conf.
Also slackware was installed with reiser fs.

Thanx

kilgoretrout 01-27-2004 10:58 AM

I think you'll have to do two things after you install the slack hard drive, create a boot entry in mandrake's lilo for it and edit the slack /etc/fstab so the partitions in there correspond to their new place on the ide bus. After installing the slack drive, boot into mandrake and mount the slack drive root partition in a console:

# mkdir /mnt/slack
# mount -t reiserfs /dev/hdx /mnt/slack

Where "x" corresponds to the new position of the slack root partition on the ide bus. For example, if when you did the slack install, it was on hda, with the root partition on hda1 and then moved the drive to ide2 master, the new position on the ide bus would mean the slack drive is now on hdc and the root partition is on hdc1.

Now that the partition is mounted you can access the contents of the slack root partition through /mnt/slack but you'll need to be root to do so. To use graphical tools in mandrake run:

# kdesu konqueror

that will bring up konqueror with root priveleges. navigate to /mnt/slack/etc/fstab and click on fstab. That will bring up slack's fstab in your default text editor with root privileges. Examine slack's fstab carefully. Assuming slack is now on hdc, you need to edit every line with an hdax to hdcx for slack's fstab to correspond to it's new position. Save the changes and keep konqueror open.

Now to create an entry for slack in mandrake's lilo. Lot's of ways to do this but they all involve making slack's vmlinuz and, if it has one, slack's initrd available to mandrake's lilo during boot time. To do that we're going to copy those files to a directory in madrake's /boot. Navigate to mandrakes /boot and create a directory there, /boot/slack. Now navigate to slack's /boot at /mnt/slack/boot and copy slack's vmlinuz and initrd if it has one to the mandrake /boot/slack. Note, slack's vmlinuz and initrd will have numbers corresponding to their kernel in the form vmlinuz-2.4xxxx. That's what you need to copy.

Now your ready to create the lilo entry for slack. Open mandrake's /etc/lilo.conf and edit by adding the following:

image=/boot/slack/vmlinuz-2.4.xxxx
label="slack"
root=/dev/hdcx
initrd=/boot/slack/initrd-2.4.xxx
append="<depends on system>"
read-only

What you put on the "append" line depends on your system. For example, if you have a cdwriter that runs under scsi emulation you need to add "hdx=ide=scsi". Check your mandrake entry's append line and use the same for your slack and it should work OK. if slack doesn't have an initrd, just skip that line.

Save the changes to lilo.conf, open a console and su to root and run:

# lilo -v

That will write the new lilo configuration to the mbr. It will also give error messages if lilo finds errors in your new boot entry in which case it will refuse to write the new configuration to the mbr. If all went well, the next time you boot you should see an entry for slack and it should work.


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