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

Error with extlinux #10

Closed
xavigonzalvo opened this issue May 1, 2021 · 8 comments
Closed

Error with extlinux #10

xavigonzalvo opened this issue May 1, 2021 · 8 comments

Comments

@xavigonzalvo
Copy link

Observing the following issue when building the container:

#6 0.611 E: Package 'extlinux' has no installation candidate
@iximiuz
Copy link
Owner

iximiuz commented May 1, 2021

Hi Xavi! What is your system setup and what distr have you tried building? I just tried all currently supported options (debian, ubuntu, and alpine) and they worked well for me.

From my host machine:

$ uname -a
Linux bpf-debian11-5-10 5.10.0-6-amd64 #1 SMP Debian 5.10.28-1 (2021-04-09) x86_64 GNU/Linux

$ docker version
Client: Docker Engine - Community
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        370c289
 Built:             Fri Apr  9 22:46:58 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.6
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8728dd2
  Built:            Fri Apr  9 22:45:08 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@xavigonzalvo
Copy link
Author

I'm working on a M1 Macbook air but I've used docker for a while with no issues.

$ uname -a
Darwin Javiers-Air 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:10 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8101 arm64
$ docker version
 Client: Docker Engine - Community
 Cloud integration: 1.0.12
 Version:           20.10.5
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        55c4c88
 Built:             Tue Mar  2 20:13:00 2021
 OS/Arch:           darwin/amd64 (rosetta)
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:16:48 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@xavigonzalvo
Copy link
Author

I think it's a matter of the architecture taken for the debian container. In case of M1 it'll take aarch64. It works if Dockerfile explicitly specifies amd64.

FROM amd64/debian:stretch

@iximiuz
Copy link
Owner

iximiuz commented May 2, 2021

Good point! When I was creating this project, M1 wasn't really a thing. Also, I should probably have stated it explicitly in the README file, but I never tried running this directly on macOS. Not sure if it'll work. A quick check on my old-ish MBP returns losetup: command not found from the Makefile. Normally, I just run it from a VirtualBox machine instead. However, in the case of M1, that's unlikely an option... Probably adding ARM support will require some extra work.

@xavigonzalvo
Copy link
Author

Yes, as you say, the losetup is missing in Mac Os. However, not sure why the loopback needs to be passed to the container but I can confirm that I produced the final image and it starts a system in qemu.

Changes:

  • Dockerfile explicitly states amd69/ubuntu or amd64/debian.
  • losetup runs in the Makefile (i.e., container) and not in the host. I'm not an expert so I don't know why it's better to run losetup in the host and not in the container but it produces the final linux.img.

The final image runs on qemu. A couple of issues, I don't know if that's related to my changes:

  • Read only filesystem.
  • Network is not working.

@iximiuz
Copy link
Owner

iximiuz commented May 2, 2021

I merged a bunch of changes addressing your findings. Now it works on both Linux and macOS for me. But I cannot check the M1 chip.

Regarding the read-only fs and missing networking - these are known limitations. It shouldn't be too hard to make both things work, however, I'm out of capacity at the moment.

@xavigonzalvo
Copy link
Author

That's great! I can confirm that everything works fine.

This is really cool stuff you have here.

@iximiuz
Copy link
Owner

iximiuz commented May 3, 2021

Yay! Thanks for validating!

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