LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2021, 05:02 PM   #1
meatbar
LQ Newbie
 
Registered: Jul 2020
Distribution: MX Linux, Debian 10
Posts: 17

Rep: Reputation: Disabled
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.
 
Old 10-24-2021, 05:45 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
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.
 
Old 10-24-2021, 08:08 PM   #3
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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)
 
1 members found this post helpful.
Old 10-24-2021, 11:24 PM   #4
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
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
 
Old 10-25-2021, 02:41 AM   #5
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by meatbar View Post
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.
 
Old 10-25-2021, 08:39 AM   #6
meatbar
LQ Newbie
 
Registered: Jul 2020
Distribution: MX Linux, Debian 10
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
"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.
 
Old 10-25-2021, 10:26 AM   #7
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,144
Blog Entries: 21

Rep: Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482Reputation: 3482
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.

Last edited by rokytnji; 10-25-2021 at 10:33 AM.
 
Old 10-25-2021, 10:35 AM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
1 members found this post helpful.
Old 10-25-2021, 10:43 AM   #9
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Quote:
Originally Posted by meatbar View Post
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?

Last edited by enigma9o7; 10-25-2021 at 10:44 AM.
 
Old 10-25-2021, 11:10 AM   #10
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.

Last edited by computersavvy; 10-25-2021 at 11:13 AM.
 
Old 10-25-2021, 10:20 PM   #11
larstrier
Member
 
Registered: Dec 2019
Distribution: Debian
Posts: 97

Rep: Reputation: 24
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.
 
Old 10-26-2021, 04:34 PM   #12
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,465

Rep: Reputation: 299Reputation: 299Reputation: 299
Quote:
Originally Posted by meatbar View Post
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.

Last edited by jens; 10-26-2021 at 04:43 PM.
 
Old 10-26-2021, 04:46 PM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
What is the name of the iso your using?
 
Old 10-28-2021, 03:30 PM   #14
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by jens View Post
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.
 
Old 10-28-2021, 04:54 PM   #15
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I transfer boot sector to a non-bootable image file and make it bootable? lucmove Linux - Software 16 09-23-2020 09:33 PM
[SOLVED] Can I make a USB hard drive bootable with same procedure to make USB stick bootable? Tem2 Linux - Hardware 1 02-16-2019 08:25 AM
[SOLVED] How do you make a bootable ISO from a bootable USB stick? bt101 Linux - Newbie 20 09-27-2018 09:09 AM
Diagnostics on bootable CD to bootable thumb drive IsItFridayYet Linux - Newbie 15 10-12-2007 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration