5

I'm trying to install Arch on a Virtualbox VM. I'm following along this guide, and this video. Not sure if relevant, but the VDI file is on an external hard drive.

I've created 3 partitions as per the video:

  1. /dev/sda1 linux-swap (~5 GB)
  2. /dev/sda2 ext4 (~10 GB)
  3. /dev/sda3 ext4 (~35 GB)

So early on, the video suggests running a few commands:

# mkdir /mnt/home
# mount /dev/sda2 /mnt
# mount /dev/sda3 /mnt/home

But the last command gives me the following error:

mount: mount point /mnt/home does not exist
  • First question: The Arch guide doesn't say I should partition my disk as the video does. Should I just forego the fancy partition scheme?
  • Second question: If I should go with this partition scheme, how can I get around this error, and why is it happening in the first place?
  • Now that I think about it, this might not be the best forum. Is this better suited for superuser or unix SE sites? – Martin Jan 22 '16 at 17:42
10

This is because you created /mnt/home before mounting something to /mnt. When you did that, the "home" directory is hidden by the newly mounted /mnt filesystem.

You need to: (after unmounting everything above)

mount /dev/sda2 /mnt
mkdir /mnt/home
mount /dev/sda3 /mnt/home
| improve this answer | |
  • Nice. Love easy solutions. I'll give it a crack this afternoon – Martin Jan 22 '16 at 17:51
  • Worked like a charm! – Martin Jan 22 '16 at 18:32
  • Cool, glad to hear it! – Tim S. Jan 22 '16 at 18:33
  • Out of curiosity, how come the guy in this video has no problems with doing things in the order I described in my original question? – Martin Jan 22 '16 at 22:15
  • If /mnt/home already existed on the mounted filesystem, he wouldn't have had a problem. Chances are he already made it in preparation for the video. – Tim S. Jan 22 '16 at 22:19
0

First you create a directory /mnt/home

# mkdir /mnt/home

But then you mount /dev/sda2 to mount, which shadows over /mnt/

# mount /dev/sda2 /mnt

Then try and map to a folder that does not exist as you never made the folder on sda2 which you mapped to /mnt/

# mount /dev/sda3 /mnt/home

Is this intended?

This would work

# mount /dev/sda2 /mnt
# mkdir /mnt/home
# mount /dev/sda3 /mnt/home

because you mount sda2 to /mnt/ then create the folder on sda2 (Which is now /mnt/) then map /dev/sda3 to this folder (Which exists on /dev/sda2)

The real question is why do you want to map /dev/sda2 to /mnt/? /mnt/ is for mount points, sure you could store then on a different physical drive but it won;t really save space or anything.

| improve this answer | |
  • This is how you install Arch, because you chroot to /mnt during the installation. – Tim S. Jan 22 '16 at 17:55
  • Ahh understood. I don't have any experience with arch so I'm use to using /mnt/chroot for that type of stuff. Good enough! Thanks for the information, appreciate it. – Nick Young Jan 22 '16 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.