How to write ISO image to USB drive

Instruction how to write ISO image file to an USB drive using GUI is described on PureOS download page. Here you will find info on how do this via command-line utility dd.

First, some general notes:

  • This action will wipe all data on your USB drive!
  • Check md5 hash of the ISO file to make sure the download was fine!

Insert USB drive (it must be unmounted). Open your favorite terminal emulator and run:

# sudo dd bs=4M if=/path/to/PureOS-2.1.iso of=/dev/sdX status=progress && sync

In /dev/sdX replace the X with your USB drive letter, e.g. /dev/sdc.

  • Be extremely careful here, doublecheck your drive designations! Using wrong drive designation might destroy data on your hard drive! You can check this with sudo fdisk -l command.
  • You can ommit status=progress but do not ommit the sync part.
When the command finishes, your drive is ready.

Troubleshooting:

~to be updated~

1 Like

Is it worth adding instructions on finding the right drive above the dd instructions or is the assumption that anyone with a Librem has basic linux experience?
eg

  1. Insert usb disk
  2. Run lsblk or fdisk -l to list all partitions and take note of the drive that matches the details of your usb eg /dev/sdb. If it's not clear which is your drive, eject and remove the usb and run lsblk again, to see what has changed.
  3. Eject the usb disk from your file browser or run umount /dev/sdXN to unmount the usb partition
  4. Run dd
Is it worth adding instructions on finding the right drive above the dd instructions or is the assumption that anyone with a Librem has basic linux experience?

It’s quite obvious, if one takes a moment to study the fdisk output:

% fdisk -l
Disk /dev/sda: 74,5 GiB, 80026361856 bytes, 156301488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2CD6D6E5-B917-4177-8E29-EBD85045951E

Device        Start       End   Sectors  Size Type
/dev/sda1      4096  18878463  18874368    9G Linux filesystem
/dev/sda2  18878464  23072767   4194304    2G Linux swap
/dev/sda3  23072768 156301311 133228544 63,5G Linux filesystem
/dev/sda4      2048      4095      2048    1M BIOS boot

Partition table entries are not in disk order.

Disk /dev/sdb: 7,1 GiB, 7591690240 bytes, 14827520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf1bc517c

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048 14811135 14809088  7,1G  b W95 FAT32

So Disk /dev/sda: 74,5 GiB with multiple partitions is definitely not my USB drive. I inserted 8 GB (7,1 GiB) flash drive, and Disk /dev/sdb: 7,1 GiB is exactly that.

Hi. I use Korora (Fedora) 25 UEFI boot mode, secure boot off. I’m trying to make a Pureos USB, but I am failing.

What I have tried:

DD per instructions in this thread
Fedora Media Writer
Gnome Disks

Each time the USB Write process completes successfully. However, the USB is not recognized on startup.

I have repeated each of the above processes
I have used 4 different USB drives (drives which do work with other distros)
I have downloaded the iso image 4 times to be certain the download was good
And I have switched from UEFI to Legacy boot.

The result is the same each time.

I have the feeling I am doing something wrong.

Thanks in advance
Tom

Tom, I’ll try to reproduce this and report back.

Tom, I cannot reproduce, PureOS started from USB with no problems. What other live distros you tried to start from USB?

Mladen,

On those USBs Ive used Kali, OpenSuse, and Fedora. I’ve also used Etcher to try making the USB and that had the same result.

I had trouble making a USB for RemixOS before too. Same trouble. The only solution was using Rufus on Windows. I have not tried that yet.

Tom

Any chance you could try that live USB in another computer?

Hi!

I hope this discussion is not buried.
I have the same problem as @Tom: I can burn ISO on my USB disk (from Windows with win32diskimager and Etcher), and with GNOME Disk on Debian but the USB disk is never recognized. However, I never had this problem with other distributions…

Do you have any ideas?

Thanks,
Alexis.

Well, PureOS image is a bit different then that of other distributions. Let’s see:

# fdisk -l pureos-8.0-live-amd64.hybrid.iso 
Disk pureos-8.0-live-amd64.hybrid.iso: 1.4 GiB, 1478590464 bytes, 2887872 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa0c6abf3

Device                            Boot Start     End Sectors  Size Id Type
pureos-8.0-live-amd64.hybrid.iso1 *       64 2887871 2887808  1.4G 17 Hidden HPFS/NTFS

The image contains only one partition, wherease others usually create two partitions nowadays, for example:

# fdisk -l debian-live-9.2.0-amd64-xfce.iso.part.backed 
Disk debian-live-9.2.0-amd64-xfce.iso.part.backed: 90.3 MiB, 94666752 bytes, 184896 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1b3edaa2

Device                                        Boot Start     End Sectors  Size Id Type
debian-live-9.2.0-amd64-xfce.iso.part.backed1 *        0 3803903 3803904  1.8G  0 Empty
debian-live-9.2.0-amd64-xfce.iso.part.backed2       1548    2379     832  416K ef EFI (FAT-12/16/32)

Some BIOSes can only recognize usb stick if it contains at least two partions.

So my proposition is to dd pureos image to the usb stick and then run fdisk on the usb stick in order to add another partition on it. This may help the stubborn bios recognize it.

Running disktype on the pureos image tells, that it is bootable only in legacy mode. So if you have UEFI, enable legacy BIOS mode to make it work.

Edit: corrected few typo’s.

Also make sure to check sha hash of the iso file.

Thanks to both of you! I’m gonna try that.