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 \

<name_of_initrd_gz_you_wish_to_decompress>`

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

2. w_init

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.

Usage:

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:

1. wiakwifi

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.

wiakwifi [reset]

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.

2. wd_mount

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)

3. wd_exit

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:

  1. busybox reboot; 2. busybox shutdown 3. (re)startx

4. wd_saveRAM1

Usage (assiming wd_mount script has been placed in your system executable PATH):

wd_saveRAM1

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.

5. wd_extract

Usage (assuming wd_extract script has been placed in your system executable PATH):

wd_extract <whatever>

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/

Avatar
wiak
sometimes Linux system/apps developer

My earlier research interests included TCP/IP performance/optimisation over noise-prone, long-delay, VSAT links; and cloud-based, autobuild, virtual machines network construction methodologies for distance learning data-comms students’ research and laboratory work.