builder

command module
v0.0.0-...-28ebc5c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 19 Imported by: 0

README

builder

The builder builds a twitchylinux system. A modest amount of the image is configurable via the files located in resources/.

Building TwitchyLinux

Make sure you have Go 1.13.4 or greater installed.

go get github.com/twitchylinux/builder
go build -o twl-builder github.com/twitchylinux/builder
# The installer will now exist at ./twl-builder
Build the root filesystem with kernel
sudo ./twl-builder /tmp/twitchylinux-fs
# Will create a twitchylinux system in /tmp/twitchylinux-fs

If you run this outside of the root of the builder/ tree, you will need to pass the path to the resources/ directory, like this:

sudo ./twl-builder --resources-dir ~/builder/resources /tmp/twitchylinux-fs
Write a LiveUSB
sudo packscripts/write_usb.sh /dev/sdd /tmp/twitchylinux-fs
# Assumes your USB is /dev/sdd
Pack an image
sudo ./packscripts/pack_qemu.sh my-image.img /tmp/twitchylinux-fs
Test in QEMU

Execute image like a live CD

xhost si:localuser:root
sudo qemu-system-x86_64 -soundhw hda -device virtio-rng-pci -vga virtio -enable-kvm -cpu host -smp 4 -m 4G -drive format=raw,file=my-image.img

Create virtual drive & install

qemu-img create -f qcow2 /tmp/qemu_hdd.img 25G # Make a hdd.
# Run once to install TwitchyLinux
sudo qemu-system-x86_64 -enable-kvm -serial stdio -vga qxl -cpu host -smp 4 -m 4G -drive format=raw,file=my-image.img -drive id=disk,file=/tmp/qemu_hdd.img,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0
# Run every time after to use
sudo qemu-system-x86_64 -soundhw hda -enable-kvm -serial stdio -vga qxl -cpu host -smp 4 -m 4G -drive id=disk,file=/tmp/qemu_hdd.img,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0

Notes on debugging sway

  1. Make a temp rundir: sudo mkdir /scratch/twl/tmp/xdg
  2. Bind mount your current rundir: sudo mount --bind /run/user/1000/ /scratch/twl/tmp/xdg
  3. Launch the chroot with: sudo chroot /scratch/twl sudo -u twl WLR_BACKENDS=wayland XDG_RUNTIME_DIR=/tmp/xdg sway -Vd

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
conf
kv
ld
Package ld interprets dynamic linking configuration and caches.
Package ld interprets dynamic linking configuration and caches.
udev
Package udev serializes udev rules.
Package udev serializes udev rules.
Package stager reads config to pick units to run during install.
Package stager reads config to pick units to run during install.
Package units implements logic to build TwitchyLinux as a series of units.
Package units implements logic to build TwitchyLinux as a series of units.

Jump to

Keyboard shortcuts

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