Live data from Hacker News

Show HN: Build your Linux from Scratch inside Docker with one command

github.com

21–30 of 30 posts

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#22
post #20

So if I'm understanding this correctly, this builds the LFS kernel inside a docker container into an ISO image that can be used with VirtualBox, but cannot be used within a Docker container itself?

Yes, that's correct. The goal was to use the whole LFS's system including OS kernel. Docker, AFAIK, uses host's kernel, see info here https://docs.docker.com/get-started/#virtual-machine-diagram

Anyway, it should be possible to build image for docker container if necessary.

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#23

Why are the docs at linuxfromscratch.org still based on 4.12 instead of 4.14? Have they just not gotten around to updating, or is 4.12 considered more widely accepted? I want to deep dive into building Linux from scratch (step by step, not via a magic script) to get intimately familiar with the OS, but wonder if I ought to invest my time in a more recent version.

As magic script author, who completed the book step by step, I want to say, you won't get "intimately familiar with the OS" after completion. What you will learn: * needed packages: purpose, how and in which order to build them * really basics of OS configuration * fault intolerance to mistakes

So, why I've built such script? I think it is needed for the next steps, where you actually might want to modify kernel/tools/configuration to gain the knowledge how things are (not-)working.

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#24

Earlier quoted context omitted.

What's the difference between writing x commands and hitting enter once, vs writing x commands and waiting for each command to finish? This is a good starting point for people who already know Linux and want a lean self-built system.

I don't really get what's different compared to using something like `from debian:jessie`. In what ways is this more lean?

Generally speaking, building an LFS, you can freely choose what software to include or omit, and where there are multiple pieces of software that solve the same problem, you can choose which one to use. (Of course, you are stuck with the work of making all this work, but that is what this is all about: Learning what makes a Linux system tick.)

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#25

Earlier quoted context omitted.

What's the difference between writing x commands and hitting enter once, vs writing x commands and waiting for each command to finish? This is a good starting point for people who already know Linux and want a lean self-built system.

I don't really get what's different compared to using something like `from debian:jessie`. In what ways is this more lean?

`FROM debian:jessie` costs 53 MiB. (And by the way, please upgrade to Stretch at the earliest convenience.) `FROM alpine` costs 2 MiB. When you need to send container images across the globe on shitty connections, this matters a lot.

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#26
post #18

LFS is a gateway to Gentoo;)

Gentoo is such a great learning platform. Stage 3 installs really educate you on how a linux machine is built. Portage on how system services are built in a modular (or not) way. It creates such a different relationship with the user than most other OS's.

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#27

Earlier quoted context omitted.

I don't really get what's different compared to using something like `from debian:jessie`. In what ways is this more lean?

`FROM debian:jessie` costs 53 MiB. (And by the way, please upgrade to Stretch at the earliest convenience.) `FROM alpine` costs 2 MiB. When you need to send container images across the globe on shitty connections, this matters a lot .

Actually, one of the first commands by default when container is run, is to fetch about 330Mb of compressed toolchain.

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#28
post #27

Earlier quoted context omitted.

`FROM debian:jessie` costs 53 MiB. (And by the way, please upgrade to Stretch at the earliest convenience.) `FROM alpine` costs 2 MiB. When you need to send container images across the globe on shitty connections, this matters a lot .

Actually, one of the first commands by default when container is run, is to fetch about 330Mb of compressed toolchain.

I didn't expect myself to ever say this, but: Our Openstack containers are much leaner than that. (Swift ends up at ~95 MiB for example.)

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#29
post #19

Why are the docs at linuxfromscratch.org still based on 4.12 instead of 4.14? Have they just not gotten around to updating, or is 4.12 considered more widely accepted? I want to deep dive into building Linux from scratch (step by step, not via a magic script) to get intimately familiar with the OS, but wonder if I ought to invest my time in a more recent version.

You are talking about kernel versions? Version 4.12 was from July 2017 until September 2017 (0) Right now the main line kernel is at 4.14, but it has not changed so much that it really matters for learning Linux. [0] https://en.wikipedia.org/wiki/Linux_kernel#4.x.y_releases

I am. Do you think the same steps will work with 4.14? (Or at least that any changes I need to make would be straightforward enough for a relative beginner to figure out?)

Re: Show HN: Build your Linux from Scratch inside Docker with one command

#30
post #19

Earlier quoted context omitted.

You are talking about kernel versions? Version 4.12 was from July 2017 until September 2017 (0) Right now the main line kernel is at 4.14, but it has not changed so much that it really matters for learning Linux. [0] https://en.wikipedia.org/wiki/Linux_kernel#4.x.y_releases

I am. Do you think the same steps will work with 4.14? (Or at least that any changes I need to make would be straightforward enough for a relative beginner to figure out?)

It is impossible for me to determine your level, I would expect it to be straightforward enough.

But probably best to stick with the kernel that the doc is written for.

Post reply on HN