LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to make a Windows installation bootable drive with debian? (https://www.linuxquestions.org/questions/linux-software-2/how-to-make-a-windows-installation-bootable-drive-with-debian-4175702555/)

meatbar 10-24-2021 05:02 PM

How to make a Windows installation bootable drive with debian?
 
So I've tried Ventoy and Woeusb, and even dd, nothing works, I've spent days troubleshooting, looking up solutions to error messages and I'm still at square 1.

I mean, geez... it would all be so simple if there were such thing as rufus for linux, I even tried rufus on a virtual machine, passing through the USB drive, but even that resulted in an error.

Anyway, does anybody know of a method that works? I'm trying to make a bootable Windows 10 installer, the ISO is genuine and downloaded directly from microsoft.

I fear I'm going to end up damaging my poor flash drive from formatting it so much and copying a 5+GB file and deleting it over and over.

wpeckham 10-24-2021 05:45 PM

I used E2B (Easy 2 Boot) for this.
Make sure that you read the special notes about using Windows install images with E2B and Ventoy, they are a bit different than anything sane in the world.

computersavvy 10-24-2021 08:08 PM

Maybe I have misunderstood what you are doing.

It seems now that you have a windows iso (bootable) and you need it on a usb so you can boot and install windows.

If that is correct and you have the iso on the debian machine, then dd will be your best tool

Steps are really simple.
1. plug in the usb you are copying to
2. Identify what your machine sees that usb device as. The easiest way to do that is look at the last part of 'dmesg' right after plugging in the device. It should show the connection and what it is seen as (/dev/sdX) as well as any partitions on it (/dev/sdXn).
It also is likely to mount any partitions so you need to use the mount command to see what it mounted and then unmount them
Code:

sudo umount /dev/sdXn
for each partition that it mounted if any.
3. now you are ready to copy the iso to the usb device.
Code:

sudo dd if=/path/to/iso of=/dev/sdX bs=16M status=progress
will copy the iso to the usb device, show the progress as it copies, and when the copy is done the usb should be bootable just as it would be if you wrote the iso image to a DVD.

This is exactly the same process used when writing any bootable install iso image to a usb before booting, and applies regardless of the OS used in the iso image.

This procedure should work on any linux system to write a bootable iso to and create a bootable usb.

Note for clarity, that the image is copied to the raw device (sdX) and not to a partition (sdXn)

BudiKusasi 10-24-2021 11:24 PM

must have done incorrectly

Ventoy does work

I did once smoothly

consult to its issue in clear detail which points you think won't work

mrmazda 10-25-2021 02:41 AM

Quote:

Originally Posted by meatbar (Post 6295330)
I fear I'm going to end up damaging my poor flash drive from formatting it so much and copying a 5+GB file and deleting it over and over.

"Formatting" a device prior to "installing" a bootable .iso file to it is a 100% waste of time and device writes. .iso files incorporate formatting. "Installing" an .iso amounts to nothing more than copying the sequence of sectors making up the .iso file to a raw unmounted device.

meatbar 10-25-2021 08:39 AM

Quote:

Originally Posted by mrmazda (Post 6295423)
"Formatting" a device prior to "installing" a bootable .iso file to it is a 100% waste of time and device writes. .iso files incorporate formatting. "Installing" an .iso amounts to nothing more than copying the sequence of sectors making up the .iso file to a raw unmounted device.

I'm not doing that, but every time I try something different, it gets formatted by the program once more just the same, and a 5.8 GB file keeps getting copied into it once more.

This is what I get right now when I try to boot with ventoy, and select the windows 10 ISO:

Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:

Some steps to repair windows as if I had a windows installation at the moment, which I don't.

file: \EFI\Microsoft\Boot\BCD

Status: 0xc000014v

Info: the boot configuration data for your pc is missing"

From searching the web, I only found one result that was for booting into installation media, it said that it couldn't find the EFI partition, but in my case I have everything on the bios set to boot as EFI and not legacy bios.

rokytnji 10-25-2021 10:26 AM

https://www.youtube.com/watch?v=9aQKkQo7l6c


Above video shows how to create or delete a efi partition. You can take what video mentions and use a live iso with gparted to make the efi partition.


Of course. The efi partition gets made on target hard drive that windows is going on.

computersavvy 10-25-2021 10:35 AM

With windows you must specify the boot method when downloading the iso.
If you download the iso for legacy boot then it will not boot in uefi mode, and vice-versa.

Is it possible that you did not select uefi boot on the windows download site before downloading the iso?
Is it possible that you are booting debian into legacy mode and the bios is not set to allow uefi boot?

Please post the output of "sudo fdisk -l" so we can get some idea of what the system currently has.

enigma9o7 10-25-2021 10:43 AM

Quote:

Originally Posted by meatbar (Post 6295330)
it would all be so simple if there were such thing as rufus for linux

Although dd is very simple once you understand the command line, there are GUI tools to write bootable usb's with linux... I think linux Mint includes one called USB Creator? I've also heard of something called balena etcher maybe what you want?

computersavvy 10-25-2021 11:10 AM

Fedora also has one called 'fedora media writer' for windows and just 'media writer' for linux. Both do similar to dd.

An added feature of the fedora version is that you can also remove the installed iso and restore the usb to a full formatted empty usb when the install media is no longer required.

larstrier 10-25-2021 10:20 PM

KVM is a virtual machine already installed onto the linux kernel.

On Debian, I simply installed KVM from the Debian repo.
I was able to download a legit MS Windows 10 .iso from the legit MS website.
The .iso was for virtual machine use.

After opening up KVM, I was able to use the downloaded Win10 .iso on the KVM virtual machine.
Installing Win10 is a long-winded process (it's Microsoft).
During install, when Windows asks for a registration code you need to press the button saying it's just a 're-install'.

This is all done on a HDD.

jens 10-26-2021 04:34 PM

Quote:

Originally Posted by meatbar (Post 6295330)
So I've tried Ventoy and Woeusb, and even dd, nothing works, I've spent days troubleshooting, looking up solutions to error messages and I'm still at square 1.

I mean, geez... it would all be so simple if there were such thing as rufus for linux, I even tried rufus on a virtual machine, passing through the USB drive, but even that resulted in an error.

Anyway, does anybody know of a method that works? I'm trying to make a bootable Windows 10 installer, the ISO is genuine and downloaded directly from microsoft.

I fear I'm going to end up damaging my poor flash drive from formatting it so much and copying a 5+GB file and deleting it over and over.

Ignore all previous comments from self claimed "savvy" people. Format in NTFS (they have a fetish with FAT) and just extract your ISO in the root.
I's really supper easy. Just post the content from your drive if your having issues.

PS: Do keep in mind that a download is only 24h valid.

colorpurple21859 10-26-2021 04:46 PM

What is the name of the iso your using?

computersavvy 10-28-2021 03:30 PM

Quote:

Originally Posted by jens (Post 6295978)
Ignore all previous comments from self claimed "savvy" people. Format in NTFS (they have a fetish with FAT) and just extract your ISO in the root.
I's really supper easy. Just post the content from your drive if your having issues.

PS: Do keep in mind that a download is only 24h valid.

This is not true for the win10 iso I downloaded. It can be used many times for a reinstall or just kept as a repair tool.

I downloaded it, then used the normal method of using dd to write it to my flash drive, then booted it and did the install.
For installing a windows VM using qemu/kvm I simply selected the iso on my hard drive to install from.
In any case, I have used the same iso to do a reinstall 4 different times over the past year.

enigma9o7 10-28-2021 04:54 PM

Imagine if Microsoft were actually to somehow make it so you couldn't install their OS unless you'd downloaded your ISO within the past 24 hours.

Additionally, if you can just copy the contents of an ISO to a NTFS formatted USB drive, that is so much easier than using dd or the microsoft tool; why did Microsoft even bother making a tool if all it takes is copy? I've certainly never tried what jen suggests so possible it works, but seems very very unlikely, about as likely as an iso no longer working after 24 hours ;)


All times are GMT -5. The time now is 09:03 PM.