So, I have tried to create a bootable USB stick with “Fedora 38 KDE” on Fedora 36.
Action in the flowchart below.
Some problems were encountered.
The “supported solution”, which is MediaWriter
works on Linux (after the discussion below, thank you everyone)
fails on Windows (in this case, Windows 10) for unclear reasons
livecd-iso-to-disk fails because of format incompatibility. Apparently the format of the ISO file has changed and livecd-iso-to-disk has never been updated (on Fedora 36. The error that the bash script spits out is Error 1 detected at line 2028 /usr/bin/livecd-iso-to-disk. I once opened a bug on this: Bug#2180524
The raw method of using dd works. “Simple” is best, I suppose.
Please provide details of the failures. What version(s) of MediaWriter did you use? Does MediaWriter give an error or does the resulting USB stick fail to boot?
I seem to be able to “restore” (which is really the wrong word, it will confuse neophytes) only on WIndows.
On Linux, there is no option to do so in this MediaWriter (mediawriter-5.0.4-1.fc36.x86_64) version, the option never appears.
On Windows, the option appears if MediaWriter detects an USB stick, but not always.
I have tried with a recent Philips 16GB USB stick and very ancient TDK 4GB USB stick. In both cases, the failure mode is the same.
And it’s the damnedest thing - the USB sticks confuse Fedora 36, there is no way to write anything to them after MediaWriter is done with them. They are sized at 4GB, show 3 partitions and they are “not a block device” when trying to write to /dev/sdX (huh?). Crazy stuff. I need to “restore” them on the Windows machine.
On Linux: good old mediawriter-5.0.4-1.fc36.x86_64.
On WIndows: version 5.0.6 (latest).
There is not much to report, I have no insight on what’s going wrong. Needs more logging.
As shown in the large-ish diagram
On Windows:
Make sure that antivirus has “device control” disabled
Run MediaWriter, selecting an already downloaded ISO file
MediaWriter says “writing” but nothing seems to happen. There is no progress bar and the USB stick doesn’t flash its lights!
After a bit, a Windows popup appears saying “You need to format the disk in E: before you can use it”; Select “Cancel” here
MediaWriter says:
“Destination drive is not writeable (A device which does not exits was specified)”
“Couldn’t open the drive for writing (Access is denied)”
“Couldn’t lock the drive (The handle is invalid)”
After this MediaWriter has problems responding!
The USB stick seems messed up
It seems to contain an ISO9660 filesystem (?)
On Linux, fdisk thinks it is 4 MiB large (!)
One can mount & open it and it contains the Linux system files, apparently
One apparently cannot boot from it
You cannot properly reformat the stick on Linux (!!), you need to use the MediaWriter again to run “Restore Generic Flash Drive” after an unplug/replug cycle.
On Linux:
(UPDATE: This fixed itself after a reboot works now!)
Start mediawriter as root (or vanilla user same result)
There are some UI widget set problems showing on console.
Select an already downloaded ISO image and the USB drive.
Write
There is no progress bar and the USB stick doesn’t flash its lights!
On the console we see immediately “W@52758ms: Writing failed: “Error opening device /dev/sdc: Invalid argument””
…which doesn’t tell much, except that a fnctl call failed
The console also says " W@103020ms: Couldn’t send a notification: “org.freedesktop.DBus.Error.NoReply” - “Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.”
After that, similar as for Windows, you cannot properly reformat the stick on Linux (!!), you need to use the MediaWriter on Windows to run “Restore Generic Flash Drive”.
[root@newbox ~]# fdisk -l /dev/sda
GPT PMBR size mismatch (3287415 != 15663103) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sda: 7,47 GiB, 8019509248 bytes, 15663104 sectors
Disk model: USB Flash Drive
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: F2458B32-52FB-4256-923B-E048AA724776
Device Start End Sectors Size Type
/dev/sda1 64 3262907 3262844 1,6G Microsoft basic data
/dev/sda2 3262908 3286751 23844 11,6M EFI System
/dev/sda3 3286752 3287351 600 300K Microsoft basic data
[root@newbox ~]#
[root@foo ~]# dd if=/dev/zero of=/dev/sdc
dd: writing to '/dev/sdc': No space left on device
8193+0 records in
8192+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.0070268 s, 597 MB/s
[root@foo ~]# lsblk /dev/sdc
lsblk: /dev/sdc: not a block device
I don’t know what’s going on.
On the other hand, I just noticed that the same behaviour occurs for the USB stick that actually is bootable.
I didn’t check, but I have noticed that the USB stick on /dev/sdc looks much better after a reboot, so there is something going wrong in the filesystem somewhere. Not good.
MediaWriter now also shows the option to “restore” the USB stick, which is new.
Content is the one MediaWriter wrote, and which does not boot:
[root@foo ~]# fdisk -l /dev/sdc
GPT PMBR size mismatch (4703651 != 7806975) will be corrected by write.
Disk /dev/sdc: 3.72 GiB, 3997171712 bytes, 7806976 sectors
Disk model: Trans-It Drive
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: 026728CF-CAC9-4762-8E88-708161D9B0D3
Device Start End Sectors Size Type
/dev/sdc1 64 4679143 4679080 2.2G Microsoft basic data
/dev/sdc2 4679144 4702987 23844 11.6M EFI System
/dev/sdc3 4702988 4703587 600 300K Microsoft basic data
And after “restore”:
Disk /dev/sdc: 3.72 GiB, 3997171712 bytes, 7806976 sectors
Disk model: Trans-It Drive
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: 0xaa5f15b5
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 7806975 7804928 3.7G 7 HPFS/NTFS/exFAT
Running MediaWriter (on Linux) now show progress bar activity… and it verifies.
And it boots the target machine.
And it’s reproducible!
But what went wrong the first time?
And there is MediaWriter on Windows which won’t play ball.
I just downloaded the ISO for fedora 38 workstation.
Made certain that my system was fully up to date and rebooted.
made certain that mediawriter was installed from the fedora repo.
inserted an 8GB USB drive then unmounted the auto-mounted partitions.
used gparted to erase the existing partitions and created a new blank msdos partition on the device.
the launched media writer from the fedora launcher.
It gave me the option to download or use an iso.
I selected the iso I downloaded and the device I just wiped clean.
Progress was shown as you can see.
I recognize that you are on F36 and I am on F37, but that should not make a major difference. As long as everything is up to date the mediawriter should work. It worked the same for me while I was on F36.
Things I note that you have said that is different from what I routinely do is that I do not ever write to a usb device that has a file system mounted. I have had failures even with dd when the device had a mounted file system. You failed to mention anything about whether it was mounted or not.
I note that you formatted the device. This is not necessary and may even be counter-productive since the mediawriter and/or dd will normally overwrite everything you have done.
UPDATE
I completed the write to the usb device and I get this.
$ sudo fdisk -l /dev/sda
GPT PMBR size mismatch (4100491 != 15131635) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sda: 7.22 GiB, 7747397632 bytes, 15131636 sectors
Disk model: DataTraveler 2.0
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: 596BFE18-6CFC-4880-BA94-298703C7C362
Device Start End Sectors Size Type
/dev/sda1 64 4075983 4075920 1.9G Microsoft basic data
/dev/sda2 4075984 4099827 23844 11.6M EFI System
/dev/sda3 4099828 4100427 600 300K Microsoft basic data
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda iso966 Jolie Fedora-WS-Live-38-1-6
2023-04-13-22-15-10-00
├─sda1 iso966 Jolie Fedora-WS-Live-38-1-6
│ 2023-04-13-22-15-10-00 0 100% /run/media/jvian/Fedora-WS-Live-38-1-6
├─sda2 vfat FAT16 ANACONDA EEB5-E40F
└─sda3
On my system I do not enable automounting, so I don’t need to remember to unmount the file systems before writing to the USB unit itself. If I need to look at files on the device I will mount it then.
As said, it now works on Fedora 36, after a reboot. Not sure what exactly went wrong.
Things I note that you have said that is different from what I routinely do is that I do not ever write to a usb device that has a file system mounted.
That would be bad indeed. “Undefined behaviour” will result.
I have had failures even with dd when the device had a mounted file system.
Unless you are dding into a file on the filesystem, this would be a bombing run on the basic assumption that the filesystem drivers make
You failed to mention anything about whether it was mounted or not.
No, it would make no sense to mount it.
I note that you formatted the device. This is not necessary and may even be counter-productive since the mediawriter and/or dd will normally overwrite everything you have done.
Indeed of no use (though not counterproductive, any byte array is a byte array that can be overwritten after all, regardless of prior contents) if one uses MediaWriter or dd, but needed if one uses livecd-iso-to-disk
That is usually a good thing, but auto-mounting of usb devices seems the default with fedora workstation. Thus my note that it was not mentioned. I do not know the differences in that respect when using kde.
Exactly that, and all is unnecessary when writing an iso to the device to create the live bootable device from the iso image.
I receive the same error when running the latest FMW on Windows 11. This has happened with both old and brand new thumb drives ranging from 16GB to 64GB. The writer says it is writing, zero progress bar, during this, the drive disappears from the windows file explorer and the FMW then errors with the same as above:
MediaWriter says:
“Destination drive is not writeable (A device which does not exits was specified)”
“Couldn’t open the drive for writing (Access is denied)”
“Couldn’t lock the drive (The handle is invalid)”
I then need to use a tool like Rufus to reformat the drive.