LinuxQuestions.org
Visit Jeremy's Blog.
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 07-22-2021, 06:05 PM   #31
leclerc78
Member
 
Registered: Dec 2020
Posts: 169

Rep: Reputation: Disabled

Yumi.
Perfect tool for Windows people to wet their feet in Linux.
The problem with dd is it wipes everything out, and requires Linux.
 
Old 07-22-2021, 06:31 PM   #32
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by leclerc78 View Post
Yumi.
Perfect tool for Windows people to wet their feet in Linux.
The problem with dd is it wipes everything out, and requires Linux.
I remember back in the days, it was always an issue to burn an iso in Windows to get rid of Windows and install GNU/Linux. Haha, so annoying.

Anyways, there were solutions, but none of them really good or simple. In the end you had to download some exe file with all kinds of malware and such from untrusted sources just to be able to burn an iso to a cd or dvd. But yes, there were ofcourse also higher quality and less risky choices like Nero (ehem, the name, huh). I don't even want to imagine how to put an iso on a USB disk in Windows.

I think we can count it a very good thing that we have things such as dd, but also things such as k3b and everything in between. Everyting is just easier in GNU/Linux, including getting and deploying a(nother) new GNU/Linux distro on a PC. Even getting and deploying Windows is easier in GNU/Linux! Yes, I was quite surprised MS distributed Windows (7) as downloadable ISO files, but they do.
 
Old 07-22-2021, 06:59 PM   #33
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 hifi100 View Post
What is that you like about dd ? I find it just too slow. I must mention one thing. Once I used dd to burn an ISO to USB & got "I/O error" while installing then I burned the same ISO using Etcher & installation completed successfully. Why that happened ? I have no idea.
I always use dd.
The thing many people don't realize about dd is that the default block size with dd is 512 so for a common iso file on a filesystem that uses a 4096 sector size it takes 8 block reads for a single sector. The extra tiny reads slows things down drastically.

I use something like "dd if=inputfile.iso of=/dev/sdf bs=16M" and never have a complaint about speed. The most limiting thing about speed with that command is the write speed on the usb device.

I sometimes use ventoy as that allows having more than one iso available on a single usb but for home use dd seems more user friendly as having the iso on the usb to directly control the boot eliminates the "boot ventoy -> select iso -> boot iso" part of the process.

Other tools such as etcher may fit your needs / wants / perceptions better.

Another good tool for burning an iso to usb is Fedora Media Writer. It works similar to etcher, and will verify the copy as it goes. The verification would likely have prevented the I/O error you mentioned. It also is able to restore the usb to its original partitioning when used to remove the iso from the usb.

Last edited by computersavvy; 07-22-2021 at 07:05 PM.
 
Old 07-23-2021, 04:52 AM   #34
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I recently tried Fedora Media Writer on Win10 to write F34 to a USB. Worked liked a charm. Supposed to be more aware of the needs of hybrid isos - and not just Fedora apparently.
 
Old 07-25-2021, 03:52 PM   #35
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
dd for one-iso flash drives; ventoy to install multiple iso images on a single flash drive
 
Old 07-25-2021, 04:50 PM   #36
m.a.l.'s pa
Member
 
Registered: Oct 2007
Location: albuquerque
Distribution: Debian, Arch, Kubuntu
Posts: 366

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by hazel View Post
I didn't know you could use cp to write to a raw device.
I don't know what's better to use between cp and dd, but using the cp command seems more simple to me. Plus it's mentioned at the Debian pages I linked to above. I've been using:
Code:
# cp distro.iso /dev/sdX && sync
[If the cp command is successful, by default, no output is diplayed. To view output, use the -v (--verbose) option.]

For example, I called this one up just now from my bash history:
Code:
sudo cp -v debian-live-testing-amd64-gnome-nonfree.iso /dev/sdb && sync
 
Old 07-25-2021, 07:44 PM   #37
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
The cp command will copy the file to the usb device, on an existing file system. Using the cp command does not burn the iso to the device and make it bootable.

If you are using a ventoy usb device then the cp command is appropriate. If you want the device to be bootable directly to the iso image you are writing to it then one of the other tools mentioned earlier (dd, etcher, fedora media writer, k3b, and others) is needed to "burn" the image to the usb device.
 
Old 07-26-2021, 07:48 AM   #38
m.a.l.'s pa
Member
 
Registered: Oct 2007
Location: albuquerque
Distribution: Debian, Arch, Kubuntu
Posts: 366

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by computersavvy View Post
The cp command will copy the file to the usb device, on an existing file system. Using the cp command does not burn the iso to the device and make it bootable.
I've been using cp to write isos to flash drives, then booting into live sessions or using the flash drives for installations. Worked for Linux Mint 20.1 (Xfce), too. I don't understand why you say it won't make it bootable (??).
 
Old 07-26-2021, 01:14 PM   #39
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 m.a.l.'s pa View Post
I've been using cp to write isos to flash drives, then booting into live sessions or using the flash drives for installations. Worked for Linux Mint 20.1 (Xfce), too. I don't understand why you say it won't make it bootable (??).
Can you give a functional command line that does what you say? I would like to try that.
 
Old 07-26-2021, 04:00 PM   #40
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Code:
cp myfile.iso /dev/sdb1/
Will copy myfile.iso onto the filesystem of /dev/sdb1, just like it would any other file. When you mount that drive you will see a file on it named myfile.iso. I suppose that you can mount that .iso loopback and use it for something.

Code:
dd if=myfile.iso of=/dev/sdb bs=1M
Will do a bit by bit copy of the .iso to the device sdb. If you don't specify, it will start writing on the first bit of the device. When it is done the device will be the same size as the iso. In fact, you will need to partition it, and put a file system on the partition to use it for anything else, and to make it full size again.

You can make an .iso with
Code:
cat /dev/sr0 > image.iso
You can make an .iso from multiple directories
Code:
genisoimage -o out.iso -J -r -pad -graft-points fred/=/path/files wilma/=/path/files barney/=/path/files
Or out of all of the files in a directory
Code:
genisoimage -o output.iso -r -J /path/to/files/*
Or of course, use dd
Code:
dd if=/dev/sr0 of=myfile.iso bs=2048
 
1 members found this post helpful.
Old 07-26-2021, 04:44 PM   #41
m.a.l.'s pa
Member
 
Registered: Oct 2007
Location: albuquerque
Distribution: Debian, Arch, Kubuntu
Posts: 366

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by computersavvy View Post
Can you give a functional command line that does what you say? I would like to try that.
I gave examples in my 2nd post in this thread, and provided links to Debian's documentation in my first post.

Today, I found my flash drive that contained LM 20.1, plugged it in, made sure it was unmounted (I ran lsblk), then simply ran the following from the directory containing the LM 20.2 iso:

Code:
$ sudo cp -v linuxmint-20.2-cinnamon-64bit.iso /dev/sdb && sync
When that finished, I rebooted the computer with that flash drive, into Linux Mint 20.2. So that's a "functional" command for ya. Obviously don't type the "$" at the beginning, and maybe you don't use sudo.

I guess I should add that if it's a brand new flash drive I use GParted on it first, creating a new msdos partition table and a new FAT32 partition that takes up the entire drive.

I don't know if cp works with every distro, but so far I've used it instead of dd with Debian, Linux Mint, MX Linux, and Kubuntu.
 
1 members found this post helpful.
Old 07-26-2021, 05:51 PM   #42
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Well, thank you for that info. Using cp certainly works for writing an iso to a raw usb device. I suspect that is a special case though since writing to other raw devices such as an SSD or HDD would be different due to the partitioning. With a usb that is intended to be a copy of the iso it works.

The one thing that I see though is that there is no way to specify the block size as there is with dd so speed may or may not be the same.

I guess you can teach some old dogs new tricks, and I will tuck that one back for later use.
 
Old 07-27-2021, 05:55 AM   #43
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,579
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by teckk View Post
Code:
cp myfile.iso /dev/sdb1/
Will copy myfile.iso onto the filesystem of /dev/sdb1, just like it would any other file. When you mount that drive you will see a file on it named myfile.iso. I suppose that you can mount that .iso loopback and use it for something.
I still don't get this. /dev/sdb1 is a raw partition, not a filesystem. How would the cp command even know what filesystem was on it? Surely the way to copy the file as a file would be something like
Code:
mount -t type /dev/sdb1 /media/usb
cp myfile.iso /media/usb
 
Old 07-27-2021, 08:25 AM   #44
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Quote:
mount -t type /dev/sdb1 /media/usb
cp myfile.iso /media/usb
Yes of course @Hazel, you are right. I wasn't thinking there.
 
Old 07-27-2021, 12:13 PM   #45
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
I think "cp myfile.iso /dev/sdb1" would write to the raw partition and replace any file system formatting, similar to what I saw with "cp myfile.iso /dev/sdb" where it overwrote the partition table, etc.

I have not tried it that way, but since I have already seen that I can use "cp myfile.iso /dev/sdb" to 'burn' an iso image to the raw device, then I really have nothing that says writing to the partition would not work similarly. Logic says that doing so would replace the filesystem formatting with the iso image, but without testing I cannot be certain.
 
  


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
LXer: Duplicate ISOs to multiple USB drives with MultiWriter LXer Syndicated Linux News 0 01-15-2015 05:21 PM
where can i get a free program to burn isos in winxp so i can burn a distro? Me61289 Linux - Newbie 5 08-17-2004 02:36 AM
Burn Multiple CD isos to one DVD? Ianed Debian 2 01-27-2004 05:43 PM
Newb Questions... after i burn the ISOs..?? kryz888 Linux - General 5 01-27-2004 02:28 PM
burn mandrake 9.2 isos? mcshen Mandriva 17 01-03-2004 12:33 PM

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

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