LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2020, 03:10 AM   #1
ahiunglim
LQ Newbie
 
Registered: Jun 2018
Posts: 21

Rep: Reputation: Disabled
Post DD command to create Bootable Windows Installer USB


Lets say that we don't have windows OS installed on any our laptop, and one day we are forced to have one. So far the easiest method to do is using the DD command since RUFUS is WINDOWS EXCLUSIVE SOFTWARE(which sound stupid to me, to make windows usb u need to use another windows, lol) compared to Linux OS which can be made in any OS using many software or simple DD command.

So, normally DD command goes like this:
Code:
sudo dd bs=4M if=SOMETHING.iso of=/dev/sd(number)
What I remembered when I was making Win7 bootable iso, something has to be added to the DD command to make it bootable

something like: mdos, dos, mbr, or something sounds like that
Code:
sudo dd mdos bs=4M if=SOMETHING.iso of=/dev/sd(number)
so, does anyone know how it's done? because without that special code, the USB can't make it thru the installation part, only stuck to the BIOS screen...

And If the mystery solved, I will make a blog about it, because none of this method can be found on the internet, just the regular one.
 
Old 02-09-2020, 03:22 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,809
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by ahiunglim View Post
without that special code, the USB can't make it thru the installation part, only stuck to the BIOS screen...
Did you actually try, or is this from your memory of Windows 7? I see nothing on https://www.microsoft.com/en-us/soft...d/windows10ISO or https://blogs.windows.com/windowsexp...-in-windows-7/ that suggests anything special be done to burn to USB. I've only ever burned a Win 10 iso to DVD.
 
Old 02-09-2020, 07:12 AM   #3
ahiunglim
LQ Newbie
 
Registered: Jun 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
Did you actually try, or is this from your memory of Windows 7? I see nothing on https://www.microsoft.com/en-us/soft...d/windows10ISO or https://blogs.windows.com/windowsexp...-in-windows-7/ that suggests anything special be done to burn to USB. I've only ever burned a Win 10 iso to DVD.
I actually once long ago did burn win 7 using dd, and I remember about the MDOS part(this was the most critical step to be done), it might be done NOT in DD, it might be done in gparted(linux) or diskutil(mac), I am really not sure about it. without those part, the burned USB cannot really be run from the BIOS.

if you tried Etcher on Mac or Linux, you will get warning about "bootable drive", that's what I meant. It might suggesting something like UNetbootin or whatever that is, they might not really gets updated or following the era. The new Mac Catalina has a lot of restriction of apps including wine, while linux is not so stable that most of the times has to do some workaround about things. that's why I stick on DD.
 
Old 02-09-2020, 07:31 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Not sure if that is a typo in your post but, in any case it is not a number but a letter that you would use (of=/dev/sdb or sdc or whatever it is).
Have you actually tried your method and what were the results. Haven't used dd for windows so have no idea?

How big is the windows iso file and what filesystem is the usb formatted as? Another important bit of information, which windows? Are we guessing 10? Is this going to an EFI install? If it is 10, you should be able to either extract or loop mount the windows iso and copy the contents to the usb and then select it from the BIOS firmware to boot.

More detailed explanation at the site below. Note the explanation on the size of the iso with regard to filesystem type. If you read and follow all the instructions it should boot either EFI/Legacy. Some of the instructions are Ubuntu specific but should be able to be modified.

http://onetransistor.blogspot.ch/201...om-ubuntu.html
 
Old 02-09-2020, 08:02 AM   #5
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,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
I avoid that solution. When I have that issue I use E2B (Easy 2 boot) and create and E2B usb drive and copy the windows ISO I need to boot into the windows folder on that USB key. Then when I boot the key it gives me a menu and I just select Windows and the iso form the menu list. FAR easier than DD and I do not need to remember the command line options that are not well documented. (I use the standard dd options ALL the time, but I do not recall one specific to Windows ISO writing.)


If there is room, I can also copy Linux ISOs into the Linux folder on that key, and have a longer menu of things I can boot. (AND I can carry several versions of Windows and several versions of Linux around in my pocket! Priceless!)


I have created E2B keys on both windows and Linux workstations, but I have been told that the E2B site is full of adds now. I use a browser tool to suppress the adds so I had never noticed. I love the tool, but do not want to recommend the site without warning you about the adds.
 
Old 02-09-2020, 09:02 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Call me a very sincere proponent of the dd command..

If you have either (a) a Windows install media, or (b) a working Windows installation.

Using the dd command correctly, will copy that entire original content bit by bit correctly, and the result will boot.

By "correctly" I mean that you cannot be booted from said origin media when you are copying it.
 
Old 02-09-2020, 09:28 AM   #8
ahiunglim
LQ Newbie
 
Registered: Jun 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Not sure if that is a typo in your post but, in any case it is not a number but a letter that you would use (of=/dev/sdb or sdc or whatever it is).
Have you actually tried your method and what were the results. Haven't used dd for windows so have no idea?

How big is the windows iso file and what filesystem is the usb formatted as? Another important bit of information, which windows? Are we guessing 10? Is this going to an EFI install? If it is 10, you should be able to either extract or loop mount the windows iso and copy the contents to the usb and then select it from the BIOS firmware to boot.

More detailed explanation at the site below. Note the explanation on the size of the iso with regard to filesystem type. If you read and follow all the instructions it should boot either EFI/Legacy. Some of the instructions are Ubuntu specific but should be able to be modified.

