Skip to content

Conversation

orangecms
Copy link
Collaborator

Drop outdated notes. The source build option had to be discarded since the Go toolchain kept growing in size.
The shell has been changed over time, was Elvish at some point, is currently Gosh, and may change again.
Remove redundant paragraphs between u-root.md and u-root-golang.md, referencing instead.

src/u-root.md Outdated
invocations are very fast, usually a millisecond or so.

U-root blurs the line between script-based distros such as Perl Linux[^24] and
u-root is an embeddable root file system intended to be placed in a flash
Copy link
Contributor

@pamolloy pamolloy Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
u-root is an embeddable root file system intended to be placed in a flash
u-root is a build system that can be used to generate a LinuxBoot userspace implemented in Go

Does u-root include unique code or use other projects?

Copy link
Collaborator Author

@orangecms orangecms Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is both; u-root has its own sources for e.g. its commands such as ls, cat etc and boot loaders, corresponding libraries (pkg in Go terms) and so on, and uses other libraries and tools, vendored.

How about "u-root builds a root file system with a userspace implemented in Go"?

The project itself is not limited to Linux or particularly LinuxBoot, aiming to be a universal rootfs for any purpose.
I later learned that universal is what the u in u-root is for; I had first thought it was micro-.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the next sentence already says that it's written in Go, so that would be redundant here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The u-root project consists of a build tool and sources to generate a root file system for use with a Linux kernel, suitable as part of a firmware image stored in a flash device.

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and I should not make half the sentence a link, but only the "Go, a modern, type-safe language" part.

## U-root and embedded systems
## Embedded systems

Embedding kernels and root file systems in BIOS flash is a common technique for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Embed" is used at several places in the article and it isn't clear what it means. At places it refers to placing the kernel and root file system as an image in a binary image, as opposed to on a filesystem or disc partition. And then it also seems to refer to embedded systems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea it's quite confusing, I agree; I'd keep this as-is for now and rethink it for another iteration

Both UEFI[^12] and AMT[^4] are embedded operating systems, loaded from flash that
run network-facing software. Attacks against UEFI have been extensively
studied[^9]. Most printers are network-attached and are a very popular
## Safety and security
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in # Benefits of using Go for firmware?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I thought about, and then again, this paragraph picks up this idea of "embedded systems" and is mostly generic.
I would rather, eventually, want to make this a dedicated chapter, and reference that from both a Go perspective (here) and possibly a Rust perspective at some point.

Since the init program itself is only 132 lines of code and is easy to change,
## u-root design

Designed to be a suitable option for embedded systems, the u-root build system
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Here it is a build system. It isn't possible to download official pre-built binaries, right?

Copy link
Collaborator Author

@orangecms orangecms Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is, though it's not being kept up to date. u-root is rather meant to be used for per-purpose customization, much like BusyBox and Buildroot.

I had set up https://github.com/linuxboot/u-root-builder with CI build artifacts attached, and later, Chris forked it (OOB, not on GitHub) to https://github.com/u-root/u-root-distro; it needs work to be kept up to date. This stuff was mainly used for workshops / trying things out.

Copy link
Collaborator Author

@orangecms orangecms Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://book.linuxboot.org/u-root-qemu-demo.html is based on the prebuilt binaries

format. It is usually compressed and contained in a Linux kernel image, known as
`bzImage` on x86. A bootloader (for example, syslinux) or firmware (for example,
coreboot) loads the kernel into memory and starts it. The Linux kernel sets up
a RAM-based root file system and unpacks the u-root file system into it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this to generic docs since it isn't u-root specific?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, I'd like to do that in another iteration, just rephrased it a bit here to be more accurate

Drop outdated notes. The source build option had to be discarded since
the Go toolchain kept growing in size.
The shell has been changed over time, was Elvish at some point, is
currently Gosh, and may change again.
Remove redundant paragraphs between u-root.md and u-root-golang.md,
referencing instead.

Signed-off-by: Daniel Maslowski <[email protected]>
@orangecms orangecms force-pushed the u-root-cleanup branch 2 times, most recently from 3278350 to f5aab5b Compare October 2, 2025 11:46
Signed-off-by: Daniel Maslowski <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants