LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-04-2008, 06:56 PM   #1
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Rep: Reputation: 17
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
 
Old 05-04-2008, 07:21 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Quote:
Originally Posted by evodawg View Post

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 View Post

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
 
Old 05-04-2008, 07:41 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,909

Rep: Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861
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.
 
Old 05-04-2008, 08:01 PM   #4
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
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.
 
Old 05-04-2008, 08:24 PM   #5
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by jailbait View Post
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.
 
Old 05-04-2008, 08:29 PM   #6
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by yancek View Post
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?
 
Old 05-04-2008, 08:31 PM   #7
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by evodawg View Post
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?
 
Old 05-04-2008, 08:36 PM   #8
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by evodawg View Post
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.
 
Old 05-04-2008, 09:32 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
By far the easiest method is ... multiple drives.
 
Old 05-04-2008, 09:38 PM   #10
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by sundialsvcs View Post
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?
 
Old 05-04-2008, 11:00 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,909

Rep: Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861Reputation: 1861
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!
 
Old 05-05-2008, 01:10 AM   #12
evodawg
Member
 
Registered: Feb 2006
Location: Southern California
Distribution: Man. 2009 PClinux 2014
Posts: 107

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by yancek View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Linux virus on USB key exists ? Linux.tar.gz Linux - Security 14 01-11-2008 09:59 AM
How many people know Linux exists? JimmySmith Linux - General 7 06-28-2007 10:31 PM
SIOCADDRT: File exists SIOCCADDRT: File Exists Failed to bring up eth0. opsraja Linux - Networking 0 01-10-2005 09:29 AM
Exists a DC++ like program for Linux? zWaR Linux - Newbie 4 12-27-2003 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration