I modified fstab to have /home in separate partition (didn't work)
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 fstabfile (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.
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.
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"
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.