Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to properly mount /home partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Mon May 30, 2011 9:15 pm    Post subject: How to properly mount /home partition Reply with quote

Hello,

During the installation process I created a separate /home partition which I planned on adding to /etc/fstab so i can put all my personal stuff on that partition. The issue im having is that after adding the partition to my fstab file and reboot....i get a message that " i can log into /root partition". Below is some info:

Code:




fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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: 0x9355c480

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      530144      265041   83  Linux
/dev/sda2          530145     2281229      875542+  82  Linux swap / Solaris
/dev/sda3         2281230   138608819    68163795   83  Linux
/dev/sda4       138608820   488392064   174891622+   5  Extended
/dev/sda5       138608883   488392064   174891591   83  Linux



Code:


The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda3               /root           ext3            noatime         0 1
/dev/sda2               none            swap            sw              0 0



#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0




I've removed the line that added for my home partition (/dev/sda5)......not sure what I'm doing wrong or missing...the line i added was basically

/dev/sda5 /home ext3 noatime 0 1

All suggestions welcomed
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Mon May 30, 2011 9:24 pm    Post subject: Reply with quote

This does not look right:

Code:
dev/sda3               /root           ext3            noatime         0 1


You probably meant "/" rather than "/root".
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Tue May 31, 2011 1:08 am    Post subject: Reply with quote

hmmm...did not think that would make a difference...but let me make edits and retry adding the /sda5 partition...


same results. still the same error message "cannot enter home directory. Using /."
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Tue May 31, 2011 1:18 am    Post subject: Reply with quote

Well, the previous was wrong because "/" is the filesystem root. "/root" is the root user's home directory.

Could you describe what exactly happens? Do you get the message after you log in as user?

Are the permissions correct? What does it say if you "ls -l /home"?

(By the way, you don't have to reboot. Just add the entry, log out of your user, log in as root and run "mount /home")
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6144
Location: Dallas area

PostPosted: Tue May 31, 2011 1:21 am    Post subject: Reply with quote

what does "mount" return?


and this is from my fstab

Code:
/dev/sda1       /boot       ext2        noauto,noatime  0 0
/dev/sda3       /       reiserfs    noatime,notail      0 1
/dev/sda5       /home       reiserfs    noatime,notail      0 0


minus other partitions that don't matter
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue May 31, 2011 1:28 am    Post subject: Reply with quote

Could you pastebin your dmesg please?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6144
Location: Dallas area

PostPosted: Tue May 31, 2011 1:56 am    Post subject: Reply with quote

I'm going to assume you made a mount point for /home in your root directory,
if not "mkdir /home"
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Tue May 31, 2011 2:14 am    Post subject: Reply with quote

Anon-E-moose wrote:
I'm going to assume you made a mount point for /home in your root directory,
if not "mkdir /home"


That may have been the problem. I think I fixed the issue. First I created a /mnt point for my separate /home partition

mkdir /mnt/home

then

mount /dev/sda5 /mnt/home
cd /home
cp -ax * /mnt/home
cd /
mv /home /home.old
mkdir /home
mount /dev/sda5 /home

rebooted and was able to login without any issues. my /sda5 partition is showing up kdiskutility......thanks to everyone.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum