I have a desktop PC running Arch Linux that during inital installation only used a 120GB SSD for
/ and no other partitions. I have just recently added a 500GB HDD that I want to mount as
/home to give me added storage, avoid future issues with compiling on an SSD, and help with easier upgrades in the future if I ever change anything but want to retain the same
Prior to this my fstab read:
# <file system> <dir> <type> <options> <dump> <pass> /dev/sda1 / ext4 rw,data=ordered,noatime,nodiratime,discard,erros=remount-ro 0 1
When preparing for the upgrade I copied all of
/home to the new partition then renamed
/home_old and created a new, empty
/home then modified
/etc/fstab to read:
# <file system> <dir> <type> <options> <dump> <pass> /dev/sda1 / ext4 rw,data=ordered,noatime,nodiratime,discard,erros=remount-ro 0 1 /dev/sdb1 /home ext4 rw,nodev,nosuid,erros=remount-ro 0 2
... Which at the time were the correct partition names.
However, I rebooted and it mounted the SSD as
/home. I tried it with UUIDs and received the same result.
Just for the sake of trying, I switched the two and it fell back to an emergency console at boot time. Again tried with UUIDs with the same result.
If I go back to the old version of
/etc/fstab now, it shows the SSD as
/dev/sdb1 and the HDD as
/dev/sda1 but still mounts the SSD as
/, which I find VERY strange.
My question, given the backstory now, is how do I fix this issue and why is it behaving this way so I can understand what's causing this?
As Timothy Martin pointed out in the comments I made a typo in fstab and it turns out that's what caused it. More proof that weird things occur when you make a mistake in your configuration files.