LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-31-2008, 04:03 PM   #1
OpEn_SoUrCe_RoCkS
Member
 
Registered: Apr 2007
Posts: 37

Rep: Reputation: 15
Resize Root partition after install


Is there any way of resizing my root partition after install to make it bigger ? Here is my
setup:

I have my root partition (7.8 GB), then my swap (3.9 GB), and finally my home partition (36 GB) (in that order).
My root is running out of space fast, so here is what I want to do:

Copy everything on my home partition to an external disk
Delete original home partition
Move swap partition to the end of my hard drive
Resize root so that it fills all empty space
Transfer everything that was on the home partition back into the newly resized root

Is it possible ?

Is there anything I should do before doing it ?

Thank you !
 
Old 03-31-2008, 04:19 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,799

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
That sized root should be sufficient in most cases - fix the problem, not the symptom. Check for large space users - (error) logs possibly. Get that sorted out, and you'll probably find your problem goes away.

To answer your question - yes. Use something like the gparted liveCD. If you are really desperate, delete the swap (way too big), and add that space to the root. Then shrink (or move) /home to get some space at the end for swap - Linux will run without swap while you do the work.
 
Old 03-31-2008, 04:58 PM   #3
OpEn_SoUrCe_RoCkS
Member
 
Registered: Apr 2007
Posts: 37

Original Poster
Rep: Reputation: 15
Okay, I was bold and did some changes -- and I just fried my install -- that is it wont boot. it just does nothing, no grub, nothing. Help ?
 
Old 03-31-2008, 08:46 PM   #4
moxieman99
Member
 
Registered: Feb 2004
Distribution: Dabble, but latest used are Fedora 13 and Ubuntu 10.4.1
Posts: 407

Rep: Reputation: 78
Quote:
Originally Posted by OpEn_SoUrCe_RoCkS View Post
Okay, I was bold and did some changes -- and I just fried my install -- that is it wont boot. it just does nothing, no grub, nothing. Help ?
------------------
1. Did you back up your data in /home ? If not, get your data backed up by booting to a live CD, mounting your hard disk, and transferring your data -- usually easiest.

2. Look at this as an opportunity to resize your partitions correctly. Yes, you can rebuild your mbr and /boot, but why not redo the whole thing right?

What I did to make sure /root didn't run out of room was to move /tmp, /usr, and /opt into their own partitions. Others may tell you to move other things out, but at least this way /root doesn't get chuffed.
So now I have /boot, /root, and /home on separate primary partitions, then /opt, /usr, /tmp and /swap.

Based on the size of your swap file, do you have 2 gig of ram? I cannot think that even the heaviest home user would need 4 gig of swap. Try placing 512 meg of /swap partition at the end of the disk, after /tmp. That way if you need more swap, you can invade /tmp.

Ten gig of /root should be enough for your OS to swim in. I use 5 gig for Mandriva Free 2006 and I'm only using about half of it. /home is however much you want (I use about 30 gig), as is /opt and /usr (I made /usr largish for adding various programs), and /opt and /tmp at 2 gig each has been more than adequate for me.

There's no "right" answer, but I found that breaking some of the other stuff into their own partitions made my set up run smoother.

Good luck
 
Old 03-31-2008, 09:29 PM   #5
fair_is_fair
Member
 
Registered: May 2005
Posts: 511

Rep: Reputation: 51
Never, never, never resize partitions unless you are prepared to reinstall everything except for possibly, windows depending where it is. I made this mistake in a multiboot situation and never recovered squat. My plea for help is documented here somewhere.
Take a crack at reinstalling Grub from the install cd.
 
Old 04-01-2008, 06:31 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,799

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
What did you change in your boldness ???.
Without useful input from you, you are unlikely to get useful advice in return.
 
Old 04-01-2008, 08:01 AM   #7
DOTT.EVARISTI
Member
 
Registered: Jan 2007
Location: La spezia ( Italia )
Distribution: Fedora 9 amd 64, Gnome,PCLOS 2007,OpenSuse 11 amd 64,Sabayon 3.4,Xp,Vista
Posts: 248

Rep: Reputation: 31
Wink Next time don't waste so space in swap.

Quote:
Originally Posted by fair_is_fair View Post
Never, never, never resize partitions unless you are prepared to reinstall everything except for possibly, windows depending where it is. I made this mistake in a multiboot situation and never recovered squat. My plea for help is documented here somewhere.
Take a crack at reinstalling Grub from the install cd.
I fully agree with you..i too resized a root in a multiboot and there was no way to make it bootable again.

The error you made was creating so much swap file,a 1 GB swap file is even too much big for almost every situation unless you make intensive Hollywood video-editing for a multi-milions selling film ,take a look at my swap post in another thread

Next time don't waste so space in swap.

You'd better backup your important files and install again the distro maybe putting root and home together if you have space problems and periodically clean the disk from rubbish with kleansweep to recover as much space as possible
 
Old 04-01-2008, 11:11 AM   #8
OpEn_SoUrCe_RoCkS
Member
 
Registered: Apr 2007
Posts: 37

Original Poster
Rep: Reputation: 15
Okay, thanks guys. I think I'll wait until I have a second hard drive or something before installing Mandriva again, I like having alot of space to swim in... That's okay, Linux was just for fun.
 
Old 04-01-2008, 05:38 PM   #9
OpEn_SoUrCe_RoCkS
Member
 
Registered: Apr 2007
Posts: 37

Original Poster
Rep: Reputation: 15
Hey, guess what ! I did a re-install and my home partition was not corrupt or anything, so I am sort of back where I started, except I now have a 11.6 GB root partition, a swap partition of about 2 gigs, and some unallocated space if ever I need to empty root (by mounting the empty space as var or something). So, no harm done, except for the time it took to re-install and configure everything back to the way it was.

Thanks for all your input.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] need larger root partition can i resize it hoodooman Linux - General 9 01-06-2008 01:03 PM
Trying to resize my root partition blackboab Linux - Software 3 09-05-2007 07:28 AM
how to resize the root partition? zero79 Debian 11 01-10-2007 10:28 PM
resize root partition after install Phyrexicaid Suse/Novell 2 08-31-2005 03:38 AM
how to resize my /root partition Perfekt Linux - Software 4 12-23-2003 09:22 PM


All times are GMT -5. The time now is 04:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration