1

How do we create a LIVE USB on LINUX? (using command line "dd")

i'm reading on the internet you type...

  1. Insert your USB drive into your computer and use ‘df’ or ‘lsblk’ from the command line to determine the device name your flash drive has been assigned, e.g. /dev/sdb, sdc, etc. in my case the USB drive shows up on /media/asher/gentoo

  2. Make sure the drive is not mounted. If necessary, unmount it with:

    sudo umount /dev/<device_name>

  3. Write the .iso image to the flash drive:

    sudo dd if=/path/to/distro.iso of=/dev/<device_name> bs=1M

this does seem to do something however it doesn't write the LIVE USB ISO to the USB DRIVE

THANKS FOR THE LIVE USB HELP!

Asher
  • 267
  • 1
    I wrote an answer to this a long time ago: https://askubuntu.com/a/1333139/43926. I suggested using Gnome Disks instead. – C.S.Cameron Mar 16 '24 at 01:10
  • 1
    "my case the USB drive shows up on /media/asher/gentoo" that's the mount point, you have to find the device that's mounted there – muru Mar 16 '24 at 02:08
  • an even easier way to create a live USB in Linux is to install and use Ventoy where you literally just copy the .iso file on to the drive you created. – graham Mar 16 '24 at 09:42
  • In Ubuntu Desktop there is already a tool that is easy to use, the Ubuntu Startup Disk Creator alias usb-creator-gtk or usb-creator-kde. It can help you identify the target drive. See also this link. – sudodus Mar 16 '24 at 15:42
  • I should also add a general advice about dd: it is a powerful but also very dangerous tool, because there is no final checkpoint, where you can double-check, that you have identified the correct target device. There are many reports about people who have overwritten valuable data because they have selected the wrong device. dd does what you tell it to do without questions, so when you tell it to overwrite [the drive and/or partition that contains] the family pictures it will do so. If you are using Ubuntu Server, you can use mkusb-nox. – sudodus Mar 16 '24 at 15:59

1 Answers1

1

Your problem is likely to be that you have not correctly identified the target device.

The device name will start with /dev, so if you insert the USB drive and then type df in a terminal window, you should see something like:

/dev/sdb1 59279292 28167900 28067760 20% /media/asher/gentoo

So the command would look like:

sudo dd if=/path/to/distro.iso of=/dev/sdb bs=1M

Note that the command above has /dev/sdb not /dev/sdb1 - because you should probably not copy the .iso to a partition on the USB but use the entire drive instead.

TommyPeanuts
  • 1,079
  • i tried using lsblk and df and the path is still "sdc 8:32 1 7.5G 0 disk /media/asher/gentoo" or /dev/sdc let me try another time! – Asher Mar 17 '24 at 03:22
  • sudo dd bs=4M if=./livegui-amd64-20240303T170409Z.iso of=/dev/sdX status=progress && sync – Asher Mar 17 '24 at 03:25
  • okay... works! i had to use a different /dev not /media – Asher Mar 17 '24 at 04:11