I have found various ways of creating a bootable USB flash drive for (L)ubuntu and Debian.
https://askubuntu.com/a/377561 says to create a bootable Ubuntu USB flash drive from terminal, run
sudo dd bs=4M if=path/to/input.iso of=/dev/sd<?> conv=fdatasync status=progress
https://www.debian.org/releases/stable/amd64/ch04s03.en.html says
The CD or DVD image you choose should be written directly to the USB stick, overwriting its current contents. For example, when using an existing GNU/Linux system, the CD or DVD image file can be written to a USB stick as follows, after having made sure that the stick is unmounted:
# cp debian.iso /dev/sdX # sync
debian: Creating a Bootable Debian USB Flashdrive says
To create a bootable USB drive from Windows, Mac OS, or a preexisting GNU/Linux installation, a reliable choice is to use Rufus.
Lubuntu: Writing/burning the Image says:
For writing images to USB drives on Linux, we recommend
mkusb
a tool developed by a Lubuntu team member, or the USB creator shipped with Lubuntu Startup Disk Creator .
I was wondering if the first way by dd
which works at block level can work in all the cases?
Is it the universal way?
Why can the second way use cp
which works at file level not block level?
What are the benefits of the other ways compared to the first way of using dd
? Can I achieve the same of the other ways, by using dd
or some other commands along using dd
?
Thanks.
dd
,cp
will do the job as well. What doeson block level
mean for you? – Arkadiusz Drabczyk Apr 09 '20 at 12:22persistence.conf
if needed, etc. – Freddy Apr 09 '20 at 12:33cat debian.iso > /dev/sdX
which is what I do when creating bootable USBs – Nasir Riley Apr 11 '20 at 22:47gparted
andparted
in the terminal. Same thing, different ways. – Nasir Riley Apr 12 '20 at 00:21I have never, not a single time, had 'cp', 'dd', or any other copy method actually work in creating a bootable USB. Computers ditched standard CD drives almost 10 years ago, and creating a bootable USB is still a headache. I'm not an idiot. I know how to dispatch 'cp' and 'sync' commands. But, it doesn't work IRL!
– downbeat Mar 08 '22 at 14:39