Burning ISO image

Please excuse the off topic comment:
I have tried several times to burn install an operating system on a USB stick and failed each time.
It might have been due to both my old PC’s not having a USB3 port. I have yet to find out if that was the reason. How do I find out?

USB3 port is not a requirement, just allows USB I/O to be faster, but you need good documentation on how the distro of your choice is to be written to the USB stick. Do a search, for exampe: linux mint bootable usb

Your computer’s BIOS has also to be capable of booting from a USB port, and have this enabled, but all but the oldest of working computers can do so.

You also have to distinguish between writing the OS image on the USB stick for the purpose of installation to hard disk, and using it to run what is called a live system from the USB stick. In many case the two are the same because the USB stick brings up a live system from which you can invoke the installer to make a permanent installation.

1 Like

What OS and software are you using? You can’t simply copy the .iso file to a new disk. I use K3B on Debian. ‘burn ISO to disk’. In two more posts this becomes a new topic. :wink:

[quote=“retiredfeline, post:11, topic:35276, full:true”] Do a search, for exampe: linux mint bootable usb

Your computer’s BIOS has also to be capable of booting from a USB port, and have this enabled, but all but the oldest of working computers can do so………….[/Quote]

Mine is capable.

Yes, I am aware of all that. In fact, I opened a thread on the Linux forums and followed instructions carefully. In one case, I had the assistance of an expert via Teamviewer to achieve a so called: “bootable USB stick”.

Thanks for the reply.

hermit:

What OS and software are you using? You can’t simply copy the .iso file to a new disk. I use K3B on Debian. ‘burn ISO to disk’. In two more posts this becomes a new topic.

Point taken hermit!
This subject has no place here. I will go back to the Linux Mint forums.

Apologies again for off topic.
Thanks for the replies.

Actually I meant I’d split it into a new topic. :wink:

But if you want to go all caveman on it, dd. :smiley:

I fist downloaded an image file for Linux Mint, I think I put it on an USB stick with the “USB Image Writer” program that comes installed by default in Linux Mint (I already had an older Mint version). In the past I’ve also written those images to an USB stick with dd.

Just copying does not work, but with this method you get a bootable “live” stick. There are plenty of programs which can do this for you, even the Linux Mint site lists some (for the different OS’es.)

After I booted from the USB stick, I ran the installation procedure, but instead of installing it on the PC itself, I installed it on another USB stick.
The advantages of this are that you have a “normal” installation. You can customize menu’s and background, install extra programs, etc. Especially for that USB stick I made a very ugly bitmap as background which had “Rescue” written in big bright red letters on it.

It did work, but it did not work very well because it was very slow. On a normal linux installation log files are kept, and other things which make this method very slow. I think that if you boot from a “live” stick, a big RAM disk is made to circumvent the slowness of USB sticks.

Ok. Is that what you have done here?
Innocent question; I am still catching up to how this forum works.
All ok, if that is what you have done.

This went right over my head. What does that mean?

Thanks for the description Paul.
If ever I was to try again (probably won’t), I will follow what you have done.

Jim.

dd is a Unix/Linux program for doing copies between files/media with control over block size, padding, conversion, and a heap of other things. It has a long history, and was named after IBM’s JCL command.

These days, a cross-platform copying program is often used for people starting off without Linux.

1 Like

It was the caveman reference that I did not know.
But…never mind.

Well you see, for example back when I was a caveman, FORTRAN code was sent around on 9-track tapes with 80 character fixed length (punch card) records. Then those “cards” were combined say 20 to a block for tape usage efficiency reason. So to read a program off one of those tapes, we would do:

dd if=/dev/mt0 ibs=1600 cbs=80 conv=unblock of=program.for

meaning, read 1600 byte records, take every 80, trim spaces and add a newline, then write to a Unix file.

You had to know the tape block size because the tape driver would return short reads if the actual size was smaller or lose data if the actual size was larger.

This is just one of the shenanigans we cavemen got up to in the bad old days.

Sorry. Caveman was ‘club it into submission’.

But the software (Discourse) allows for easy splitting of topics. So, you ask a valid follow up based on a response but it isn’t related to the original. No problem. Just move it and the responses.

So the ‘in two more posts this becomes it’s own topic’ meant this. Enough posts to split it off.

Hope you get this sorted.

dd is a caveman program because it behaves like one. It just does what you tell it to without trying to add any inteligence to it. For example, you can copy from a file (your iso image) to raw device (such as an USB stick that is not even mounted) and then it just writes the data to it without having the slightest concern whether there is any file system on that other device. It just overwrites the whole file system, and if the file you write to the device is a proper image, it results in a bootable USB stick.

With dd you can also read from a raw device and write the output to a file. With this it’s quite easy to read a uSD card which is used as boot media for one of those small Linux single board computers and make a backup of it, and write that backup to another uSD card.

