LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-20-2012, 04:48 PM   #1
Master_CAPS
Member
 
Registered: Mar 2012
Location: I live at ::1 usually...
Distribution: Yes.
Posts: 55

Rep: Reputation: Disabled
I modified fstab to have /home in separate partition (didn't work)


My setup (fdisk -l):
Code:
Disk /dev/sda: 250.1 GB, 250058268160 bytes, 488395055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x24852de5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     1992059      995998+  83  Linux
/dev/sda2         1992060     5992244     2000092+  82  Linux swap / Solaris
/dev/sda3         5992245   105996869    50002312+  83  Linux
/dev/sda4       105996870   488395054   191199092+   5  Extended
/dev/sda5       105996933   297186434    95594751   83  Linux
/dev/sda6       297186498   488395054    95604278+  83  Linux

Also my fstab file (I ADDED THE LAST TWO LINES) IF i COMMENT OUT THE LAST TWO LINES MY SYSTEM WORKS FINE "i'm not yelling "
Code:
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid	0	0
# UUID=0095b0a5-1961-4f62-af20-cfdedacca5a7
/dev/sda3           	/         	ext4      	rw,relatime,data=ordered	0 1

# UUID=2dfffb8e-e722-42ae-b350-335a9b798972
/dev/sda1           	/boot     	ext4      	rw,relatime,data=ordered	0 2

# UUID=a5368509-c4ab-415e-a15c-c22f80107405
/dev/sda2           	none      	swap      	defaults  	0 0

#my notes: 
#remeber that sda5 and sda6 are last logical parations of sda4 and are each about 95gb

#This sets logical sda5 as the  /home directory (I hope)
/dev/sda5		/home		ext4		defaults,rw,realtime,data=ordered	0 2

#This sets logical sda6 as the  /usr directory (I hope)
/dev/sda6		/usr		ext4		defaults,rw,realtime,data=ordered	0 2


I really, REALLY would like to have /home and /usr on a separate partition, (please don't call me weird, but I would like to encrypt /home and /bin. Maybe not /bin but definately /home!)

If it helps I did this:
sda1 (primary boot/grub ext4)
sda2 (primary swap/type82)
sda3 (primary Arch ext4)
sda4 (extended)
sda5 (logical ext4)
sda6 (logical ext4)

And yes I mounted sda5 and sda6 to copy all contents from /home and /usr to the mount point, added lines to fstab, and rebooted (forgot to unmount but whatever); upon reboot I got grub to load, I selected Arch, and my screen tuned to static/fuzz/colors

I was able to put the Arch instillation disk and mount sda3 and enter the root environment, comment-out the lines I added and it works as normal upon reboot (of course /home and /usr just on sda3 also and not where I wish they were )

I have tried to read-up on the arch-wiki and forums, and its tough switching from windows to linux but ive managed to install arch and figure out most things but this is the only thing in my way now... Thanks for your help!

Last edited by Master_CAPS; 10-20-2012 at 05:00 PM.
 
Old 10-20-2012, 05:13 PM   #2
seeberg
LQ Newbie
 
Registered: Sep 2010
Posts: 14

Rep: Reputation: 3
Did you use cp or cp -a when copying
 
Old 10-20-2012, 05:21 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Adding it to fstab should be the last step, only after it's been verified to work.

To migrate /home onto a separate drive/partition:

1) Log out of your user
2) Use one of the Ctrl+Alt+F# TTYs to log in as root
3) Verify that NO users are logged in with "w"
4) mount sda5 to a temporary location
4) rsync -a /home to your mount point for sda5
5) Move /home to a backup (/home.bak for instance)
6) Make an empty /home directory for your new mount
7) Unmount sda5 and re-mount it at /home
8) Make sure everything in /home looks correct (eg: make sure everything isn't located in /home/home/, which is indicative of bad syntax in the rsync command)
9) Try and log in as a regular user
10a) If successful, commit the mount to fstab, restart, and test it again
10b) If unsuccessful, switch back to your root TTY and check the logs to see why.

