Help me correct my short-sighted partitioning [SOLVED!]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Help me correct my short-sighted partitioning [SOLVED!]

Postby hyperdrive on Sun Mar 29, 2009 10:24 am

Okay, so here is the short story...

When I first installed Mint... I partitioned to allow more space for / and less for /home, because coming from Windows, I expected the system to take up more space than my personal files.

I allocated 70 Gigs for the system, and now I see that it is only using 10.... I would like to move more of that free space into my /home partition because as I play with video editing and rip more of my CD's I am going to fill up what I have left very quickly...

I understand the basics of partitioning... I also understand that I will have to edit my partitions from the LiveCD because I cannot edit a mounted partition. My question to you all is this:

Are there any hidden pitfalls to editing a partition? Are there any steps I will have to do when I'm done to fix something (grub for example)?

I'd rather know all this before I start than to be surprised. Thanks...


Here is my current partition setup:

Image
Last edited by hyperdrive on Tue Mar 31, 2009 12:38 am, edited 1 time in total.
hyperdrive
Level 2
Level 2
 
Posts: 96
Joined: Thu Jan 15, 2009 4:10 pm

Linux Mint is funded by ads and donations.
 

Re: Help me correct my short-sighted partitioning

Postby gibbsre on Sun Mar 29, 2009 4:57 pm

hyperdrive wrote:Okay, so here is the short story...

When I first installed Mint... I partitioned to allow more space for / and less for /home, because coming from Windows, I expected the system to take up more space than my personal files.

I allocated 70 Gigs for the system, and now I see that it is only using 10.... I would like to move more of that free space into my /home partition because as I play with video editing and rip more of my CD's I am going to fill up what I have left very quickly...

I understand the basics of partitioning... I also understand that I will have to edit my partitions from the LiveCD because I cannot edit a mounted partition. My question to you all is this:

Are there any hidden pitfalls to editing a partition? Are there any steps I will have to do when I'm done to fix something (grub for example)?

I'd rather know all this before I start than to be surprised. Thanks...


Here is my current partition setup:

Image


The main thing I see is the swap should be at the beginning of the drive, and not in the middle from all I have been taught here on this forum.
If it were me, and you want to save all your stuff in /home, I would run mint backup, and then burn the backup file to a disk, cd, or dvd as the size dictates, redo your hard drive in total, and end up with some thing that resembles this:

/Linux swap
/home
/
At what ever sizes you want. I understand that your swap should be approx. two times the size of your available ram. Then run your backed up file to regain all your settings in /home and reboot. All should then be as it was before, except you will have more speed due to the swap at the beginning of the drive, and you will have set your drive at the best possible way to save more data. All you really need for the system, is 11 or 12 gbs. and the rest (except for swap ) can be for storage. I hope this helps.

Ron

Edit: By the way I have redone this so many times, I can't tell you. I have never had any issues with Grub, or anything else, so long as you back up your /home prior to doing this.
Learning stops at death. Learn all you can, and use what you learn.
User avatar
gibbsre
Level 1
Level 1
 
Posts: 48
Joined: Wed Nov 12, 2008 12:57 pm
Location: Carson City, Nevada

Re: Help me correct my short-sighted partitioning

Postby hyperdrive on Sun Mar 29, 2009 6:51 pm

Interesting... I have never heard about swap being better at the start of the disk, thanks for the tip. :D

Also the reason I originally set things up with / being more, is because I expected all of the extra apps in /usr/bin and the various packages to take up much more, I obviously was wrong.

One final question: If I do as you say and backup my home and repartition, is there any way I can avoid losing all of my programs and system configurations (drivers, etc...)? That's the main advantage I see from simply resizing.
hyperdrive
Level 2
Level 2
 
Posts: 96
Joined: Thu Jan 15, 2009 4:10 pm

Re: Help me correct my short-sighted partitioning

Postby gibbsre on Sun Mar 29, 2009 9:58 pm

hyperdrive wrote:Interesting... I have never heard about swap being better at the start of the disk, thanks for the tip. :D

Also the reason I originally set things up with / being more, is because I expected all of the extra apps in /usr/bin and the various packages to take up much more, I obviously was wrong.

One final question: If I do as you say and backup my home and repartition, is there any way I can avoid losing all of my programs and system configurations (drivers, etc...)? That's the main advantage I see from simply resizing.


