How to create a bootable Linux USB drive (www.zdnet.com)
from jorge@feddit.cl to linux@lemmy.ml on 01 May 2024 19:18
https://feddit.cl/post/2653719

#linux

threaded - newest

SnotFlickerman@lemmy.blahaj.zone on 01 May 2024 19:30 next collapse

Any “How To” that doesn’t just use Rufus isn’t worth the page its text is rendered on. Rufus can do Linux boot disks, but is indispensable for Windows boot disk utilities. It’s one of the only ways I know of to make a Windows ToGo installation (equivalent of a Linux Live USB), which I used to install Windows on a friends SD card for their Steam Deck so they can dual-boot.

rufus.ie/en/

If you’re looking to make a Linux boot USB from Linux itself, BalenaEtcher is probably a better bet since Rufus is Windows-only.

github.com/balena-io/etcher

I’ve noticed there’s tons of how-to’s for making a bootable disk on Windows, hardly any for Linux. Perhaps we ought to remedy that?

yo_scottie_oh@lemmy.ml on 01 May 2024 19:31 next collapse

Ventoy for life

30p87@feddit.de on 01 May 2024 19:52 collapse

Arch currently doesn’t work with it :c

traches@sh.itjust.works on 01 May 2024 21:56 next collapse

It doesn’t? Been a month or two since I updated the ISO but I’ve never had a problem

30p87@feddit.de on 01 May 2024 23:47 collapse

For me it didn’t, on two PCs. I reinstalled Ventoy and redownloaded and verified the ISO. On the latest version. It tries to mount /dev/2024-04-xx-xx-xx unsuccessfully. And indeed, that device does not exist.

lemmyreader@lemmy.ml on 05 May 2024 19:38 collapse

wiki.archlinux.org/…/USB_flash_installation_mediu…

Note: archlinux-2024.05.01-x86_64.iso should be run in GRUB2 mode to work. See Ventoy issue #2825.

30p87@feddit.de on 05 May 2024 19:55 collapse

I thought I tried that too, but I’ll try again then lol

Pattyice@lemmy.ml on 01 May 2024 19:35 next collapse

some distros have it built into it like Mint I was able to create a bookable drive of also mint

SnotFlickerman@lemmy.blahaj.zone on 01 May 2024 19:38 next collapse

Neat, I wasn’t aware of that for Mint.

metaStatic@kbin.social on 01 May 2024 20:46 collapse

I think I destroyed a USB stick back in the day doing this shit. be careful they don't lock the stick and if they do make sure you use the program to wipe the stick ASAP before you forget what program you used to make it.

I have a ventoy stick for this exact reason, just copy iso to stick, no need to burn a new one every time.

Successful_Try543@feddit.de on 01 May 2024 19:48 next collapse

For Linux you don’t need a GUI tool, most how tos just dd the ISO onto the USB medium, e.g.

sudo dd if=<file> of=<device> bs=16M status=progress oflag=sync

like described in the Debian FAQs

SnotFlickerman@lemmy.blahaj.zone on 01 May 2024 19:55 next collapse

Man, Google really does suck now. It feels nearly impossible to get something like a how-to deep in the Debian FAQs to come up, as it mostly surfaces this auto-generated SEO crap for How To’s.

Very cool, I’d assumed there was a simple command line set of commands, just was failing to find it. Thanks.

s38b35M5@lemmy.world on 01 May 2024 20:47 collapse

Man, Google really does suck now. It feels nearly impossible to get something like a how-to deep in the Debian FAQs to come up, as it mostly surfaces this auto-generated SEO crap

By design. The longer you’re Googling, the more ads they can sell.

…Ben Gomes – a long-tenured googler who helped define the company during its best years – lost a fight with Prabhakar Raghavan, a computer scientist turned manager whose tactic for increasing the number of search queries (and thus the number of ads the company could show to searchers) was to decrease the quality of search. That way, searchers would have to spend more time on Google before they found what they were looking for.

SnotFlickerman@lemmy.blahaj.zone on 01 May 2024 20:49 collapse

Oh I know, I posted Zitron’s article here on Lemmy myself just the other day lmao. Part of why it’s on my mind.

s38b35M5@lemmy.world on 01 May 2024 21:32 collapse

Worst timeline? Could be…

orsetto@lemmy.dbzer0.com on 01 May 2024 19:58 next collapse

I don’t remember where, but i read that this method only works because linux distributors “abuse” the ISO format to allow this. If I remember right, it’s not possible to use this ISOs on regular disks

Of course the command you provided is right and it’s what I use, it’s just a fun fact

Successful_Try543@feddit.de on 02 May 2024 04:42 collapse

Yes and no, it’s the other way round. The ISOs often are hybrid images which you can burn onto a CD/DVD or dd onto a USB pen drive. Until approximately 10-15 years ago, if I remember correctly, the distributed Linux ISOs where standard not hybrid images, thus you always needed some other program to create bootable USB media.

wildbus8979@sh.itjust.works on 01 May 2024 20:08 collapse

If you want to create fully custom boot images the command debootstick is pretty cool too!

It’s essentially a wrapper for debootstrap that creates bootable images. It can create both live and installer images.

qemu-debootstrap is also super useful if you want to customize and image for a different architecture (for example building custom RPi images).

SnotFlickerman@lemmy.blahaj.zone on 01 May 2024 20:11 collapse

qrmu-debootstrap is also super useful if you want to customize and image for a different architecture (for example building custom RPi images).

Super useful information, thanks!

EDIT: Is this anything like the isorespinner.sh? I’ve previously used that to get Linux on an RCA Cambio W101 because it needed a fancy ISO since it has a 32-bit bootloader and a 64-bit CPU.

wildbus8979@sh.itjust.works on 01 May 2024 20:41 collapse

I believe the script you are talking about repackages an existing iso. Debootstick builds one from scratch by pulling all the necessary packages from the repository.

For the underlying process of creating this image it uses debootstrap which is the standard Debian way of creating a full system installation (minus the whole bootloader and iso shenanigans). Debootstick allows most options from debootstrap (aka selecting a distro, release, mirror, extra packages, etc).

Squizzy@lemmy.world on 01 May 2024 19:46 next collapse

Just curious does anyone know why it is an Irish address? I dont see many in the space but I know there is a really active linux contributor in Ireland and I am wondering if rufus is his.

scholar@lemmy.world on 01 May 2024 20:29 next collapse

I doubt it; rufus is a windows only program

Khanzarate@lemmy.world on 01 May 2024 20:32 collapse

Rufus is Pete Batard, found it through his links on Rufus’s page.

Dunno who you’re referring to specifically but you can cross reference now.

d3Xt3r@lemmy.nz on 01 May 2024 21:11 next collapse

It’s one of the only ways I know of to make a Windows ToGo installation (equivalent of a Linux Live USB),

You can also use WinToUSB for that btw. Yet another option is to install Windows to a VHD file (using a virtual machine, or using Disk2VHD to convert an existing install), then copy it to your USB, and make it bootable using Ventoy. The latter option is more useful, since with Ventoy you could have multiple other Linux ISOs (or other OS/rescue images) all on a single, portable drive.

SnotFlickerman@lemmy.blahaj.zone on 01 May 2024 21:15 collapse

Yet another option is to install Windows to a VHD file (using a virtual machine, or using Disk2VHD to convert an existing install), then copy it to your USB, and make it bootable using Ventoy

Neat, I saw Ventoy in here, but wasn’t entirely sure about it until you mentioned this. Initially, I assumed it was what it said on the tin but just for Linux ISOs. Very cool you can finagle a Windows live install on there as well.

umbrella@lemmy.ml on 01 May 2024 21:53 next collapse

the only piece of software i really miss on linux is rufus, by far.

traches@sh.itjust.works on 01 May 2024 21:59 next collapse

‘dd if=image.iso of=/dev/do_not_fuck_this_up bs=4M’ is a complete tutorial

t0mri@lemmy.ml on 02 May 2024 02:10 collapse

cp *.iso /dev/disk

or

pv *.iso > /dev/disk

BCsven@lemmy.ca on 02 May 2024 00:28 next collapse

Gnome Disks Util. select mounted drive, go to top right and choose restore image

flyos@jlai.lu on 02 May 2024 10:05 collapse

I tried Windows ToGo on a few USB keys (including two high-speed ones), never managed to get something I could actually use that was not laggy AF, to the point it’s not usable (dozens of minutes to boot, lags of entire minutes and so on). Did I do something wrong?

boredsquirrel@slrpnk.net on 01 May 2024 20:00 next collapse

No shit I think flashing ISOs is now fine that we have Impression, Fedora Media writer und the KDE Usb flash tool.

But how the hell do you install Tails? May have to do that again, but last times it was never bootable.

cygnus@lemmy.ca on 01 May 2024 20:18 next collapse

Uh yeah OK, I doubt anyone in c/linux didn’t know how to do this already

floofloof@lemmy.ca on 01 May 2024 20:51 next collapse

ZDNet content is 100% worthless these days.

jjlinux@lemmy.ml on 01 May 2024 20:58 collapse

Has been for a few years now.

Fidel_Cashflow@lemmy.ml on 01 May 2024 22:02 collapse

I will say, as someone who has been looking for a simple way to install Linux on my Windows desktop at home, this is incredibly useful. Doubly so as I’m not very experienced with installing OS’s and Linux can look very intimidating to an outsider looking in!

cygnus@lemmy.ca on 02 May 2024 01:02 collapse

I stand corrected then - welcome aboard! Linux is much easier to get into now than even just 5 years ago.

bizzle@lemmy.world on 02 May 2024 14:11 collapse

Ugh I switched to Arch full time 5 years ago and I had to walk to the servers uphill both ways in the snow. Kids today don’t know how good they have it.

cygnus@lemmy.ca on 02 May 2024 14:31 collapse

Archinstall didn’t exist 5 years ago, so this is actually true!

bizzle@lemmy.world on 02 May 2024 15:51 collapse

I spent three days trying to get pulseaudio to work, 10 out of 10 can’t recommend enough

Gormadt@lemmy.blahaj.zone on 01 May 2024 21:12 next collapse

Personally I use Ventoy

Basically I can just throw a whole bunch of ISOs on a USB drive and when I boot it it brings me to a menu to pick which one I want to boot

It’s freaking great

I’ve got various windows ISOs and Linux distros just living on a 64GB flash drive

CosmicTurtle0@lemmy.dbzer0.com on 02 May 2024 00:22 next collapse

It must have gotten better than the last time I tried to use Ventoy. Maybe 5 years ago? It kept complaining that the USB drive I was using was bad when it worked completely fine with other tools.

Gormadt@lemmy.blahaj.zone on 02 May 2024 01:08 next collapse

It has gotten a lot better over the years

That was basically my first experience with it as well also about 5 years ago

Nowadays it works like a dream come true for every OS I’ve thrown on the drive

governorkeagan@lemdro.id on 02 May 2024 21:53 collapse

I tried a couple of months ago on my Windows PC and something went wrong somewhere and my USB was stuck in a permanent read-only state.

I definitely will give it another try though, it’s super handy to have.

I’m an idiot and got Ventoy confused with another program I was testing at the time. Please ignore me.

Empricorn@feddit.nl on 03 May 2024 02:05 collapse

Was it VampBoy? I accidentally ordered one and opened the crate to find a sexy, undead Twink. ☹️ I wanted to nerd-out with Linux!!!

penquin@lemm.ee on 02 May 2024 00:45 next collapse

Ventoy is great. It was a bit confusing when I first ran into it. It installed, but I didn’t know what happened. Lmao. I think I installed it like 10 times because it wasn’t telling me what it did, but then the light bulb went off. Aaaaaah. I was trying to install windows on a laptop and it was being a bitch on the USB stick, and Ventoy made it work.

billwashere@lemmy.world on 02 May 2024 01:03 next collapse

Yeah totally go with Ventoy. I had an external device that basically did the same thing but it was a pain in the ass. Little screen and you pick an iso on the drive and it simulated a CD rom. Ventoy is so much simpler. My only complaint is there isn’t an installer that works on a Mac so I have to use Windows. But other than that it’s awesome.

Empricorn@feddit.nl on 03 May 2024 02:02 next collapse

Huh, never tried it. It has persistent storage? Updates? Security?

I’m currently using MX Linux for my Persistent, Live USB of choice, but apparently I need to check out Ventoy?

pineapplelover@lemm.ee on 03 May 2024 05:54 collapse

Best way to have a bootable USB

andrefsp@lemmy.world on 01 May 2024 20:08 next collapse

Isn’t that just ‘sudo cp image.iso /dev/sdX && sync’ ?

DmMacniel@feddit.de on 01 May 2024 22:29 next collapse