Last edited by suicidaleggroll; 10-20-2012 at 05:25 PM.
 
Old 10-20-2012, 06:49 PM   #4
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Adding it to fstab should be the last step, only after it's been verified to work.
agreed.

Did I miss what the actual error was?

regardless, your entry in /etc/fstab looks more or less correct. (running in realtime is a little safer, but significantly slower)

and there is nothing wrong with running /home or /usr on separate partitions, but why do you want to encrypt /bin?

I would remove the changes from fstab. check to see that you can mount your partitions manually. Make sure the permissions are correct.
when copying archives like that you should use "cp -a" "install" or "dd"
 
Old 10-20-2012, 07:28 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Have you read the relevant paragraph in the ArchWiki about using a separate /usr? https://wiki.archlinux.org/index.php...tioning#.2Fusr
A modification of your initrd is needed to get that running.
 
Old 10-20-2012, 07:37 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
TobiSGD: is that Arch specific, or has arch moved all /bin and /sbin files to /usr/bin & /usr/sbin? My initrd file has libraries & modules in usr/ without a separate /usr partition.

Last edited by jschiwal; 10-20-2012 at 07:42 PM.
 
Old 10-20-2012, 07:39 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by Master_CAPS View Post
I have tried to read-up on the arch-wiki and forums, ...
Good; persevere with trying to get a handle on it - Arch has some great doco. See @TobiSGD link - read the entire article, and related links.

As an aside, whenever screwing around with fstab, run a "mount -a" command before you reboot. It'll tell you if you messed up. Most of the time - I suspect it wouldn't have helped in this case.
 
Old 10-20-2012, 07:54 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by jschiwal View Post
TobiSGD: is that Arch specific, or has arch moved all /bin and /sbin files to /usr/bin & /usr/sbin? My initrd file has libraries & modules in usr/ without a separate /usr partition.
AFAIK this is because Arch has moved to symlinking /bin and /sbin to /usr/bin and /usr/sbin, so any distro that has done that also needs the same modifications.
 
Old 10-20-2012, 09:07 PM   #9
Master_CAPS
Member
 
Registered: Mar 2012
Location: I live at ::1 usually...
Distribution: Yes.
Posts: 55

Original Poster
Rep: Reputation: Disabled
I wanted this to go smooth so I actually deleted all partitions and re-installed arch from scratch, and at this point there isnt even a gui (xserver/xorg/kde/kdm...).

After reading your posts im not going to worry about /usr and will only be focusing on moving /home to sda5
I am able to mount sda5 and at this point there isnt anything in my /home dir b/c its a fresh arch install for now. (nothing to copy yet)
But I think im wayyy in over my head I dont really know how this works (like even if it does work will I have to mount it? or does fstab auto mount and redirect all /home to the new home in sda5)

Could I delete /home in sda3 and put a symbolic /home that really points to a mounted sda5?

Last edited by Master_CAPS; 10-20-2012 at 09:10 PM.
 
Old 10-20-2012, 09:42 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You don't delete the /home directory. It's where the partition is mounted on. It would be better to rename it and create a new one, when moving /home. Starting from scratch, you don't need to do it. An advantage of having /home on it's own partition is to be able to reinstall without reformatting the old /home.

Last edited by jschiwal; 10-20-2012 at 09:46 PM.
 
  


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
Using a separate /home partition. Sgt Canuck Linux - General 6 03-10-2009 01:22 PM
Home directory on separate partition Steve W Linux - Newbie 5 03-12-2008 12:37 PM
Home directory on separate partition Steve W Linux - Newbie 2 03-12-2008 12:36 PM
fstab for separate /home /usr /var /boot /etc and / mariogarcia Debian 2 02-24-2007 03:28 PM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 05:52 AM

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

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