http://onetransistor.blogspot.ch/201...om-ubuntu.html
I'm sorry, u are right, if it's "sd" then it's a letter in linux. I mixed it up with Mac OS which is /dev/disk1.

I was doing Win7 long ago. Now, I'm about to try 8.1. From what u'r saying that win10 works like that, seems like making Ubuntu Bootable USB drive, and I'm 100% sure it doesn't work with win7, 50% sure with the 8.1 cause haven't tried it. about to tho.
 
Old 02-09-2020, 09:30 AM   #9
ahiunglim
LQ Newbie
 
Registered: Jun 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
I avoid that solution. When I have that issue I use E2B (Easy 2 boot) and create and E2B usb drive and copy the windows ISO I need to boot into the windows folder on that USB key. Then when I boot the key it gives me a menu and I just select Windows and the iso form the menu list. FAR easier than DD and I do not need to remember the command line options that are not well documented. (I use the standard dd options ALL the time, but I do not recall one specific to Windows ISO writing.)


If there is room, I can also copy Linux ISOs into the Linux folder on that key, and have a longer menu of things I can boot. (AND I can carry several versions of Windows and several versions of Linux around in my pocket! Priceless!)


I have created E2B keys on both windows and Linux workstations, but I have been told that the E2B site is full of adds now. I use a browser tool to suppress the adds so I had never noticed. I love the tool, but do not want to recommend the site without warning you about the adds.
is E2B available on LNX or OSX? what win version u have tried?
 
Old 02-09-2020, 09:33 AM   #10
ahiunglim
LQ Newbie
 
Registered: Jun 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
yeah, but not sticking to dd. I prefer dd since it's come with the system, no extra apt.
 
Old 02-09-2020, 01:53 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Quote:
From what u'r saying that win10 works like that, seems like making Ubuntu Bootable USB drive, and I'm 100% sure it doesn't work with win7,
The page I linked to above specifically states that 64bit windows 7 as well as 8 and 10 should work. Only used the method once for 10 so...?

Last edited by yancek; 02-10-2020 at 11:57 AM.
 
Old 02-09-2020, 11:00 PM   #12
ahiunglim
LQ Newbie
 
Registered: Jun 2018
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
The page I linked to above specifically states that 64bit windows as well as 8 and 10 should work. Only used the method once for 10 so...?
dude, your link does work for making Windows USB Installer, I just tried it with Windows 8.1. However, This solution does not involved with DD at all, which does not solved what my post initially started for, but it is acceptable for the alternative. It takes more steps involving the mounting process, the i386 codes, and making the grub.cfg file, alas it works.

When booted in BIOS and it shows "USB Drive" instead of "Diskette Drive", that is a good sign, and that means the Windows USB Installer should be functioning normally it should.

From what I remembered, the DD process takes only a few steps might be involving gparted a bit, but it does not involving mounting, and grub thinggy. THATs what I remembered, I can be wrong, but I experienced with win7 installation success before with that kind of method.
 
Old 02-10-2020, 06:36 AM   #13
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,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by ahiunglim View Post
is E2B available on LNX or OSX? what win version u have tried?
E2B does not install in your OS, it installs on your USB device from either one. (The instructions differ because you are running form a different OS to load the USB. I do not recall OSX instructions, but then I did not look.)

If you are interested, I can provide links to the download and instruction pages.
I recommend E2B for USB booting to run or install ISO images
https://www.easy2boot.com/download/
https://www.easy2boot.com/make-an-ea...e-using-linux/
I own no stock in E2B, it just answers a regularly recurring question.
I boot both Linux and Windows ISOs, and for both traditional and UEFI installation.

Last edited by wpeckham; 02-10-2020 at 07:02 AM.
 
1 members found this post helpful.
Old 02-10-2020, 12:18 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
I would think that you would be able to simply loop mount the windows iso file to a directory then use either cp or dd to copy the contents of the windows directory to a previously created partition on the usb. Since it is windows, you would need a windows filesystem and it may need to be exfat or ntfs depending upon the size. Mark the partition as active/bootable using GParted or another method. Brief description of the method at the link below, scroll down to the post by Lithium79. Not exactly what you were looking for. I don't have any windows iso to test so can't verify anything.

https://arstechnica.com/civis/viewtopic.php?p=30645773
 
Old 02-10-2020, 01:10 PM   #15
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
FYI, the Windows 10 install media is free for download from Microsoft. Has to be activated against a license or to hardware that came with it originally so no harm in giving the media away free. This download has both 10 home and pro. I have no idea why I know this, I don't use windows...

https://www.microsoft.com/en-us/soft...d/windows10ISO
 
  


Reply

Tags
dd, linux, mac, usb, windows



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
[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
LXer: Easy way to Create a bootable USB drive from an ISO image using dd command LXer Syndicated Linux News 0 11-06-2016 09:45 AM
Is there a usb-pendrive (ISO-hybrid) for ANTIX with classical Installer (debian/installer)? patrick295767 Linux - Distributions 1 01-21-2016 05:48 PM
Creating bootable CDROM from a bootable USB drive seaquesttr Linux - Desktop 2 08-01-2010 11:57 AM
Making a USB stick bootable from a bootable cdrom cwwilson721 Slackware 2 10-23-2009 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:21 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