uinit

command
v7.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Example User uinit

u-root's built-in init command will call uinit if it exits.

The uinit.go in this dir runs a number of commands, including getting an IPv4 address using DHCP, then runs the elvish shell. When the user exists the shell, shutdown halt is automatically run.

To build the example:

    # make some changes to uinit.go in examples/uinit/uinit.go
    u-root -format=cpio -build=bb -o initramfs.cpio \
        ./cmds/* \
        github.com/u-root/u-root/examples/uinit

And then to run it in qemu, with a network:

    qemu-system-x86_64 \
        -m 4096M \
        -nographic -serial mon:stdio -display none -curses \
        -append "console=ttyS0 " \
        -net nic,vlan=0,model=virtio \
        -net user,vlan=0,hostfwd=tcp::2222-:2222,hostname=u-boot \
        -kernel kernel/vmlinuz-$(KERNEL) \
        -initrd initramfs.cpio

Documentation

Overview

This is a basic init script.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL