<commit_before># Live System helpers

Scripts and configs to allow creation and use of live system.

## Creation Script
Shell funtions in `mklive.sh` are used to build a live image
and create bootable USB media.

Call script without arguments to show available entrypoint options.

### Image Creation
The `create` operation takes a system root directory and an
arbitrary output directory to write a squashfs image (`filesystem.squashfs`),
additional package and copy current kernel (`vmlinu*`) and initrd (`initrd.*`) to.

The `/boot` directory is exclude from squashfs image to save space.

Cleanup functions are designed for Debian/Ubuntu type systems.

Required packages:
- `squashfs-tools`: creating compressed image file
- `dpkg`: installed packages listing

### Live USB Creation
Use `install` operation to copy live data to stick and writing prepared GRUB2 boot code.

Try to hide live system directory via FAT file system flags.


## GRUB configuration
Example configuration and creation/install instructions for
boot loader can be found in `grub.cfg`.

A minimal module set (working on my system!) for `grub2` is listed in `grub_minimal.txt`.


## Casper Configuration
To add data to Live System Ramdisk the script `27livedata` searches
for archives and extracts them to a location according to their name.
This script should be copied to `/usr/share/initramfs-tools/scripts/casper-bottom`
of live system base.

When using a regular data Stick to store a live system it is useful
to wave write access to the single live media partition.
With `casper.diff` an addition to `/usr/share/initramfs-tools/scripts/casper`
can be applied before creatin an initial ramdisk to change
FAT and NTFS live volume mount options.

Required packages:
- `casper`: Ubuntu live image runtime


## Documentation Shell Interface
To access documentation via a command line Interface
`doc.py` searches config files according to environment and
displays availabel elements or their content.<commit_msg>some README extensions and clarifications<commit_after># Live System helpers

Scripts and configs to allow creation and use of live system.

## Creation Script
Shell funtions in `mklive.sh` are used to build a live image
and create bootable USB media.

Call script without arguments to show available entrypoint options.

### Image Creation
The `create` operation takes a system root directory and an
arbitrary output directory to write a squashfs image (`filesystem.squashfs`),
additional package info and copy current kernel (`vmlinuz`) and initrd (`initrd.img`) to.

The `/boot/grub` directory and initrd images are exclude from squashfs image to save space.

Cleanup and package functions are designed for Debian/Ubuntu type systems.

Required packages:
- `squashfs-tools`: creating compressed image file
- `dpkg`: installed packages listing

### Live USB Creation
Use `install` operation to copy live data to stick and writing prepared GRUB2 boot code.

Try to hide live system directory via FAT file system flags.


## GRUB configuration
Example configuration and creation/install instructions for
boot loader can be found in `grub.cfg`.

A minimal module set (working for my system!) for `grub2` is listed in `grub_minimal.txt`.


## Casper Configuration
To add data to Live System Ramdisk the script `27livedata` searches
for archives and extracts them to a location according to their name.
This script should be copied to `/usr/share/initramfs-tools/scripts/casper-bottom`
of live system base.

It additionally creates a direectory `/remote` and adds live user to `fuse`
group for later use of `sshfs`.

When using a regular data Stick to store a live system it is useful
to wave write access to the single live media partition.
With `casper.diff` an addition to `/usr/share/initramfs-tools/scripts/casper`
can be applied before creatin an initial ramdisk to change
FAT and NTFS live volume mount options.

Required packages:
- `casper`: Ubuntu live image runtime


## Documentation Shell Interface
To access documentation via a command line Interface
`doc.py` searches config files according to environment and
displays availabel elements or their content.
{'fraction_non_alphanumeric': 0.056104021189501564, 'fraction_numerical': 0.001926318324103058, 'mean_word_length': 4.745504840940526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2692392', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1039, 'n_words': 581}