Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binary-bootstrap says it installed successfully but prints "ERROR: Failed to mount / private (Invalid argument)" right afterwards #35018

Closed
n0x-io opened this issue Jan 12, 2022 · 2 comments

Comments

@n0x-io
Copy link

n0x-io commented Jan 12, 2022

Hello!
I'm a little new to void linux and currently I'm running void musl. But since I'd like to run some stuff that requires glibc like for example discord I tried to set up a chroot with void glibc in which I can run all my software that depends on glibc.

A friend of mine is running a similar setup and showed my how to set it up but we are running into an issue we can't quite explain. I tried to find an already existing issue regarding my error and found issue #30496 but it drifted away from the original issue it seems.
I tested the whole issue inside a VM and on physical hardware to have some different platforms to test on.
I'll try my best to write the process down. If there's any details I left out I'll try my best to add them or answer any questions.

Thanks so much in advance!!

System

  • xuname (on the base system)
    Void 5.15.14_1 x86_64-musl GenuineIntel uptodate rF
  • xuname (inside the chroot):
    Void 5.15.14_1 x86_64 GenuineIntel uptodate rF
  • package:
    the base bootstrap itself is causing issues.

Expected behavior

The base for void-packages installs after running the command ./xbps-src binary-bootstrap and I will be able to install new packages inside my freshly created

Actual behavior

The bootstrap process says it installs successfully but prints an Error right after that.

....
46 downloaded, 66 installed, 0 updated, 66 configured, 0 removed.
=> xbps-src: installed base-chroot successfully!
ERROR: Failed to mount / private (Invalid argument)

Steps to reproduce the behavior

I'm running on a fresh install of void-musl. I honestly have no real clue where my install breaks so I'll list my steps from the very beginnig

  1. Install a fresh glibc base directory with
sudo XBPS_ARCH=x86_64 xbps-install -S -R https://alpha.de.repo.voidlinux.org/current -r ~/workspace/glibc-chroot base-voidstrap
  1. chroot into the new base-install, set up a new user with the wheel and xbuilder group and close the chroot again
  2. Mount needed directories and log in as the freshly created user
mount -t sysfs none ~/workspace/glibc-chroot/sys
mount -t proc none/proc
mount --rbind /dev  ~/workspace/glibc-chroot/dev
mount --rbind /tmp  ~/workspace/glibc-chroot/tmp
mount --rbind /run  ~/workspace/glibc-chroot/run
su -c "xhost +" myChrootUser
cp /etc/resolve.conf  ~/workspace/glibc-chroot/etc
chroot  ~/workspace/glibc-chroot su myChrootUser
  1. Install some needed tools, fix libc-locales for my languages
sudo xbps-install git st-terminfo curl bsdtar nvim

enable "de_DE.UTF-8 UTF-8" and "de_DE ISO-8859-1" in /etc/defaults/libc-locales and recreate locales

sudo xbps-reconfigure -f glibc-locales
  1. Download void-packages and run the binary-bootstrap
git clone https://github.com/void-linux/void-packages.git
cd void-packages/
echo XBPS_CHROOT_CMD=uchroot >> etc/conf
./xbps-src binary-bootstrap

After the last command runs through and says it's successfully the described error message shows up.

@Chocimier
Copy link
Member

Don't use chroot for build. Follow instructions to build for glibc on musl host from readme (it's inverted there).

@Chocimier
Copy link
Member

So full procedure on musl host is:

git clone https://github.com/void-linux/void-packages.git
cd void-packages/
./xbps-src -m masterdir-glibc binary-bootstrap x86_64
./xbps-src -m masterdir-glibc pkg ...

Copy resulting *.x86_64.xbps packages into chroot and install them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants