2

Basically, I require different Live USBs for different needs. I have a single USB drive & when I need to switch to another distro/OS, I simply flash this USB drive with the right boot attributes, using Rufus.

I thought that since I keep on setting the proper boot attributes whenever I need to flash & considering I MIGHT set it wrong, that's my 10 mins of flashing, gone. So I thought I'd finalize things.

I thought whatever Rufus flashes to the USB drive, I might catch as a disk image & have it not just preserve the needed boot attributes, but also be as close of a binary copy. From then on, I'll be using another flasher that writes the disk image in a RAW manner, one that does not save any bootloaders files to the USB drive. With nothing to configure, how can I mess it up? Is the idea.

How do I set about to do this? First thing that comes to mind is using a virtual USB flash drive that is writable, so Rufus will write to a disk image. Though, I've yet to find a virtual USB flash drive software.

I'm also thinking of maybe burning the resulting disk image to CD/DVDs. Would that work?


EDIT:

Rufus has a choice of flashing a USB drive: enter image description here

Going on this path, I would need a virtual USB HDD.

kozner
  • 249
  • 1
  • 4
  • 10
  • There's a myriad of ways to capture a disk image, but not sure if it's possible with Rufus as the originating source _(Alcohol 120% may, but I've never used it in this context)_. The writing of the image in RAW mode is easy enough, but I forget the name of the program that does it. Early versions of FreeNAS v9 (circa ~2015) required doing so for the installer image, but I can't recall the Windows program they required users to download for it _(IIRC, it's called "Win" something and is made to write disk images to USB drives in Windows - Google likely has a cache of the old v9 download page)_ – JW0914 Oct 04 '19 at 11:38
  • 1
    I feel like we're dealing with an [XY problem](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) here. What exactly is your goal? What does it have to do with multiboot? – gronostaj Oct 05 '19 at 05:46

2 Answers2

7

Rufus can create an uncompressed VHD image from whichever drive you have currently selected, which, for all intent and purposes can be used as a regular DD image (because the only difference with a regular DD image is an extra 512-byte footer, which, no matter how much you may think otherwise, will NEVER EVER come in the way of using the .vhd as a .img).

This is actually accessed by the little blue save icon that you see at the top of the screenshot you attached. Have you tried that?

From there, I believe that you should be able to achieve what you want, with the bonus that you'll also be able to mount the image you created as a virtual drive on Windows, if you want to alter it.

For more on this, please see the Rufus FAQ.

Akeo
  • 6,461
  • 4
  • 29
  • 32
2

Solution 1: Read the image from a prepared flash drive. Win32DiskImager can be used to do this.

Solution 2: Prepare your own hybrid ISO. Most of modern Linux distros use so called hybrid ISOs. They are valid ISOs that can be burned to a CD/DVD, but at the same time they are valid disk images that can be written to a flash drive. For example you could feed an Ubuntu ISO to Win32DiskImager and have it write it to disk (Rufus may offer this feature for some ISOs, it calls it "dd mode"). Community documentation on ISO customization is ten to thirteen years old, but may still be useful and you'll find many useful guides all over the Internet.

gronostaj
  • 55,965
  • 20
  • 120
  • 179
  • Solution 2 will not work for me. Correct me if I'm wrong, but I believe that a Multiboot USB drive will not work with drastically different bootloaders. Or perhaps Multiboot adds another stage of booting? I'd rather stick to a number of things that are meant to perform for a broad enough role & not much more than. Rather than have one forcibly broadened thing that can easily go wrong in many regards. – kozner Oct 04 '19 at 12:31
  • Solution 1, now I've been trying that. Under Rufus, I would flash the USB with the right boot attributes. Then I use PowerISO to create a disk image of the USB. Problem is that PowerISO creates the image of the whole USB drive & not just the FAT32 partition inside it. The USB drive is 16GB & I'm keeping the image as binary as possible. So the disk image I'm ending up is also around that -- 14.4GB. I was just finding a software that allows image creation of a partition inside a USB drive & not the whole drive. – kozner Oct 04 '19 at 12:42
  • Then I realized I could just skip the USB drive & have Rufus write to the disk image directly – kozner Oct 04 '19 at 12:42
  • What exactly do you mean by _multiboot_? You didn't mention anything about it in your original post. – gronostaj Oct 04 '19 at 12:44
  • A bootloader in a bootable partition loads a selection of botloaders. This, https://en.wikipedia.org/wiki/Multi-booting on a Live CD – kozner Oct 04 '19 at 12:54
  • I re-read it again & it seems I jumped wrong at what you were saying. – kozner Oct 04 '19 at 12:56
  • How does that work? In physical terms, it's a disk image where it's packet/block/cluster based, as they are in flash drives? Yet on the same time it is file structured, as in ISO? I guess they're not conflicting.... – kozner Oct 04 '19 at 12:59
  • I'm not really familiar with hybrid ISO details. If your actual goal is to create a multiboot flash drive, take a look at [YUMI](https://www.pendrivelinux.com/yumi-multiboot-usb-creator/). – gronostaj Oct 04 '19 at 13:59
  • Hybrid ISOs have special flags set that will hide files and directories based upon what OS they boot on _(i.e. if booting on Windows, they'll only show files meant for Windows, whereas if booting on Linux, the Windows files will be hidden, etc.)_. You've likely came across a hybrid ISO before and never realized it, but they're obvious when you try and calculate size on disk. Hybrid ISOs can also have different file systems within the same ISO (ISO 9660, Joliet, or UDF). – JW0914 Oct 05 '19 at 12:30
  • @JW0914 Are we talking about the same thing? I was talking about ISOs that can be directly written to a disk like a regular disk image. I don't think operating system accessing it afterwards plays any role, as the magic happens when the image is written. – gronostaj Oct 05 '19 at 18:34
  • @gronostaj Maybe? I may be using the wrong terminology... aren't hybrid ISOs what I explained, or is that something else entirely? – JW0914 Oct 05 '19 at 18:48
  • 1
    @JW0914 What you've described would let you create a CD/DVD that has different content on different OSes. What we're dealing with here is an ISO that is at the same time a valid non-optical disk image with the same content, despite those having a completely different structure. – gronostaj Oct 05 '19 at 18:53