LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-30-2010, 09:25 AM   #1
JohnUSNret
LQ Newbie
 
Registered: Jul 2010
Distribution: Debian
Posts: 18

Rep: Reputation: 0
Partitioning for 2 linux OS's


Q: How to set a Dual boot for 2 linux OS's on a 80GB HD? I have 5 Lenny 5.0.5 DVD's and that is currently installed. No data on current setup needs to be saved. So a reinstall is not a problem. Would like to set up as follows: 1st OS permanent Lenny 5.05 (about 50GB). 2nd OS space (about 30mg) is (testing) or playing with CD/DVD's of the month. My background: I did S/W development on the HPUX about 100 yrs. ago, so I can just get around the command line. TIA John at The Villages FL

CORRECTED mg to GB sorry.

Last edited by JohnUSNret; 10-30-2010 at 05:14 PM. Reason: 80GB vs mg
 
Old 10-30-2010, 09:44 AM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Each Linux distro takes about 6 to 7 GB of drive space for the / partition. I currently have three hard drives on my system, one 40GB for OpenSuse, one 80 GB for Slackware and future installs, and one 1 TB as a data drive. I plan on installing FreeBSD and Debian on the 80GB drive, /dev/sdc, and using a common /home directory on /dev/sdc2, which may not be a good idea, so I'll create two more 7GB partitions on /dev/sdc. To see my partition setup, here's the o/p of sfdisk, where /dev/sda and /dev/sdc are the OS drives.

Code:
# sfdisk -l

Disk /dev/sda: 4865 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+    261     262-   2104483+  82  Linux swap / Solaris
/dev/sda2   *    262    2125    1864   14972580   83  Linux
/dev/sda3       2126    4864    2739   22001017+  83  Linux
/dev/sda4          0       -       0          0    0  Empty

Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+ 121600  121601- 976760001   83  Linux


Disk /dev/sdc: 9729 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1   *      0+   1305    1306-  10490413+  83  Linux
/dev/sdc2       1306    3979-   2674-  21473715   83  Linux
/dev/sdc3       6529    6790     262    2104515   82  Linux swap / Solaris
/dev/sdc4          0       -       0          0    0  Empty
 
1 members found this post helpful.
Old 10-30-2010, 09:47 AM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
There's a lot that one could say on the subject. Lots of good contradictory advise could be argued equally well for both sides issues. That said this is what I would do with an 80 GB disk drive.

I would create four primary partitions. The first two would be for Linux. The third would be for a common /home. The fourth would be for swap space.

Partition 1: 20 GB type ext3
Partition 2: 20 GB type ext3
Partition 3: 36 GB type ext3
Partition 4: 4 GB type swap

You could do this with a bootable Linux CD distribution. Open a terminal window. Use cfdisk to create the partitions.

Caveats:
1 - The last distribution that you install will always make itself the default operating system in the boot menu.
2 - Ubuntu and its derivatives are now using GRUB 2 which is quite different than the beloved GRUB (legacy) that is used by other distributions. (Don't get me started.)
3 - Some distributions like Fedora will not even look for other operating systems to include in a boot menu.

I would reinstall Lenny then use a terminal emulator to make a copy of the disk MBR. Put that copy in the /root directory of Lenny. That way you can go back to having Lenny's boot menu even if the second Linux distribution has installed GRUB 2.
Code:
dd if=/dev/sda of=/root/original-mbr.dd bs=512 count=1 conv=notrunc,noerror
Other than those ideas I would say go ahead with reinstalling your Lenny with the disk partitioned as above then ask specific questions as they arise.

Good luck and most of all have fun.
 
1 members found this post helpful.
Old 10-30-2010, 11:05 AM   #4
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
A couple of things I would suggest:

1) If you're going to use a shared home partition (which I would suggest, given the limited HD space), you may have problems with the apps settings of the two distros you install, in case you use the same user for both. I think there are ways to fix this, but maybe the simpler way is to just use different users in both installs (for example, "user1" for debian, and "user2" for the second distro you install); this way you don't have to worry for the problems that may arise when different program versions mess your user settings.

2) I don't know how this works on other distros, but in case you have problems with some distro's grub not recognizing the other distro, the solution on debian is quite simple (assuming that you can boot it): first install os-prober, and then execute update-grub as root; it will automatically search your HD for other OSs, and add them to the boot menu.

A third suggestion is, why not use debian testing instead of debian lenny? It's your choice of course, but if you're going to use this pc as a regular desktop (not a server), debian testing will be better IMO, since it has more up-to-date packages than the stable branch (and it's actually very stable).

Greetings.
 
1 members found this post helpful.
Old 11-11-2010, 08:53 AM   #5
JohnUSNret
LQ Newbie
 
Registered: Jul 2010
Distribution: Debian
Posts: 18

Original Poster
Rep: Reputation: 0
Resolving Problem with non-local LUG, Orlando FL, John
 
Old 11-13-2010, 01:02 AM   #6
Absent Minded
Member
 
Registered: Nov 2007
Location: Washington State U.S.A.
Distribution: Debian testing
Posts: 74

Rep: Reputation: 21
Hi John,
I am with the last poster on your questions.. I think a fresh install of Squeeze and formatting the partitions as ext4 (instead of ext3 the Debian default) will go a long way to making you a happy Debian stable user in a couple months. I suggest the clean/fresh install instead of the upgrade as ext4 offers many additional benefits when done on the install instead of upgrading it later. I use it already on my system and the performance boost is quite noticeable even on my old PATA 80GB HD. Also by using Squeeze instead of Lenny, you have a better chance of having access to your future testing installs over the next couple years. Just remember, you have to manually select ext4 during the partitioning as Debian defaults to ext3. Many other distros use ext4 by default already to take advantage of it's benefits over ext3.
 
Old 11-14-2010, 02:18 AM   #7
Peufelon
Member
 
Registered: Jul 2005
Posts: 164
Blog Entries: 1

Rep: Reputation: Disabled
I have run into trouble trying to cram the "all but home" partitions into fewer than 10 GB. Keep in mind that as security upgrades and so on accumulate, you may start to find yourself running out of room. I originally budgeted about what udaman did, and have concluded I should have been more generous. Sounds like you have plenty of room to leave more space for "all but home".

Last edited by Peufelon; 11-14-2010 at 02:20 AM.
 
  


Reply



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
Discovering th joys of Linux OS's hogi LinuxQuestions.org Member Intro 1 07-03-2009 09:21 PM
Partitioning to run multiple OS's linux4life88 Linux - General 6 03-18-2006 05:10 PM
Linux w/ other OS's gfrair Linux - Newbie 13 01-16-2005 11:41 AM
Suse 9.2 Linux is the best I've seen than any other OS'S Fujitsu SUSE / openSUSE 1 12-16-2004 12:47 PM
Partitioning for Multiple OS's LinuxQWin Linux - Newbie 1 04-21-2004 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:23 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
Open Source Consulting | Domain Registration