LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2011, 03:51 AM   #1
Aesir
LQ Newbie
 
Registered: Feb 2011
Distribution: Arch
Posts: 8

Rep: Reputation: 0
Repartitioning Linux


Hello everyone,

I am fairly new to Linux (~5 months) and started off using Arch to learn the OS more quickly (I love Arch!). I am, however, quite interested in installing Debian (especially after 6.0 was just released) to experiment with apt-get and gain more exposure to different Linux flavors. Here is my current setup:

Code:
#df -j
Filesystem            Size  Used Avail Use% Mounted on
udev                   10M  264K  9.8M   3% /dev
/dev/sda3              14G  259M   13G   3% /
shm                   3.0G  140K  3.0G   1% /dev/shm
/dev/sda5             464M   28M  412M   7% /boot
/dev/sda6             7.5G  1.1G  6.5G  14% /var
/dev/sda7              19G  173M   18G   1% /tmp
/dev/sda8              60G  849M   56G   2% /home
/dev/sda9              14G  2.1G   12G  16% /usr

/dev/sda10  4 GB --> my swap partition (doesn't show up with df-h)
I obviously have a lot of empty space; it's a decent size hard drive with the rest (about 120 GB) of it dedicated to Windows (still at university so some programs need it to run and am still somewhat dependent on MS Office - libre office just isn't quite as strong IMO).

What I thought seemed reasonable would be to do the following:
Code:
/     14.3 GB  --> 10 GB
/home 65 GB    --> 25 GB
/tmp  20 GB    --> 15 GB
I still want to use arch as my main distro and this would give me ~50 GB to play with (more than enough and may eventually at some point in the future tinker with FreeBSD).

To resize these partitions (which are all three ext3), would GParted Live CD be a good choice? I assume it is fairly straight forward for ext3, just chose the partition and it will have an option to make it smaller and I specify new size (have not yet looked at documentation yet)?

For Debian: I was thinking of making the following partitions (with approximate sizes):
/ (7 GB), /home (12 GB), /usr (12 GB), /var (7 GB), /boot (500 mb) /tmp (7 GB), swap (4 GB)

Now, would it be possible for any of these to be shared between the distributions (e.g. swap and /home ?). Or should I make all separate ones.

Another question I have is regarding grub; I won't select it when installing Debian and continue using grub from Arch installation (and then add Debian from Arch). What happens when either distro upgrades the kernel? I assume that Arch will have no problem and change it automatically. For Debian, would I just need to manually edit the kernel image each time in Arch's /boot/grub/menu.lst?

I know that there are plenty of threads and sites that talk about this fairly common task, but I have read about plenty of users messing up and losing data (I have backed up). I therefore thought it might be a good idea to post this and get a little more individual attention

Cheers everyone!

Last edited by Aesir; 02-06-2011 at 03:57 AM.
 
Old 02-06-2011, 04:06 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,239

Rep: Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527Reputation: 2527
for debain i would go an buy a second hard disk and install it on sdb a 250 gig is cheap and a 80 gig is almost free

Last edited by John VV; 02-06-2011 at 03:10 PM.
 
Old 02-06-2011, 04:08 AM   #3
Aesir
LQ Newbie
 
Registered: Feb 2011
Distribution: Arch
Posts: 8

Original Poster
Rep: Reputation: 0
This is a laptop so slightly inconvenient :/ so no other way around this?

Last edited by Aesir; 02-06-2011 at 04:12 AM.
 
Old 02-06-2011, 04:12 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Quote:
Originally Posted by John VV View Post
debain NEEDS primary partitions ( and must be installed on one of the 4 )
May I ask where you have this information from? I never had any problems with Debian on logical partitions.
 
Old 02-06-2011, 08:51 AM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Just wanted to say this in case you aren't aware of it, but you can install as many OSes as you want with no partitioning and without shutting down Arch if you use something like VirtualBox.
 
Old 02-06-2011, 11:19 AM   #6
Aesir
LQ Newbie
 
Registered: Feb 2011
Distribution: Arch
Posts: 8

Original Poster
Rep: Reputation: 0
Yes, but I am interested in permanently installing it. Does anyone have any advice on the way I have planned it out?
 
Old 02-06-2011, 12:20 PM   #7
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
To resize these partitions (which are all three ext3), would GParted Live CD be a good choice?
Yes. If you have ever used Partition Magic, you will find gparted quite similar. You select the hard drive you want to work on, then select the partition to resize, move the ends of the partition to the new size, then commit the changes. It's graphical and easy to use.

In your proposed changes to /home and /tmp, you will be making empty spaces between partitions. It would be best to make your changes in a step-wise fashion. Move the backend of /tmp to the smaller size you want, then move the front end of /home to take up the empty space. Commit the changes and reboot your gparted cd in order to load the new partition table.

Then move the backend of /home to the new size you want for /home and commit the changes. Reboot the cd again to reload the partition table.

Doing it all in such a step-wise manner assures you won't accidentally have overlapping partition boundaries in the running OS.
Quote:
For Debian: I was thinking of making the following partitions (with approximate sizes):
/ (7 GB), /home (12 GB), /usr (12 GB), /var (7 GB), /boot (500 mb) /tmp (7 GB), swap (4 GB)

Now, would it be possible for any of these to be shared between the distributions (e.g. swap and /home ?). Or should I make all separate ones.
No need to make a new swap partiton, Deb will detect the existing one and use it.

As far as using the same /home partition, remember that all of your application preferences are kept in your user's /home directory. If you use the same user name across distros, you will be overwriting those files with possibly conflicting versions from one distro to another. The only safe way to use the same /home partition across distros, is to have a different user name for each distro.
Example: In Arch, Sam has his directory at /home/Sam.
In Debian, using the same /home partition, Bob has his own directory at /home/Bob.
There is no overlap, therefore no conflict between preference settings for different versions of the same application.
Quote:
Another question I have is regarding grub; I won't select it when installing Debian and continue using grub from Arch installation (and then add Debian from Arch). What happens when either distro upgrades the kernel? I assume that Arch will have no problem and change it automatically. For Debian, would I just need to manually edit the kernel image each time in Arch's /boot/grub/menu.lst?
When you install Debian, be careful to tell the installer to install grub to the Debian partition and not to the MBR. Arch already has that. When installation of Debian is complete, open /boot/grub/menu.lst and copy the Debian menu stanza. Then mount the Arch /boot partiion, open /boot/grub/menu.lst and paste in the Debian menu stanza.

On reboot without the liveCD, you should see both Arch and Debian in the menu.

Good luck. Be careful with each operation. Think it through thoroughly before you take action. And above all,
BACKUP BACKUP BACKUP before you begin. Failure to make a backup of your installed system before you begin could cost you a great deal of frustration.
 
1 members found this post helpful.
Old 02-06-2011, 02:29 PM   #8
Aesir
LQ Newbie
 
Registered: Feb 2011
Distribution: Arch
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you very much for your lengthy and very informative post! Couple of follow-up questions:

Quote:
Originally Posted by bigrigdriver
As far as using the same /home partition, remember that all of your application preferences are kept in your user's /home directory. If you use the same user name across distros, you will be overwriting those files with possibly conflicting versions from one distro to another. The only safe way to use the same /home partition across distros, is to have a different user name for each distro.
Example: In Arch, Sam has his directory at /home/Sam.
In Debian, using the same /home partition, Bob has his own directory at /home/Bob.
There is no overlap, therefore no conflict between preference settings for different versions of the same application.
Ok, so say I have my user Aesir in arch right now (home = /home/aesir/). If I understand you correctly, if I simply choose a different username for Debian, then it would create /home/newuser. And this would be enough to keep the two distributions from changing the configurations of the other.

