So nowadays there's universal way for any distro. Just use dd in Terminal or some GUI tool like Etcher and get proper USB with your distro ("the way it meant to be used").hybrid ISO files that can be booted or started from both BD or DVD and USB flash drive devices when the image is written to any of these storage devices.
One of the downsides of this method is that now your Flash drive is read only and you can't do anything else with it.
For Windows there's brilliant tool Rufus which offers another method which gives you USB with write-able partition. Despite the fact that internally it uses syslinux, I didn't find GUI tool like this for Linux, or at least modern simple tutorial to achieve this with command-line.
Meanwhile in the Debian documentation
And they're not wrong it's possible with some CLI magic!https://www.debian.org/releases/stable/amd64/ch04s03.html.en wrote:The hybrid image on the stick does not occupy all the storage space, so it may be worth considering using the free space to hold firmware files or packages or any other files of your choice. This could be useful if you have only one stick or just want to keep everything you need on one device.
-----------------
0) Insert your 'read only" Linux USB stick and open Terminal
DISCLAIMER: please check EVERY STEP before proceeding, there's a RISK to confuse devices and DELETE your VALUABLE DATA.
TLDR:
Code: Select all
sudo fdisk -l
sudo fdisk /dev/sdb # n > p > 3x Enter > t > Enter > c > w
sudo mkfs.fat /dev/sdb3 -n USBDATA
Code: Select all
sudo fdisk -l
2) Ok, for me it's /dev/sdb.
Code: Select all
sudo fdisk /dev/sdb
b) Press Enter 3 times to occupy rest of the disk space
c) Ok, this step is not necessary for Linux machines, that's just extra precaution for compatibility with different OS. I'm changing filesystem type from default "Linux" to more appropriate "W95 FAT32 (LBA)" (you can choose whatever you're going to use further).
So press "t", press Enter to confirm that we're modifying 3-rd partion, press "c"
d) Write all your change disk with "w", exit with "q"
3) The most important! Change partition table for that new partition. The reason why we can't do anything with USB stick is that all new partitions by default have that read-only CD format (ISO 9660).
Wait a second! Didn't we just change it in that previous "extra" step!
Well, according to gnome-disks (gnome-disk-utility) "Partition Type" is now really FAT32, but "Contents" (whatever it means) is still "ISO 9660"!
Fortunately we have anothet great CLI tool called mkfs
Remember DISCLAIMER? If unsure check with fdisk -l again!
Code: Select all
sudo mkfs.fat /dev/sdb3 -n USBDATA
P.S. DON"T TRY to format that partition with "GNOME-Disks" (if you did, then just delete (d) and recreate (n > p ...) that partition with fdisk).
Unfortunately the best way to re-format it is mkfs.fat / mkfs.exfat / mkfs.ext4 / mkfs.ntfs (with -Q switch for faster format)