Download Latest Version 2021.02.05.tar.xz (2.3 MB)
Email in envelope

Get an email when there's a new version of add tool

Home / add / usb_flash_tool
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2021-02-04 6.3 kB
README_rus.txt 2021-02-04 9.8 kB
2021.02.05.tar.xz 2021-02-04 2.3 MB
screen-shots.tar.xz 2020-12-22 1.4 MB
Totals: 4 Items   3.7 MB 1
//////////////////////////////////////////////////////////////////////////////
//
// USB Flash Tool - 50x50 :o)
//
//////////////////////////////////////////////////////////////////////////////

simple, very simple, utility (bash / GUI / script) for working with a "flash drive" ("50 на 50" :о)

//
// allows you to perform a number of simple operations with a usb-flash drive
//

- format (bfs ext2 ext3 ext4 jfs ntfs reiserfs3 vfat xfs)
- clear/restore permission of flash-drive (chmod & chown)
- safe / restore 'image drive' from/to drive, including writing hybrid bootable iso-images
- image compression method : iso/gzip/xz
- in case of an error, you can view the log of work
- in order to safely work with 'mobile devices' and not accidentally format the 'working disk', 'BLOCK lists' are provided
- after installation, two * .desktop files are created, first - "normal launch" (for sudo owners - no password), second - launch via kdesu (for regular users who know the root password :o)

//
// requirements for installed programs
//

- mostly linux/bash/zenity etc... packages
- linux/kernel (test on 2.6.33.20-sl12.2 - 4.4.217-sl14.2)
- coreutils    (test on 8.25     -sl12.2 - 8.25   -sl14.2)
- usbutils     (test on 007      -sl14.1 - 008    -sl14.2)
- bash         (test on 3.2.57   -sl12.2 - 4.3.048-sl14.2)
- zenity       (test on 2.32.1/gtk2 - sl12.2/14.2 )

  it is better if there is a 'zenity gtk2-version', as. gt3 - much less "pleasant" to use

  tested on "old version" (gtk2)
  ver.2.32.1/gtk2
  https://aur.archlinux.org/cgit/aur.git/tree/?h=zenity-gtk2
  
  zenity-gtk3 versions were also tested
  
- beep         event voice script, requires sox package (optional)
               (tested sox-14.3.2 - slackware 12.2)  
- for admin operation - need 'sudo'
  the script assumes that the launching user has "sudo without password" privileges or have admin password 
- the launching user must have sudo privileges (or set up *. files for root authorization ourselves, kdesu - or like other gui)
- or configure launch permission by any other administrative means

//
// setup / tuning
//

settings / configs / resources: * .cfg settings files, in the call from the installation there are:

/etc/usb_flash_tool         # global. installation MAIN_DIR
/usr/share/beep             #

~/.config/usb_flash_tool    # local installation
~/.local/share/beep         #

configuration files::
- main.cfg
- lang.cfg

lang message file:
- main.cfg - var 'LNG'
- lang.cfg - message strings file

+

after installation / first launch - check the directory with settings
~/.config/usb_flash_tool
and clarify the settings in the files (if necessary, more precisely, if the "past" versions of the script have already been used before)

the config format of the latest version has been slightly changed, and the old config will be "incompatible" with what concerns the zenity window size parameters

if there are * .new files in the directory with the settings, it means that the old configs differ from the global / installed ones, the local settings files appear in the directory:
- immediately after installation (if the installation is "local")
- after the first start (if the installation is "global")

in particular, when using GTK3 / zenity - you can improve the appearance of messages / GUI by setting / adjusting the minimum form width, parameter "W0"

when using the GTK2 version and default settings - the appearance of the windows is quite excellent: o)

//
// important settings / main.cfg:
//

block lists (blocking devices in order not to accidentally format a permanently connected or temporarily connected hard drive)
- BLOCK_LST_HDD - hdd nodes (sda sdb sdc ... etc)
- BLOCK_LST_UID - UUID disk's (uuid may help here: /dev/disk/by-uuid/)

all settings are annotated with great and mighty!

//
// optional / features
//

- "beep" - custom-bash, sound events (sox package)
- if the beep (*) package is installed on the system, then you need to remember this, because the name of the binary file has the same name

(*) system package "beep" - http://www.johnath.com/beep/

if the beep script doesn't work see settings 'sox & pulse' ("she/pulse" usually spoils everything)

by default, the sound of events is disabled, the parameter MUTE=1 

//
// install
//

installation (local or global) is designed to "copy" to:

HOME-dir (user installs himself, configures himself)
~/bin                       - script's
~/.local/share/applications - desktop-file
~/.config/usb_flash_tool    - program-dir
~/.local/share/beep         - sound files

ROOTг (root installs, root customizes)
/usr/bin                    - script's
/usr/share/applications     - desktop-file
/etc/usb_flash_tool         - program-dir
/usr/share/beep             - sound files

+

to automate the installation - we use scripts (they are in the root of the archive)
*_usr.sh - install / uninstall as user (local installation)
*_adm.sh - similarly under admin/sudo  (global installation)

//
// license GPL2
//

and ... use at your own discretion, except
- any use against human freedom !!!
- commercial use!

//
// Briefly about work
//

if no available usb devices are found, several are suggested. options:

REPEAT     - repeat / update list
RESET_EHCI - reload kernel modules ehci
USB_RESET  - reset usb (not implemented yet)
EXIT       - exit

if available usb devices are found, except for those that are banned by the BLOCK_ * lists, then a list of devices is offered for selection, the list contains:

NODE_NAME - VENDOR_MODEL -> MOUNT_POINT  (*)

(*) - if mounted

selection of operation with a flash drive:

CHMOD      - reset / install permissions (after formatting)
FORMAT     - format
SAVE       - safe image
RESTORE    - restore image to flash-drive
RESET_EHCI - reset/reload kernel modules ehci

further obvious points, cat. there is no point in describing :o)

доп.
- RESET_EHCI - helps to update / see the flash drive, on slackware-12.2 and the self-assembled kernel the modules are reloaded without problems and the "invisible" or "lost" flash drive becomes available! on newer slackware versions with stock kernels - modules may not always or may not be immediately overloaded. why is that?! - not yet clear: o)

////////////////////////////////////////////////////////////////////////////// 
Source: README.txt, updated 2021-02-04