Generally speaking from my experience only, After I back up my home partition, and reinstall, ( because I screwed up the disto beyond my ability to repair it usually ), everything goes back to the way I had it before. That being said, I am a general user, and don't delve in to all the possible applications available from the distro. I haven't experienced any adverse affects at all from having to reinstall my OS multiple times. Others may have other experienced a different outcome than myself, so you may want to run some queries through the search feature on the forum to see if anything useful pops up.
Resizing isn't that hard to do with gparted, but it takes a very, very long time to accomplish. I prefer to start over and get things right with the proper setup on my HD, but to each his ( or her ) own.

Good luck,

Ron

Edit: on occasion, you may have to reinstall an app., but all your settings for that app. are usually in your /home folder, and after reinstalling, they come back to the way you left them. I have had to reinstall evolution, and skype a couple of times, and my configuration is always as I left it when the reinstall is complete. I even had wine set up on one distro, and had to reinstall it, and everything I had running under it, was stored in my /home folder, so after it was reinstalled, it was back as before. Even passwords for websites are stored in your /home folder.
Learning stops at death. Learn all you can, and use what you learn.
User avatar
gibbsre
Level 1
Level 1
 
Posts: 48
Joined: Wed Nov 12, 2008 12:57 pm
Location: Carson City, Nevada

Re: Help me correct my short-sighted partitioning

Postby hyperdrive on Tue Mar 31, 2009 12:38 am

Okay, so problem solved, but not without a few trials and lessons learned which I will now share for the benefit of the community. :wink:


With much respect to gibbsre, I opted to re-size my existing partition rather than start from scratch simply for this reason: There are many areas which I really had to struggle with to get working (search the forum for load_cycle for an example). I really did not want to have to go through that again if I could at all avoid it.

So this is where my partitioning journey began, I backed up the contents of my home folder manually, because mintBackup kept freezing for some reason (no errors, just a freeze with no disk activity)... It took me 5 DVDs to get everything backed-up.

I then rebooted into the liveCD and started gParted...I deleted my home partition as well as my swap partition. Oddly enough my swap partition was mounted, even though I booted from the liveCD :? ... As confusing as that was.. I was able to right-click it and choose "swapoff" to unmount it. I then moved my root partition to the right and shrunk it down to 30 GB (Why Linux seems to use GiB measurements instead of GB I will never understand, it needlessly complicates the math I must do in my head).

I then created a 4.5 GB swap partition at the start of my disk (thank you gibbsre for that tip!) It speeds up my system noticeably somehow... I don't really understand why though... LOL

Finally I created a new home partition 76 GB in size.

The whole process took about 4 hours and completed fine without any problems... Much shorter than having to reconfigure the system from scratch (at least for my newbie self anyway).

So far so good, here is where it gets interesting

Now I needed to mount my new /home partition and fill it with my backup files. Mounting the new partition was no issue at all. However I realized I couldn't just create a new home dir for my user because on the liveCD, my user did not exist!, so I used the console command adduser to recreate my user and then slowly copied all 5 DVD's worth of files into this folder. Good to go I thought....

I did find out that my /etc/fstab mounts partitions by UUID, and after using gParted, the UUID for my newly re-sized root partition was different, so I had to change it along with my new partitions obviously, to avoid a world of pain upon reboot.

Okay so everything was done now I thought so I excitedly removed the liveCD and rebooted... well Oops, wouldn't quite describe it, but I was reminded of a little "feature" in which everything I copied from my DVDs is now the sole property of "root", so basically my entire home folder was read-only to my user. :cry:

As a little side-note on behavior which I think is interesting... when everything in my home folder is non-writable, most of the GUI did not function... I couldn't bring up the Control Center, nor the log-out Window... Firefox also refused to start.

Anyway, I thought this would be a simple solution... I simply opened a nautilus window as root, selected my home folder, opened properties, and whoops! I can't actually change owner from there, so I did that easily from the console.. like so:

Code: Select all
sudo chown -hR me:me /home/me/

Worked beautifully. NOW it's all fixed, I thought... well no... I did own all the files now, but I still didn't have write-permissions.

"OK" I thought.. "Now this will be easy, I can use the properties window". I had remembered a handy little button that said "Apply permissions to enclosed files"... So I gleefully set permissions and clicked that button... IT DOESN"T WORK! :evil: (see here)

It took me 15 minutes though to actually realize that the button doesn't do anything! After my rage and confusion subsided, I changed the permissions for all my files using the console, like this:

Code: Select all
sudo chmod -R u+rwX,g-rwx,o-rwx /home/me/

This sets read and write permissions for the file owner, and denies all permissions to anyone else, like any good home folder should.

In conclusion

Everything works now, and my partitions are corrected. I am happy... but two things should be fixed in future releases:

I should be warned, when editing partitions, that the UUID is changed... had I not found that out before rebooting, I would be crying now.

and

That button in Nautilus permissions tab needs to actually work, that is just plain stupid.

Thanks for reading, may it help others with similar adventures. :D
hyperdrive
Level 2
Level 2
 
Posts: 96
Joined: Thu Jan 15, 2009 4:10 pm

Re: Help me correct my short-sighted partitioning [SOLVED!]

Postby gibbsre on Tue Mar 31, 2009 12:14 pm

Well it sounds like you got there ok. I found much less problems by backing up my /home while as user, then when I reinstall the OS, I simply set up my same name account as user, and when I ran my reinstall of mt back up, it went right in to the /home partition because I was already there as I had been before the re-do. As long as you got it the way you want it, the "how" isn't important. The end result is what your after, after all, and I am sure many have gone many, many different ways to get there.
Congrats on getting it set up the way you wanted. The one thing I read that I wouldn't have done I think, would be to waste so much space on the OS partition. 4 gigs would be plenty, and anything over 11, or 12, in my mind is waste. As they say though, " to each his ( or her ) own".
Learning stops at death. Learn all you can, and use what you learn.
User avatar
gibbsre
Level 1
Level 1
 
Posts: 48
Joined: Wed Nov 12, 2008 12:57 pm
Location: Carson City, Nevada

Re: Help me correct my short-sighted partitioning [SOLVED!]

Postby hyperdrive on Tue Mar 31, 2009 12:32 pm

gibbsre wrote:Congrats on getting it set up the way you wanted. The one thing I read that I wouldn't have done I think, would be to waste so much space on the OS partition. 4 gigs would be plenty, and anything over 11, or 12, in my mind is waste. As they say though, " to each his ( or her ) own".


I made it a bit bigger because it is already using a decent amount, my root partition is already over 10 Gigs, and I may need to still install more apps... How did you keep yours so small? Unless you have a separate partition for /usr ?

Here's my root partition:
Code: Select all
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda2               33G    11G    21G  34% /
hyperdrive
Level 2
Level 2
 
Posts: 96
Joined: Thu Jan 15, 2009 4:10 pm

Re: Help me correct my short-sighted partitioning [SOLVED!]

Postby gibbsre on Tue Mar 31, 2009 6:05 pm

hyperdrive wrote:
gibbsre wrote:Congrats on getting it set up the way you wanted. The one thing I read that I wouldn't have done I think, would be to waste so much space on the OS partition. 4 gigs would be plenty, and anything over 11, or 12, in my mind is waste. As they say though, " to each his ( or her ) own".


I made it a bit bigger because it is already using a decent amount, my root partition is already over 10 Gigs, and I may need to still install more apps... How did you keep yours so small? Unless you have a separate partition for /usr ?

Here's my root partition:
Code: Select all
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sda2               33G    11G    21G  34% /


I dont to an awful lot like so many folks do. Al I need is a neat, small OS with as fast a desktop as I can find, so I can email, search, maybe a little facebook, and I am gone. By the way, you may want to look at this for future reference. I use it, and it works well on Mint.
Here is the link: http://shibuvarkala.blogspot.com/2008/0 ... ve-cd.html
The app, is remastersys. You can make your own distributable CD/DVD, for yourself, or friends, and family to try "your own OS". I like it, it saves some headaches. You can save with, or with out you /home. If saving with a seperate /home, it will just preserve your OS, as you have it set up, that is when you get it like you want to keep it.

Happy Minting, Ron
Learning stops at death. Learn all you can, and use what you learn.
User avatar
gibbsre
Level 1
Level 1
 
Posts: 48
Joined: Wed Nov 12, 2008 12:57 pm
Location: Carson City, Nevada

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: ashbekah, Google Adsense [Bot], Hillybilly and 27 guests