On windows there used to be programs for ripping CD’s and DVD’s ( those old fashioned round shiny disks) and turning them into .ISO images. I’m fairly certain that the same can be done with dd by just reading data from all the sectors of that device until it gives no more data.

I’m also fairly certain that a proper .ISO image can be mounted just like any regular storage device into a linux file system and then be read normally.

It’s been years though since I last tried such things. I do have some DVD drives lying around somewhere, but it’s been a long time since I’ve even bothered to connect such a device to my PC.

When working with low level dd operations, your device should never be mounted beforehand, because that implies working with partitions and a file system. In that mode, dd only concerns itself with raw data and it just copies whatever data that is normally interpreted as a file system as if it’s just data. If your device is mounted, then all kind of things such as disk caching can interfere with it. dd is truly caveman in that it does not know about, nor concerns itself with such details.

A single wrongly typed letter in the dd parameters and you can easily overwrite your whole system disk in Linux. dd just does it, so always triple check the parameters you give to dd. It’s also the main reason I do not like to use dd much, and Linux Mint comes pre-installed with gui software to read / write images to/from USB sticks.

Using dd, iso burning, some custom tools for each and every OS is competely obsolete since this project came out https://www.ventoy.net/

It has native windows and linux builds, you run it once to format your chosen usb flash drive and then you just copy OS installer images onto the drive directly as a file. You can have multibootable drive that simultaneously can boot/install windows, linux of all flavors, freebsd, specialized images like pfsense, nas shells, repair tools (gparted and the like) and more.

Literally drag and drop the .iso file to your flash drive from the file manager and you can boot into it.

1 Like

Meh, why should I go to some website to download some program if Linux Mint has a perfectly usable “USB Image Writer” application installed by default?

That “ventoy” program is not even known by apt.

I do agree that almost any program is better than dd though, but it’s still useful for “emergencies” and maybe for scripting if you do such things a lot.

I’m also sure there are plenty of other programs that can get the job done. The USB image writer in Linux Mint is a fairly simple program with not many options.

USB Image Writer or Rufus or Windows bootable flash utility or any similar program is a perfectly valid thing if you want to install an OS once.

Ventoy gives you a unversal tool that you prepare once and then can use to install almost any OS without resorting to specific utilities that particular OS requires. It takes ~30mb of space on your flash drive and you can still use it as a normal drive, i.e. keep your cat pictures on it or whatever. Throw 10 different OS images on your drive and choose at boot time which one you want.

It’s versatile, it doesn’t waste space, it is open source. Combine it with netboot.xyz image and you can forget about downloading isos or keeping them up to date in the first place.

I also once tried such a program which can choose from multiple USB images from an USB stick and then choose between them. I spend about an afternoon to get it to work, and then I found out that one of the images I wanted to put on it was not compatible with that program, and this was described in some dusty corner of the website of that program.

So I just ditched that multi-boot program and went back to a bunch of labeled USB sticks. I prefer the simplicity of one usb stick for one image above fiddling with fancy software that may or may not work.
I also do not use those images much. If you do this sort of thing a lot, then I can undertand you want to put more effort in such software.

Strictly speaking dd has no special powers or secret handshake with the kernel. The ability to write to raw devices is simply a consequence of Unix/Linux exposing the devices as files within the filesystem, the everything is a file paradigm. What dd has is a ton of options so that you can finely control what happens. If you wanted to rewrite just the MBR of a disk, dd can do it for you.

In Linux, the elimination of arbitrary block size limitations on reading raw devices simplfies many operations and normal utilities can be used. I used to compare a CD with its image with this:

cmp /dev/sr0 image.iso

If you wanted to write an image to a flash drive, you don’t have to use dd; this would also work:

cat image > /dev/sdc

The reason for specialist programs springing up to write images to flash drives is that they can be cross platform. So only one set of instructions is needed for all the OSes. Raspberry Pi used to have three sections on writing the image to the SD card, one for each major OS. Now they recommend the Raspberry Pi Imager, which also does download and decompression.

Due to the Internet, if you don’t have a suitable flash writing program you can just download it. Back in the old days you had to find a way to bootstrap yourself with the OS on the machine you were trying to port another OS to. Not to mention that flash drives hadn’t been invented yet.

1 Like

I brought up dd because the OP was having trouble and dd can pretty much ensure a good bootable device. There are enough examples for image burning that ensuring device name for the out file becomes the biggest challenge.

Often I use ‘dd’ to write a bootable USB drive, either because I’m installing a new Linux distro I want a rescue drive. As mentioned elsewhere, you can also use ‘cat’.

One important caveat, if you use ‘dd’ or ‘cat’, you really should follow it up with a ‘sync’ command. Linux will return you to the command prompt before it is finished writing (which it will do in the background). This can give the false impression that writing the file is complete. ‘sync’ forces it to complete.

Lastly… Yes, an iso image (or any partition image) can be mounted. Just use the ‘-o loop’ option when mounting the file.