Skip to content

Instantly share code, notes, and snippets.

@hugelgupf
Created April 15, 2020 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugelgupf/53fa838efe1a591693ce75d6cda9dd61 to your computer and use it in GitHub Desktop.
Save hugelgupf/53fa838efe1a591693ce75d6cda9dd61 to your computer and use it in GitHub Desktop.
go get -u github.com/u-root/u-root
# creates an initramfs with a single Go binary that has dhclient, init, sshd, and elvish (a shell).
u-root -build=bb github.com/u-root/u-root/cmds/core/{dhclient,init,sshd,elvish}
# if you want to insert your own init after some basic init functions, include a uinit (user init)
u-root -build=bb -uinitcmd=foobar github.com/u-root/u-root/cmds/core/{dhclient,init,sshd,elvish} \
github.com/hugelgupf/randomproject/cmd/foobar
# want some additional stuff in there?
-files $HOME/foobar/bla.config:etc/bla.config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment