LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Install linux when another linux already exists (https://www.linuxquestions.org/questions/linux-software-2/install-linux-when-another-linux-already-exists-639885/)

evodawg 05-04-2008 05:56 PM

Install linux when another linux already exists
 
I have always had this problem when installing linux when another linux already exists. When asked to setup partitions I try to make a home directory in an empty partition and you can't because one exists in another partition. How do you install a new linux and keep the old linux so it wont interfere with the old one.
And then there's this issue with grub. I use mandriva and when install is done it only boots to the new install and the old one is not picked up. How do I find the old one and setup grub to see it. So its in the boot option???

Thanks

jailbait 05-04-2008 06:21 PM

Quote:

Originally Posted by evodawg (Post 3142668)

I have always had this problem when installing linux when another linux already exists. When asked to setup partitions I try to make a home directory in an empty partition and you can't because one exists in another partition. How do you install a new linux and keep the old linux so it wont interfere with the old one.

Set up the /home partition in the old Linux before doing the install. When you do the install tell the installer to include /home in the / partition (and just ignore the old /home partition). After the install is over boot into your new system, log in as root and delete everything in your new /home directory. Then set up /etc/fstab in the new Linux to mount the old /home partition on the empty /home directory in the new partition. Reboot.

Quote:

Originally Posted by evodawg (Post 3142668)

then there's this issue with grub. I use mandriva and when install is done it only boots to the new install and the old one is not picked up. How do I find the old one and setup grub to see it. So its in the boot option???

You have two different /boot/grub/menu.lst files, one in Mandriva and one in the older Linux partition. Boot into Mandriva and mount the old Linux / partition. Copy the title sections of the old /boot/grub/menu.lst into the new Mandriva /boot/grub/menu.lst so that the new menu.lst is a composite of the new and the old menu.lst.

---------------------
Steve Stites

yancek 05-04-2008 06:41 PM

The second question is not an issue with grub, but rather the last choice you make during the install and before reboot. This is the default of installing Grub to the MBR. Follow jailbait's instructions and it will work.

If you plan to experiment with different distros it would be a good idea to keep a copy of you working menu.lst file printed, on floppy or cd and then just make changes as necessary.

rupertwh 05-04-2008 07:01 PM

Hi,

I don't quite understand your description of your home dir trouble. Why would the installer worry about any other existing directories in other partitions? That doesn't make sense.

As to grub, I prefer to only install once into the MBR, from my main 'working Linux'. Additional distros install their boot manager into their respective boot partitions, not the MBR. That way, the different distros don't interfere with each other's grub settings. (In fact I use lilo instead of grub for the other installations, as I've had problems with grub-grub chainloading).
That means I have to manually add new installations to the grub menu -- which isn't really any trouble.

evodawg 05-04-2008 07:24 PM

Quote:

Originally Posted by jailbait (Post 3142686)
Set up the /home partition in the old Linux before doing the install. When you do the install tell the installer to include /home in the / partition (and just ignore the old /home partition). After the install is over boot into your new system, log in as root and delete everything in your new /home directory. Then set up /etc/fstab in the new Linux to mount the old /home partition on the empty /home directory in the new partition. Reboot.


You have two different /boot/grub/menu.lst files, one in Mandriva and one in the older Linux partition. Boot into Mandriva and mount the old Linux / partition. Copy the title sections of the old /boot/grub/menu.lst into the new Mandriva /boot/grub/menu.lst so that the new menu.lst is a composite of the new and the old menu.lst.

---------------------
Steve Stites

When I setup the original Man. 2008 I setup separate part. for /home /usr /tmp and / I have always felt specially /usr needs lots more gigs then what it usually gets. So there is no way to do this if I install and new distro like Man. 2008.1 or could I delete them to and just mount them in the new distro? Doesnt the new distro have new updated files that would make it difficult for 2008 to use? I can understand doing that with /home since there's not much in /home when first installed.

evodawg 05-04-2008 07:29 PM

Quote:

Originally Posted by yancek (Post 3142701)
The second question is not an issue with grub, but rather the last choice you make during the install and before reboot. This is the default of installing Grub to the MBR. Follow jailbait's instructions and it will work.

If you plan to experiment with different distros it would be a good idea to keep a copy of you working menu.lst file printed, on floppy or cd and then just make changes as necessary.

What would happen if I made the other choice, not installing grub to the MBR. Would I screw it all up at this point? Copy the /boot grub menu.1st file to CD so I could copy and paste it into menu.1st if I had a problem?

evodawg 05-04-2008 07:31 PM

Quote:

Originally Posted by evodawg (Post 3142736)
When I setup the original Man. 2008 I setup separate part. for /home /usr /tmp and / I have always felt specially /usr needs lots more gigs then what it usually gets. So there is no way to do this if I install and new distro like Man. 2008.1 or could I delete them to and just mount them in the new distro? Doesnt the new distro have new updated files that would make it difficult for 2008 to use? I can understand doing that with /home since there's not much in /home when first installed.

I meant to say:

Doesnt the new distro have new updated files that would make it difficult for (2008.1) to use?

evodawg 05-04-2008 07:36 PM

Quote:

Originally Posted by evodawg (Post 3142745)
I meant to say:

Doesnt the new distro have new updated files that would make it difficult for (2008.1) to use?

NEVER MIND think I'm getting tired. DISREGAURD THE ABOVE IDIOT STATMENT.

sundialsvcs 05-04-2008 08:32 PM

By far the easiest method is ... multiple drives.

evodawg 05-04-2008 08:38 PM

Quote:

Originally Posted by sundialsvcs (Post 3142786)
By far the easiest method is ... multiple drives.

I have 2 drives 150 gig sda drive empty
90 gig hdb drive mandriva 2008.
How would this be easier?

yancek 05-04-2008 10:00 PM

I agree with and use rupertwh's method (post #4). If you are familiar at all with the menu.lst file then you know that it is similar to an index in a book and tells your system where to find a particular OS and then starts it. If you install multiple OS's, it is a lot easier if you install the bootloader to the boot directory of the new system and not overwrite the mbr. If you overwrite the mbr on eachmake appropriate entries in the new menu.lst file and, although this is usually the case, it does not always happen. If you install 2nd distro to /boot directory, all you have to do is mount the new OS in a directory on the first system, go to the /boot/grub/ directory on the new system and copy the entry of the new system to the menu.lst on the first system.

The paragraph above is an explanation of what would have happened if you had installed mandriva bootloader ot /boot directory rather than the mbr.
I don't know if this would mess up your system at this point. I think it would be necessary to know what you actually have on your system, how many partitions, operating systems, what can you boot to, using just LiveCD?

If you are able to access your system to run 'fdisk -l' command and post a copy of either/both OS's menu.lst file if you have more than mandriva installed?

I'm not sure my first paragraph will be clear to you, seemed pretty simple when I was writing it but, if you don't understand post again and I'll try it by example but I need the information in the paragraph above.

Good Luck!

evodawg 05-05-2008 12:10 AM

Quote:

Originally Posted by yancek (Post 3142848)
I agree with and use rupertwh's method (post #4). If you are familiar at all with the menu.lst file then you know that it is similar to an index in a book and tells your system where to find a particular OS and then starts it. If you install multiple OS's, it is a lot easier if you install the bootloader to the boot directory of the new system and not overwrite the mbr. If you overwrite the mbr on eachmake appropriate entries in the new menu.lst file and, although this is usually the case, it does not always happen. If you install 2nd distro to /boot directory, all you have to do is mount the new OS in a directory on the first system, go to the /boot/grub/ directory on the new system and copy the entry of the new system to the menu.lst on the first system.

The paragraph above is an explanation of what would have happened if you had installed mandriva bootloader ot /boot directory rather than the mbr.
I don't know if this would mess up your system at this point. I think it would be necessary to know what you actually have on your system, how many partitions, operating systems, what can you boot to, using just LiveCD?

If you are able to access your system to run 'fdisk -l' command and post a copy of either/both OS's menu.lst file if you have more than mandriva installed?

I'm not sure my first paragraph will be clear to you, seemed pretty simple when I was writing it but, if you don't understand post again and I'll try it by example but I need the information in the paragraph above.

Good Luck!

Right now I only have one installed Mandriva 2008.0 I only asked this question becaused I'm getting ready to install Mandriva 2008.1 and possibly others in the near future. I always have problems when I install a new distro. The ones I mentioned above. Oh btw, I did understand that first paragraph.

evodawg]# fdisk -l

Disk /dev/hdb: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x62f4847d

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 615 4939956 83 Linux
/dev/hdb4 616 9726 73184107+ 5 Extended
/dev/hdb5 616 1124 4088511 82 Linux swap / Solaris
/dev/hdb6 6845 7808 7743298+ 83 Linux
/dev/hdb7 7809 8528 5783368+ 83 Linux
/dev/hdb8 8529 9334 6474163+ 83 Linux
/dev/hdb9 9335 9726 3148708+ 83 Linux
/dev/hdb10 1125 2462 10747453+ 83 Linux
/dev/hdb11 2463 2833 2980026 83 Linux
/dev/hdb12 2834 5454 21053151 83 Linux
/dev/hdb13 5455 5716 2104483+ 83 Linux
/dev/hdb14 5717 6844 9060628+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 19457 156288321 83 Linux

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/hdb1 resume=/dev/hdb5 splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/hdb1 resume=/dev/hdb5
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/hdb1 failsafe
initrd (hd0,0)/boot/initrd.img

title desktop586 2.6.22.9-1
kernel (hd0,0)/boot/vmlinuz-2.6.22.9-desktop586-1mdv BOOT_IMAGE=desktop586_2.6.22.9-1 root=/dev/hdb1 resume=/dev/hdb5 splash=silent vga=788
initrd (hd0,0)/boot/initrd-2.6.22.9-desktop586-1mdv.img

title desktop586 2.6.22.18-1
kernel (hd0,0)/boot/vmlinuz-2.6.22.18-desktop586-1mdv BOOT_IMAGE=desktop586_2.6.22.18-1 root=/dev/hdb1 resume=/dev/hdb5 splash=silent vga=788
initrd (hd0,0)/boot/initrd-2.6.22.18-desktop586-1mdv.img


All times are GMT -5. The time now is 01:10 PM.