You are not logged in.

#1 2014-12-09 01:34:46

XQLRSZ
Member
Registered: 2014-12-08
Posts: 6

arch-chroot Giving Errors

Hi!

I am trying to install Arch for the first time, and everything was going brilliantly until I got to the arch-chroot command.

I am installing BTRFS with Windows 8.1 as a dual-boot. I don't think it will make a difference, but Grub is going to be my boot-loader.

I am mounted into the Windows EFI boot partition (/dev/sda2), and I run

arch-chroot /mnt /bin/bash

but it gives me something like

chroot: /bin/bash is not a file or directory

I looked in the directory and bash was indeed there. The same goes for /bin/sh and /bin/zsh. What is going wrong and how do I fix it?


Bonus points: It kept saying something about /path/to/resolv.conf (I can't remember the path) not existing, but I fixed that by running

touch /path/to/resolv.conf

Should I delete/edit the file, or is it okay how it is?

Thanks in advance! big_smile

Last edited by XQLRSZ (2014-12-09 14:45:14)

Offline

#2 2014-12-09 01:57:42

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

Re: arch-chroot Giving Errors

XQLRSZ wrote:

I am mounted into the Windows EFI boot partition (/dev/sda2), and I run ...

Can you clarify this statement?  The root partition of your new archlinux install should be mounted on /mnt.  If there is a separate boot or efi partition, those would be mounted at /mnt/boot and/or /mnt/boot/efi.  If a boot or efi partition was mounted at /mnt, that would explain this error.

Also you say /bin/bash exists, but does /mnt/bin/bash exist?  This is what the chroot command is looking for and failing to find.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-12-09 14:44:48

XQLRSZ
Member
Registered: 2014-12-08
Posts: 6

Re: arch-chroot Giving Errors

I ran

mount /dev/sda2 /mnt

. /dev/sda2 is the default Windows 8.1 EFI Boot partition. Then I did

cd /mnt

After that, I did the arch-chroot command. Does that clarify anything?

Last edited by XQLRSZ (2014-12-09 14:48:15)

Offline

#4 2014-12-09 14:59:23

Head_on_a_Stick
Member
From: Belsize Park
Registered: 2014-02-20
Posts: 8,193
Website

Re: arch-chroot Giving Errors

@OP: did you mount the root partition as well?

# mount /dev/sda<x> /mnt

Where <x> is the partition number of your root directory.
https://wiki.archlinux.org/index.php/Be … partitions

Also, part of the arch-chroot script copies resolv.conf to the root directory from the .iso -- just `touch`ing it will create an empty file & you won't be able to connect to the internet.

EDIT: You're supposed to mount the Windows ESP as your /boot partition like this (after mounting the root partition, as above):

# mkdir /mnt/boot
# mount /dev/sda2 /mnt/boot

EDIT AGAIN: Sorry Trilby, I've just repeated exactly what you said...
My apologies, I'm not well today sad

Last edited by Head_on_a_Stick (2014-12-09 15:04:04)


godisnowhere

Offline

#5 2014-12-09 15:22:57

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

Re: arch-chroot Giving Errors

My initial suspicion does seem to be right.  But this is actually indicative of a much bigger issue.  Where are you in the installation process?  Did you run pacstrap already?  If you did, it almost certainly failed, right?  How have you created partitions for the new archlinux install?  have you created partitions for the new archlinux install?

Please make sure you are following the following guide and not something of a random blog or youtube video:
https://wiki.archlinux.org/index.php/Beginner%27s_guide


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2014-12-09 16:41:55

XQLRSZ
Member
Registered: 2014-12-08
Posts: 6

Re: arch-chroot Giving Errors

@Head_on_a_Stick
I don't think I was mounted into the root partition, nor had I mounted the /mnt/boot. I think that is the problem. Thank you!

@Trilby
I am stuck at the arch-chroot command. I have already generated an fstab and I already did pacstrap on my root partition. The only thing that failed was something about vi, but I use Vim, so I didn't worry about it. I used gdisk for the partitions (15GiB var, 20GiB root, the rest of the hard drive is home).

I assumed that pacstrap had failed to install vi, and I didn't think that it would cause problems. Am I incorrect in thinking so?

Offline

#7 2014-12-09 16:48:43

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

Re: arch-chroot Giving Errors

I really can't tell - please try to answer all the questions posed.  You would not get the error you did if everything up until that point had worked properly.

I can only assume you mounted the proper root partion before you ran pacstrap - I don't like assuming, that's why I was trying to gather information.  But if you had properly mounted the new archlinux root partition before running pacstrap, then it would still be there at /mnt.  Did you install packages with pacstrap, unmount everything, take a break, the come back to finish later mounting sda2 there instead?

Or perhaps was the new archlinux root partition properly mounted at /mnt, but you then mounted sda2 there as well effectively masking it?  This would lead to that error as well.  But I don't understand why you'd be mounting sda2 at all at this point in the installation.  Please clarify what actually lead up to this error.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2014-12-09 17:03:41

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: arch-chroot Giving Errors

XQLRSZ wrote:

I ran

mount /dev/sda2 /mnt

. /dev/sda2 is the default Windows 8.1 EFI Boot partition. Then I did

cd /mnt

After that, I did the arch-chroot command. Does that clarify anything?

Any reason why you are changing directory into /mnt and then issuing the arch-chroot command? I don't understand why you are doing that.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#9 2014-12-09 20:41:00

XQLRSZ
Member
Registered: 2014-12-08
Posts: 6

Re: arch-chroot Giving Errors

@Trilby
I think the problem was that I mounted into the root and EFI boot partition, but they were both into /mnt. Should I have done

mount /dev/sdaX /mnt ; mount /dev/sdaY /mnt/boot

where X is the root partition and Y is boot?

Offline

#10 2014-12-09 20:44:30

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: arch-chroot Giving Errors

XQLRSZ wrote:

@Trilby
I think the problem was that I mounted into the root and EFI boot partition, but they were both into /mnt. Should I have done

mount /dev/sdaX /mnt ; mount /dev/sdaY /mnt/boot

where X is the root partition and Y is boot?

Yes, that's what you'd do (you might need to create /mnt/boot, but still the same). Likewise for more partitions.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#11 2014-12-09 21:44:26

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

Re: arch-chroot Giving Errors

This is all well covered in the wiki [1].  Do not expect special hand-holding here; follow the guide in the wiki.

[1] https://wiki.archlinux.org/index.php/Be … partitions


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2014-12-09 22:10:40

XQLRSZ
Member
Registered: 2014-12-08
Posts: 6

Re: arch-chroot Giving Errors

I ran arch-chroot after mounting root and boot, but I kept getting errors. This clearly shouldn't be happening, so I'm going to delete the partitions and start with a fresh install.

Thanks everyone for their help!

Offline

Board footer

Powered by FluxBB