You are not logged in.

#1 2017-09-07 08:39:24

whyaname
Member
From: Netherlands
Registered: 2013-08-09
Posts: 25

Installing home partition on a second disk

Hello,

I have an SSD and an HDD in my laptop and I want the swap partition and root to be on the SSD and the home on the HDD.

To that end, I created the partitions, and mounted them accordingly:
mount /dev/sda1 /mnt
mount /dev/sdb1 /home

Where sdb is the HDD and sda is the SSD.

After installing the system, when I try to login, it says /home/$Username not found, assuming / as home (not the exact message, going a bit off memory here)

So my question is, how do I mount the home correctly since I think that's the issue that's happening.

Thanks for the help.

Offline

#2 2017-09-07 09:03:36

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: Installing home partition on a second disk

whyaname wrote:

To that end, I created the partitions, and mounted them accordingly:
mount /dev/sda1 /mnt
mount /dev/sdb1 /home

If this was during installation, you should've mounted sdb1 to /mnt/home.

Most likely fixing you fstab should be enough to solve the issue.

Offline

#3 2017-09-07 09:04:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Installing home partition on a second disk

/dev/sdX aren't stable identifiers and can change between boots depending on when the kernel decides to enumerate the device. Use persistent naming in both your fstab and boot loader configuration https://wiki.archlinux.org/index.php/Pe … ice_naming

Offline

#4 2017-09-07 09:16:12

whyaname
Member
From: Netherlands
Registered: 2013-08-09
Posts: 25

Re: Installing home partition on a second disk

I'm sorry for not being clearer in my post but this was my fstab at the time of install:

/etc/fstab output:

#
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>   <dump>  <pass>
# /dev/sda1
UUID=97a50108-2e67-45c4-8f53-3595741bc58e   /mnt        ext4        rw,relatime,data=ordered    0 2

# /dev/sdb1
UUID=ccf96a2e-a165-45c3-8be7-0ae5bdb097f7   /home       ext4        rw,relatime,data=ordered    0 2

# /dev/sda2
UUID=fda178d2-ed4c-4a4f-aab3-8dd61979bf4a   none        swap        defaults    0 0



Even with sdb1 being in the fstab, I could not login to my account.

Offline

#5 2017-09-07 11:16:13

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: Installing home partition on a second disk

Is sdb1 mounted at /home? If not, post the output of 'blkid' as root.
Also, I suppose you have to create the /home/<user> directory if that doesn't exist.

Offline

#6 2017-09-07 11:24:05

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Installing home partition on a second disk

Why have you got sda1 mounted at /mnt instead of / in your fstab?

Last edited by Slithery (2017-09-07 11:24:52)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2017-09-07 12:08:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Installing home partition on a second disk

slitery, I'd guess he did a `genfstab -p /` during the installation.  That's the only way /home would have been included at all, and it'd explain the /mnt mountpoint for the root partition.  The latter ends up not causing a severe problem as the root partition is mounted before the fstab is read - but it should still be fixed.

There is something else going on though.  While mounting the home partition to /home instead of /mnt/home during the install is odd, that too should also be symptomless.  One does not even need to mount the home partition during the install.  Once you reboot into your freshly installed system the home partition must be mounted before you create non-root users.  The fstab posted would actually have done that just fine.

So I can only speculate that in addition to mounting the home parition incorrectly during installation (which would actually be symptomless) and running the wrong genfstab command (which may also be symptomless) there was yet another problem: the OP must have added his non-root user while chrooted into his boot partition during the intial install.  If everything else were done right, this would be fine, but combined with the improper mounting of home this is a problem.  More importantly, though, this reveals a third substantial deviation from the installation guide: @whyaname, how did you install arch linux?  What guide/tutorial did you follow?

Last edited by Trilby (2017-09-07 12:13:11)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-09-07 13:36:45

whyaname
Member
From: Netherlands
Registered: 2013-08-09
Posts: 25

Re: Installing home partition on a second disk

You are spot on with your deduction skills haha. I did indeed do "genfstab - U - p /" and I did add the non root user while chrooted into my fresh install. I followed a copy of the Arch Installation Guide from 2013 or so that I had lying on my disk.

Its not the first time I'm installing Arch, but before I only had one disk to worry about, so with the addition of the second disk, I seemed to have messed up quite a few things.

Offline

#9 2017-09-07 13:39:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Installing home partition on a second disk

whyaname wrote:

I followed a copy of the Arch Installation Guide from 2013 or so

*headdesk*  Sure.  It's not like a bleeding-edge rolling release distro changes in 4 years.

There's not much sense in asking this community for help if you have not yet bothered to follow the proper guidance already assembled by this community.

I'd recommend starting again and doing it right.

Last edited by Trilby (2017-09-07 13:39:50)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2017-09-07 13:43:38

whyaname
Member
From: Netherlands
Registered: 2013-08-09
Posts: 25

Re: Installing home partition on a second disk

I see, well thanks for the help!

Offline

Board footer

Powered by FluxBB