Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th August 2012, 01:48 PM
deadff Offline
Registered User
 
Join Date: Aug 2012
Location: Brazil
Posts: 5
linuxchrome
Home partition

Hi, folks.

I have fedora 16 installed as my only OS. When i installed it, didn't make /home as a partition but as a normal folder. Is it possible to repartition my pc and backup home files into this new made partition (without formating) so i can reinstall my OS afterwards?

Note that i m not an advanced user, guys. So, if you please could be specific in details, i would thank you very much.

Sorry about my english, it is not my first language and kind regards!
Reply With Quote
  #2  
Old 4th August 2012, 02:02 PM
Adunaic's Avatar
Adunaic Online
Registered User
 
Join Date: Mar 2009
Location: Lancaster, UK
Posts: 883
linuxfirefox
Re: Home partition

Hello and welcome.

The short answer is Yes.

You would need to create a livemedia device as you cannot adjust the partitions of the OS when it is running. Do you have somewhere you can move your files too? Or are you wanting to do this without moving the files of your hard drive?
Reply With Quote
  #3  
Old 4th August 2012, 03:00 PM
deadff Offline
Registered User
 
Join Date: Aug 2012
Location: Brazil
Posts: 5
linuxchrome
Re: Home partition

I would like to move it into my own hd.

---------- Post added at 11:00 AM ---------- Previous post was at 10:58 AM ----------

No, man. I have no external hd nor any pen drives which would fit my data. I would like to know if it is possible to move my data into my own hd in a new partition.
Reply With Quote
  #4  
Old 4th August 2012, 02:03 PM
Gareth Jones Online
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711
linuxfirefox
Re: Home partition

Do you have enough external storage to back-up the entire /home directory? That's the very first thing to do before any messing around with partitions.
Reply With Quote
  #5  
Old 4th August 2012, 03:51 PM
Gareth Jones Online
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711
linuxfirefox
Re: Home partition

Which uses the most space out of /home and (/ – /home)? It'll be best to move whichever is smallest to a new partition.

Working without a backup is risky, but should work okay if you're careful. As Adunaic asked, do you have a Linux live CD to work from?
Reply With Quote
  #6  
Old 4th August 2012, 03:57 PM
deadff Offline
Registered User
 
Join Date: Aug 2012
Location: Brazil
Posts: 5
linuxchrome
Re: Home partition

Yes, i do. I have live cd. My home folder sizes 50 gb. Was that your question, man?
Reply With Quote
  #7  
Old 4th August 2012, 09:02 PM
Gareth Jones Online
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711
linuxfirefox
Re: Home partition

Firstly, if you haven't already, make sure that you're not using LVM, as this complicates things.
Code:
mount | grep "/ "
should return something like "/dev/sdxn on / type ...". If it says "/dev/mapper/..." then things are going to be more complicated.

Assuming that LVM is not being used, the easiest method is to boot the live CD and use GParted to change the partitions. If the live disc doesn't have GParted, install it in a terminal:
Code:
su -c "yum install -y gparted"
Use GParted to shrink your existing root partition as much as you can, then create a new partition for /home (type ext4).

Then you need to mount both partitions. GParted will tell you what the partitions are called, so adjust these commands as appropriate, but I'll assume that the old partition is /dev/sda1 and the newly created one is /dev/sda2.
Code:
su -
cd /mnt
mkdir home root
mount /dev/sda1 root
mount /dev/sda2 home
Move the files in /home:
Code:
mv root/home/* home
Force an SELinux relabel on the next boot:
Code:
touch root/.autorelabel
Get the UUID of the new home partition:
Code:
blkid /dev/sda2
To make sure that the new home is mounted on boot, edit /mnt/root/etc/fstab and add the line:
Code:
UUID=uuid_from_previous_command  /home  ext4  defaults  1  2
Then unmount the partitions again.
Code:
umount /mnt/root
umount /mnt/home
If you want, you can then resize again in GParted to shrink / and grow /home now that the files are no longer in the root partition.
Reply With Quote
  #8  
Old 4th August 2012, 10:39 PM
deadff Offline
Registered User
 
Join Date: Aug 2012
Location: Brazil
Posts: 5
linuxchrome
Re: Home partition

Thanks, man. You' re just awesome! I'll try this and post the results.

---------- Post added at 06:39 PM ---------- Previous post was at 06:30 PM ----------

Humm... I'm using LVM. The output of the first command is: /dev/mapper/vg_(name). I'm guessing this changes everything.
Reply With Quote
  #9  
Old 5th August 2012, 05:37 PM
Gareth Jones Online
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711
linuxfirefox
Re: Home partition

Quote:
Originally Posted by deadff View Post
Humm... I'm using LVM. The output of the first command is: /dev/mapper/vg_(name). I'm guessing this changes everything.
Yes, the commands I gave won't work for LVM. Hopefully someone more familiar with the LVM commands can give some instructions, sorry.
Reply With Quote
Reply

Tags
home, partition

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
home partition on LVM? Nyan Installation and Live Media 2 14th January 2011 03:41 AM
F11 & home partition kraseef Installation and Live Media 18 19th June 2009 06:03 AM
Re-doing /home Partition webserverdude Hardware & Laptops 1 20th June 2006 05:23 PM
Q: Add /home partition aero-z Using Fedora 15 10th July 2005 10:49 PM
/home partition vs. /home directory leasure98 Using Fedora 3 28th May 2004 04:39 AM


Current GMT-time: 20:28 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat