2. Features
FlashIt supports the following operations:
Flash ISO/IMG files to USB stick or SD Card
Create small, compressed images from a USB stick or SD Card for backup or distribution.
Create encrypted USB stick or SD Card with BTRFS compression
Clone one SD Card to another
Shrink and Expand partitions on the SD Card
Convert Filesystem to F2FS or BTRFS for Ubuntu installed on SD Card for Raspberry Pi 4B
These operations are explained in the following sections.
2.1. Flash
This action will write ISO/IMG/Compressed-IMG files to USB stick or SD Card.
Following file formats are supported:
.img Raw disk image (uncompressed)
.iso CD/DVD-ROM disk image
.7z Disk image compressed with 7zip
.zip Disk image compressed with Zip
.img.xz Disk image compressed with XZ (LZMA2)
.img.lzma Disk image compressed with LZMA
.img.gz Disk image compressed with GZip
.img.bz2 Disk image compressed with BZip2
.img.zst Disk image compressed with Zstandard
2.1.1. Notes
Compressed images (like .img.xz, .zip) are decompressed and flashed on-the-fly without creating temporary files
Data will be validated after flashing to confirm that it was written correctly.
Note
If you get a validation error, try writing the same disk image again to the same card. If you get the same error again it may indicate that the SD Card is damaged and about to fail. Try using another SD Card.
Last partition on the drive will be expand to fill the available space. This is useful for flashing operating-system images such as flashing a Ubuntu image for the Raspberry Pi SBC.
Device will be ejected after it is written successfully. This allows the device to be safely removed.
2.2. Create Image
This action will create a compressed disk image file from USB stick or SD Card.
Following file formats are supported for output:
.img Raw disk image (uncompressed)
.img.xz Disk image compressed with XZ (LZMA2)
.img.gz Disk image compressed with GZip
.img.bz2 Disk image compressed with BZip2
.img.lz4 Disk image compressed with LZMA
.img.zst Disk image compressed with Zstandard
2.2.1. Reduce size
The size of the disk image can be reduced by selecting the following options:
Clean junk files - Temporary and junk files are deleted
/*.bak
/Trash*
/var/cache/apt/archives/*.deb
/tmp/*
/root/.cache
/root/.local/share/Trash*
/home/*/.cache
/home/*/.local/share/Trash*
Shrink last partition - Last partition will be shunk to minimum size
Tip
Shrinking the last partition creates an image that can be written to devices of smaller size. For example, if a 64 GB SD Card contains 5 GB of used space, then shrinking the last partition will create a disk image that can be written to a smaller 8 GB SD Card.
Wipe free space - Free space on partition is filled with zeroes.
Note
When a file is deleted, the data blocks occupied by the file are marked as “free” by the file system. The data in the data blocks remains intact till the blocks get overwritten by some other file in the future. When a disk image is created, the data in these “free” blocks will be included in the disk image. The “Wipe free space” option fills the free space with zeroes, and greatly reduces the size of the compressed image.
2.2.2. Methods
Using any of the “Reduce size” options listed above requires the source device to be modified. There are 2 ways of doing this:
Create temp image - A temporary raw disk image will be created from the source device. The raw disk image will be modified (by shrinking partitions, removing junk files, etc) and the modified image will be compressed to create the final disk image.
Note
Pros - The source device is not modified
Cons - Requires a lot of free disk space for creating the temporary image. if the source device is a 64 GB SD Card (for example), then 64 GB of disk space is required for the temporary image!
Modify source device - The source device will be modified directly (by shrinking partitions, removing junk files, etc) and the modified device will be compressed to create the final disk image. The last partition will be re-expanded after the image has been created.
Note
Pros - No temporary image and no extra disk space required
Cons - Source device will be modified
Caution
Modifying the source device can lead to data loss. Ensure to take a backup of the USB stick or SD card if you choose the option to modify source device.
2.3. Format
This action will format USB stick or SD Card for storage.
Supported formats:
FAT32, NTFS, EXFAT, EXT4, BTRFS, F2FS
Tip
Select ‘EXFAT’ to create a USB stick that can be used on Windows, Linux and MacOS.
2.3.1. Encrypted USB Stick
To create an encrypted USB stick with LUKS encryption, select the “Encrypt” option and provide a password.
Tip
You will be prompted to enter the password when you connect the USB stick on Linux distributions like Ubuntu and Fedora. The stick will not be recognized on Windows or MacOS which lack native tools and support for access LUKS devices.
2.3.2. BTRFS Compression
To create a BTRFS-formatted USB stick with transparent data compression, select Format as “BTRFS”, and select “ZStandard” for BTRFS Compression.
Tip
Install btrfs-compsize
on Ubuntu and run the command sudo compsize <folder>
to check the actual size and compressed size of files that you write to the USB stick.
2.4. Mount / Unmount
This action will mount IMG/ISO images to a loop device. Partitions on the mounted image can be accessed in a file manager to copy or extract files that are required.
Click the button for each partition to open the folder in a file manager.
Click the Eject button to unmount the image file.
2.5. Shrink / Expand
This action will shrink or expand the last partition on the USB stick or SD Card to the minimum or maximum size.
2.6. Clone
This action will clone the USB stick or SD Card to another USB stick or SD Card
Cloning is done directly from device-to-device without creating temporary files.
Smaller device can be cloned to a larger device.
Larger device can be cloned to a smaller device if the smaller device has enough space.
The “Fast cloning” option will shrink partitions on the source device before cloning, and expand the partitions again after cloning is complete.
2.7. Convert
This action will take an SD Card that contains Ubuntu 22.04 for Raspberry Pi 4 and convert the root partition to either F2FS or BTRFS. It will also make modifications to the installed OS so that it boots correctly after the file system change.
Important
This action is only for Ubuntu 22.04 and 22.10 on Raspberry Pi 4B/400. It will not work on other operating systems or other single-board computers.
Supported formats:
BTRFS, F2FS
F2FS and BTRFS are popular alternatives for the default EXT4 filesystem.
F2FS (Flash-Friendly File System) is designed to increase the lifespan of flash-based storage media such as SD Cards.
BTRFS supports snapshots and compression.
This is useful for saving disk space and improving storage performance.
Important
The conversion must be done on a fresh Ubuntu image that has been flashed to SD Card or USB drive.
Boot from the SD Card and complete the initial setup.
Shut down the system and remove the SD Card,
Connect the card to another computer such as a desktop or laptop (or a Raspberry Pi 4 booted from another SD Card)
Install FlashIt on the other computer and convert the filesystem.
Important
System cannnot be converted while it is running. SD Card must be connected and converted from another system like a desktop or laptop (or a Raspberry Pi 4 booted from another SD card).
Note
Raspberry Pi OS is not supported as it does not have proper support for using other file systems on the root partition.