FirstRib maintenance utilities
Here is a partial list of utilities you can use to maintain/modify your FirstRib-powered distro:
1. `modify_initrd_gz.sh \
Run this script from the location of the gz-compressed initrd you are interested in decompressing/modifying.
This allows you to create a temporary or permanent uncompressed directory containing the contents of FirstRib's magic initrd. You can then modify these contents at your leisure and on entering the command “exit” a initrd_date_timestamped renamed version will be created containing your mods, or you can simply press Ctrl-C and exit the process whilst leaving initrdXXX_decompressed folder remaining for your perusal and use.
Note that this utility has some less-used sibling utilities that do a similar job, but for different initrd compression types (and for conversion between them). For example: modify_initrd_xz.sh and, for conversion, modify_initrd_xz2gz.sh and modify_initrd_gz2xz.sh
Note that you do not always (or even often) need to uncompress the initrd in order to modify FirstRib's boot functionality. Most of the boot functionality code used by FirstRib can be stored in an external to the initrd ordinary text file called “w_init” (often provided by the installation media, along with a lower priority copy inside the initrd itself). So if you modify w_init using your favourite text editor, the changes you make there will be used on the next boot.
3. mount_chroot.sh and umount_chroot.sh
These are used to chroot into an already created root filesystem to manually make modifications (for example to assign or reset a root user password). At the end of the mount_chroot the user leaves that process by entering command ‘exit’. However, on returning thus to the terminal prompt it is important to then run the umount_chroot.sh script to clean up (umount) all the mounted filesystems that were involved.
run these scripts from location of the directory you want to chroot into.
./mount_chroot.sh [root filesystem directory name]
If no arg is supplied directory firstrib_rootfs will be assumed.
then, after ‘exit’ from the chroot, run:
./umount_chroot.sh [root filesystem directory name]
If no arg is supplied directory firstrib_rootfs will again be assumed.
In addition, FirstRib provides some optional simple system utility apps such as:
a simple busybox udhcpd-based WPA2, non-scanning, network connect utility app.
Usage (assuming wiakwifi script has been placed in your system executable PATH):
You need root user rights to use this utility.
If no argument is supplied, wiakwifi will try to reconnect with previously stored settings. If ‘reset’ argument is supplied, wiakwifi will ask afresh for wifi name, and user/password.
A simple optional dev device partition mount tool to mount named device to /mnt/devicename
Usage (assuming wd_mount script has been placed in your system executable PATH):
wd_mount <devicename> (e.g. wd_mount sdb1)
A simple, optional, system shutdown utility.
Usage (assuming wd_exit script has been placed in your system executable PATH):
wd_exit <command> [optional_plugin_path]
where command is: exitX|userswitch|autologin|restartX|reboot|poweroff
In practice, if you say put a copy of wd_exit in your /usr/local/bin directory and just run the command wd_exit without any arguments, it can help you close down your system via the simply choices:
- busybox reboot; 2. busybox shutdown 3. (re)startx
Usage (assiming wd_mount script has been placed in your system executable PATH):
This is a system script used to save from /mnt/layers/RAM/upper_changes back to persistent media upper_changes savefolder when using w_changes=RAM1 mode.
Usage (assuming wd_extract script has been placed in your system executable PATH):
Or use via pcmanfm right-click (though I leave you to set that facility up).
The compressed file/package is extracted into a directory that has same name as the package but minus the extension. Extractors currently included for tar, tgz/tar.gz, txz/tar.xz, tar.bz2, tar.zst, sfs/squashfs, deb
Tiny Linux Blog: https://www.tinylinux.info/