The only thing you would have achieved that was would be to copy an iso file onto your stick. EFI or Boot doesn’t know how to do anything with it.

melmi@lemmy.blahaj.zone on 02 May 2024 01:22 collapse

A lot of Linux ISOs are hybrid images which can be booted if flashed directly to a USB stick.

DmMacniel@feddit.de on 02 May 2024 05:24 collapse

Op was just using cp to copy the iso onto the drive no flashing or anything…

someonesmall@lemmy.ml on 02 May 2024 05:39 collapse

The cp command will write the ISO file directly onto the device. This is the official way that is recommended by Debian:

cp debian.iso /dev/sdX

Source: www.debian.org/releases/stable/…/ch04s03.en.html

DmMacniel@feddit.de on 02 May 2024 06:09 collapse

Woah…

Damn I’m sorry for questioning this method, I didn’t know.

melmi@lemmy.blahaj.zone on 02 May 2024 06:20 collapse

This works because block devices like /dev/sdX are just files. If you cp a file onto another file, it overwrites the data of the destination with the source. A block device represents the device itself, not the filesystem; if you wanted to put the ISO inside the filesystem, you’d have to mount it first.

DmMacniel@feddit.de on 02 May 2024 10:55 collapse

Next time I’ll test out another distro I’ll try just that… Sadly I just hopped yesterday from Fedora 40 to LMDE.

nous@programming.dev on 01 May 2024 23:15 collapse

Not technically. unetbootin and some similar tools like rufus take the USB, partition it, and copy the contents of the disk to it after manually setting up a bootloader on it. This is not required for most Linux ISOs though where you can just cp or dd the image directly to the USB as they are already setup with all that on the image. But other ISOs, like I believe Windows ones have a filesystem on them that is not vfat so cannot be directly copied. Although these days for windows you just need to format the USB as vfat and copy the contents of the windows ISO (aka the files inside it, not the iso filesystem) to the filesystem.

I tend to find unetbootin and rufus break more ISOs then they actually help with though. Personally I find ventoy is the better approach overall, just copy the ISO as a file to the USB filesystem (and you can copy multiple ones as well).

fin@sh.itjust.works on 01 May 2024 22:03 next collapse

Some people need everything to have a GUI. They evaporate as soon as they’re required to open the terminal.

DmMacniel@feddit.de on 01 May 2024 22:31 collapse

Isn’t it cool that you only need to use the terminal when you really need it? Simple tasks as flashing an usb stick shouldnt require knowledge of the terminal.

fin@sh.itjust.works on 01 May 2024 22:40 collapse

If you’re talking about me I didn’t say that I’m one of those. I love CLI and rather hate GUI.

theshatterstone54@feddit.uk on 01 May 2024 22:56 next collapse

And that’s why It’s great to have choice. Also, if you start off in CLI, it can be quite overwhelming. The first time I had to partition my drive I was super scared not to mess it up. A few months later I knew exactly what I was doing… when I was using a graphical installer or Gparted. Earlier today, I partitioned my drive using cfdisk (fdisk feels kinda painful; press this, then this, and if, like me, you don’t know the commands by heart, it can take too long), and I installed Arch manually cuz I was bored. It was my first time doing a manual install with systemd-boot (always did grub in the past), so I didn’t realise I had to write my own boot entries for all 3 kernels (mainline, zen and lts), and because of font issues, I just switched back to Fedora (going up a version from 39 to 40 in the process) where I had an issue with a qt component that meant my sddm theme was not working. It isn’t the theme’s fault, that’s for sure, as it worked perfectly on Fedora 39 and elsewhere, and because pretty much all themes I could find relied on this qt module (it’s qtgraphicaleffects, packaged as qt5-qtgraphicaleffects on Fedora) , I got a bit angry and then sat down and rewrote the theme, removing any dependency on graphicaleffects (was only used for drop shadows in some popups), though for some reason some of the colours also got a bit funky but it works and it works well (I also had to hide one of the popups but it wasn’t an essential one).

But I digress. Point is, if it’s more comfortable for you, you’ll use it. If it isn’t but you want it to be, then to ill force yourself to use and get better. If you don’t, you just won’t. That’s the power of choice in Linux.

fin@sh.itjust.works on 01 May 2024 23:10 collapse

For example, when you want to install desktop environments, you need to use CLI. There’s no GUI option. I guess that’s why Linux is considered “difficult” for Windows/MacOS users, while they can use Chromebook, which is also Linux.

The point of original post is how zdnet is trying to let people use Linux, right?

DmMacniel@feddit.de on 02 May 2024 05:32 collapse

No GUI option you say? Then why can I for example install Kde-full via mints app store? Or any Desktop meta package via Synaptic.

Also ChromeOS Is as much Linux as Android is. Barely.

Sylvartas@lemmy.world on 02 May 2024 11:24 collapse

Good thing that the existence of a GUI for a program doesn’t prevent you from using its CLI version then !

rotopenguin@infosec.pub on 01 May 2024 22:29 next collapse

I would like to install a distro on a USB stick, without it doing something stupid to my internal drive’s EFI.

Anarchistcowboy@lemmy.world on 01 May 2024 23:55 collapse

I see people say this a lot and I have no experience with this but I wonder why you wouldn’t use a USB nvme SSD enclosure it seems a lot easier and idk if running it over USB would limit the speed but it could preform better than a USB stick.

rotopenguin@infosec.pub on 02 May 2024 02:36 collapse

A dumb little stick is fine for the occasional “fix something up” or “take a snapshot of a Windows drive because dd is objectively better than anything that Windows itself could do”. A live iso distro precludes me from adding a handful of other useful tools.

Late breaking edit : What I ended up doing was formatting a stick as small EFI / 5GB btrfs / rest exfat. Chattr +c the btrfs, and debootstrap in there. Put rEFInd on the efi and tell its conf file about the stick (or maybe it’ll detect). Put non-free-firmware & stable-security into apt’s sources.list. In a chroot shell, apt get live-task-non-free-firmware-pc gdm3 systemd-timesyncd linux-image-amd64 locales gnome-terminal. Add other tools to suit taste. Fix up the fstab, make /tmp tmpfs, make the exfat mount nofail. With btrfs compression, I can have a gnome environment inside of 2.5GB. It would be even more smol if I could figure out booting directly into Weston.

Hule@lemmy.world on 02 May 2024 18:08 collapse

“persistent storage” is a thing.

But USB drives can’t endure standard Linux for long. Too many logs and other files written all the time…

Red_sun_in_the_sky@lemmy.ml on 02 May 2024 05:29 next collapse

I use Rufus. It just works.

the_crotch@sh.itjust.works on 02 May 2024 14:18 next collapse

And, more importantly, works on windows. I’d imagine windows users are the target audience for a “how to make a Linux USB” walkthrough.

Crack0n7uesday@lemmy.world on 02 May 2024 23:08 next collapse

Easy as shit to use to.

Empathy@beehaw.org on 03 May 2024 05:36 collapse

I kept seeing so many different ones recommended and I kept getting weird issues I didn’t understand with most of them. I don’t often need to make a bootable Linux USB, but every time, Rufus did the job quick and easy.

someonesmall@lemmy.ml on 02 May 2024 05:42 next collapse

If you’re already on linux there is no need to install special tools. Simply copy the iso directly to the USB device.

dd if=distribution.iso of=/dev/sdX bs=1M && sync

gr3q@lemmy.ml on 02 May 2024 07:39 next collapse

You can do the same with cp too. Also safer.

But I use Ventoy nowadays.

Rustmilian@lemmy.world on 02 May 2024 09:42 next collapse

cat works as well.

Krtek@feddit.de on 02 May 2024 14:29 collapse

oflag=sync also works instead of && sync. Might as well drop a status=progress in there too

the_crotch@sh.itjust.works on 02 May 2024 14:17 next collapse

Unetbootin huh? Something tells me people capable of running a Linux-only application know how to make a Linux installer USB.

Hule@lemmy.world on 02 May 2024 18:05 collapse

Unetbootin runs on Windows too…

also Mac

the_crotch@sh.itjust.works on 02 May 2024 23:34 collapse

My bad, didn’t know that

mfat@lemdro.id on 02 May 2024 21:33 next collapse

I use Balena Etcher.

doofy77@aussie.zone on 03 May 2024 00:04 collapse

Popsicle for me, not a fan of electron.

azvasKvklenko@sh.itjust.works on 03 May 2024 03:00 collapse

Unetbootin in 2024? Jeez, just use Belena Etcher for single ISO, or dd if you are already on Linux (it should work on Mac as well) or Ventoy for simply folder of your bootable isos