Every time I have installed a distro, I have always created a new partition for each directory (e.g. /home). If, I wanted to use the /home or swap from Arch, how would I do this during the debian install? (I am thinking back to the arch install and can't think of when I would have done this)

Quote:
Originally Posted by bigrigdriver
When you install Debian, be careful to tell the installer to install grub to the Debian partition and not to the MBR. Arch already has that. When installation of Debian is complete, open /boot/grub/menu.lst and copy the Debian menu stanza. Then mount the Arch /boot partiion, open /boot/grub/menu.lst and paste in the Debian menu stanza.
During the Debian install, why would I not just select "continue without a bootloader" and then add the /boot partition info to arch grub menu?

Thank you once again for your very valuable help!

Last edited by Aesir; 02-06-2011 at 05:01 PM.
 
Old 02-06-2011, 05:40 PM   #9
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
If, I wanted to use the /home or swap from Arch, how would I do this during the debian install?
During the installation, Debian will prompt you for the partition (or free space) to use for the root of the installation. You will also have the opportunity at that time, to designate your existing Arch /home partition as Debians /home partition. Just remember to assign yourself a new user name for Debian. Also, Debian will detect the existing swap partition and use it. You may, if you wish, also create another swap partition. It's your choice, and it's all done in the same screen in which you are prompted to designate the root partition.
Quote:
During the Debian install, why would I not just select "continue without a bootloader" and then add the /boot partition info to arch grub menu?
I've never tried installing a distro without a bootloader installed in the manner I described earlier. I don't know what the result will be. If it works without the bootloader, that's great. But it may also fail to boot without the bootloader installed. I just don't know.

Last edited by bigrigdriver; 02-06-2011 at 05:42 PM.
 
Old 02-06-2011, 07:02 PM   #10
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
My 2 cents, I would install the debian grub to /. Then you can chainload or direct boot grub from arch.
I also just use one partition for swap on 8 distros with no problem. The way to go now is with virtual machine if you are going to use a couple or few more distros.
 
Old 02-06-2011, 08:06 PM   #11
Aesir
LQ Newbie
 
Registered: Feb 2011
Distribution: Arch
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Larry Webb View Post
My 2 cents, I would install the debian grub to /. Then you can chainload or direct boot grub from arch.
I also just use one partition for swap on 8 distros with no problem. The way to go now is with virtual machine if you are going to use a couple or few more distros.
Thanks. Do you mean the new / that I create for Debian or my arch partition? And would you also share the /home partition with two unique users as bigrigdriver suggest?

Aside: I have seen a lot of users on LQ with the distro specific logo under the name (the Suse chameleon for you), how do you display this?
 
Old 02-06-2011, 09:22 PM   #12
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by Aesir View Post
Aside: I have seen a lot of users on LQ with the distro specific logo under the name (the Suse chameleon for you), how do you display this?
Set the browser's useragent.
 
Old 02-06-2011, 11:13 PM   #13
Aesir
LQ Newbie
 
Registered: Feb 2011
Distribution: Arch
Posts: 8

Original Poster
Rep: Reputation: 0
Great. Well I think that I will set up different home partitions. I think that it is the safest choice to avoid any mishap. Does anyone have a definitive answer with regard to the GRUB and how I should handle it with Debian?
 
Old 02-07-2011, 07:54 AM   #14
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Aesir View Post
Thanks. Do you mean the new / that I create for Debian or my arch partition? And would you also share the /home partition with two unique users as bigrigdriver suggest?

No what you have is alright, it is my preference to install Suse and Fedora with just three partitions /, swap, home with all the distros sharing the same swap. I dedicate 20 gig for each distro.

The rest of the distros I install with two partitions / and swap. I dedicate 12 gig for each.

Now being honest I do 90% of my work from Suse.

I have one empty partition which I install each of my test distros but have no plans for installing any more. It is too hard trying to keep up with these (8).

I make the rest a separate data partition which I mount from all my distros. Then I can access my pictures and personal information from any distro.

Last edited by Larry Webb; 02-07-2011 at 07:57 AM.
 
  


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
problem with repartitioning in linux server pankajd Linux - Newbie 1 06-03-2009 03:35 PM
Linux wont start up after repartitioning the hdd donkyboy666 Mandriva 1 08-21-2004 07:48 PM
Repartitioning / Resizing partitions: partition magic in linux: possible? hamish Linux - Newbie 6 06-07-2004 05:00 PM
Can I just replace Windows with Linux WITHOUT repartitioning the disk?? Trying to Learn Linux - Newbie 4 01-21-2004 09:31 AM
repartitioning of linux space from /home to /usr prpsarathy435 Linux - General 0 08-24-2002 11:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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