LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2016, 02:21 PM   #31
brockm789
LQ Newbie
 
Registered: Feb 2016
Posts: 17

Rep: Reputation: 3

From my personal experience in using dd in linux, the dd commands always creates a successful bootable flash/usb drive as long as the iso is hybrid.

For example, to determined if an iso is hybrid, run the file command on it.

Code:
file ubuntu-14.04.3-server-amd64.iso 

ubuntu-14.04.3-server-amd64.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 620572, 4544 sectors
Look for the DOS/MBR for a hybrid iso.

However, in the next example, the iso below is not a hybrid. It is a ISO-9660. the dd command will write to the usb stick BUT it will not be bootable. You will need to use an alternative method like unetbootin or other usb creator program.

Code:
file AsteriskNOW-612-current-32.iso 

AsteriskNOW-612-current-32.iso: # ISO 9660 CD-ROM filesystem data 'AsteriskNOW-6.12.65-26-i386' (bootable)
Is short, dd creates a bootable flash/usb drive if the iso is hybrid. If it's a ISO-9660 type, use unetbootin or other usb creation program.

Last edited by brockm789; 02-04-2016 at 02:23 PM.
 
Old 02-04-2016, 03:35 PM   #32
brockm789
LQ Newbie
 
Registered: Feb 2016
Posts: 17

Rep: Reputation: 3
@ Fixit

I've noticed from the first post, you tried to write the image to /dev/sdb1.

NO NO NO...You write it to /dev/sdb.

dd does work if the iso is hybrid. I know because I've done it numerous times and it boots the OS. However, if the iso is a ISO-96660 type, dd will write the iso image to your usb stick, but it will not be bootable. I know, because I did this as well too. I use unetbootin for the ISO-9660 types of iso's.

Anyway, Good luck!
 
Old 02-04-2016, 03:37 PM   #33
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,350

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
run fdisk -l to see what the usb is named it may have change on a reboot and not be /dev/sdb but something else like maybe /dev/sdc or /dev/sdd, that is a small letter L not a one. also make sure the usb is unmounted when using DD
 
Old 02-04-2016, 04:36 PM   #34
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by brockm789 View Post
From my personal experience in using dd in linux, the dd commands always creates a successful bootable flash/usb drive as long as the iso is hybrid.

For example, to determined if an iso is hybrid, run the file command on it.

Code:
file ubuntu-14.04.3-server-amd64.iso 

ubuntu-14.04.3-server-amd64.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 620572, 4544 sectors
Look for the DOS/MBR for a hybrid iso.

However, in the next example, the iso below is not a hybrid. It is a ISO-9660. the dd command will write to the usb stick BUT it will not be bootable. You will need to use an alternative method like unetbootin or other usb creator program.

Code:
file AsteriskNOW-612-current-32.iso 

AsteriskNOW-612-current-32.iso: # ISO 9660 CD-ROM filesystem data 'AsteriskNOW-6.12.65-26-i386' (bootable)
Is short, dd creates a bootable flash/usb drive if the iso is hybrid. If it's a ISO-9660 type, use unetbootin or other usb creation program.
Thanks.

Quote:
root# file *.iso
slacko-6.3.0.iso: ISO 9660 CD-ROM filesystem data 'CDROM ' (bootable)
tahr-6.0.5_PAE.iso: ISO 9660 CD-ROM filesystem data 'CDROM ' (bootable)
 
Old 02-04-2016, 04:57 PM   #35
brockm789
LQ Newbie
 
Registered: Feb 2016
Posts: 17

Rep: Reputation: 3
Quote:
Originally Posted by Fixit7 View Post
Thanks.

root# file *.iso
slacko-6.3.0.iso: ISO 9660 CD-ROM filesystem data 'CDROM ' (bootable)
tahr-6.0.5_PAE.iso: ISO 9660 CD-ROM filesystem data 'CDROM ' (bootable)
They're not hybrids. The dd method will not work on these. I mean, it will write the image to the usb stick but it will not be bootable. Remember, a hybrid iso will have DOS/MBR.

So you were correct to use an alternative method of writing those iso images.

But, if you ever do download a hybrid iso by chance, use the dd command and you will see it does work.


Last edited by brockm789; 02-04-2016 at 05:04 PM.
 
Old 02-04-2016, 05:10 PM   #36
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks.

The file command is handy as a pocket.
 
Old 02-04-2016, 05:18 PM   #37
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
But tahr-6.0.5_PAE.iso is a hybrid image. Yes, the file command identifies it as ISO 9660, but if you include the "-k" (--keep-going) option you will see more:
Code:
$ file -k tahr-6.0.5_PAE.iso 
tahr-6.0.5_PAE.iso: ISO 9660 CD-ROM filesystem data 'CDROM' (bootable)\012- x86 boot sector; partition 1: ID=0x83, active, starthead 0, startsector 0, 419840 sectors, code offset 0x31
When I copy that file to a USB flash drive with "dd if=tahr-6.0.5_PAE.iso of=/dev/sde bs=32k", I do get a bootable device.
 
Old 02-04-2016, 05:40 PM   #38
brockm789
LQ Newbie
 
Registered: Feb 2016
Posts: 17

Rep: Reputation: 3
Quote:
Originally Posted by rknichols View Post
But tahr-6.0.5_PAE.iso is a hybrid image. Yes, the file command identifies it as ISO 9660, but if you include the "-k" (--keep-going) option you will see more:
Code:
$ file -k tahr-6.0.5_PAE.iso 
tahr-6.0.5_PAE.iso: ISO 9660 CD-ROM filesystem data 'CDROM' (bootable)\012- x86 boot sector; partition 1: ID=0x83, active, starthead 0, startsector 0, 419840 sectors, code offset 0x31
When I copy that file to a USB flash drive with "dd if=tahr-6.0.5_PAE.iso of=/dev/sde bs=32k", I do get a bootable device.
I ran

Code:
file -k AsteriskNOW-612-current-32.iso 

AsteriskNOW-612-current-32.iso: # ISO 9660 CD-ROM filesystem data 'AsteriskNOW-6.12.65-26-i386' (bootable)
My AsteriskNOW iso is an ISO-9660 just as your tahr-6.0.5_PAE.iso. I think your ISO-9660 image worked with dd might be because it has a boot sector and a partition 1 listed in the file command output. AsteriskNOW doesn't have this in it's output using the -k option.

The dd command didn't work with the AsteriskNOW iso image which is an ISO-9660.

But dd did worked beautifully on the hybrid iso of the ubuntu server iso image.

I guess it depends on how the maintainers creates the iso images.

Last edited by brockm789; 02-04-2016 at 05:47 PM.
 
Old 02-04-2016, 09:31 PM   #39
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by brockm789 View Post
But dd did worked beautifully on the hybrid iso of the ubuntu server iso image.
Yes, and you will find that running file on that hybrid iso will just say it's ISO 9660 data, while "file -k" will show it as that plus an x86 boot sector with a partition table. That's how hybrid images appear in the file command. It discovers the ISO 9660 header first. That tahr-6.0.5_PAE.iso file is a hybrid image, or at least the one I downloaded from the Puppy Linux site is. Perhaps the OP somehow got something different.
Code:
$ ls -l tahr-6.0.5_PAE.iso 
-rw-rw-r--. 1 qemu qemu 214958080 Feb  3 08:10 tahr-6.0.5_PAE.iso
$ md5sum tahr-6.0.5_PAE.iso
902e1b3bb6999a6269271a0e54305efe  tahr-6.0.5_PAE.iso
$ file ubuntu-14.10-desktop-amd64.iso 
ubuntu-14.10-desktop-amd64.iso: ISO 9660 CD-ROM filesystem data 'Ubuntu 14.10 amd64' (bootable)
$ file -k ubuntu-14.10-desktop-amd64.iso 
ubuntu-14.10-desktop-amd64.iso: ISO 9660 CD-ROM filesystem data 'Ubuntu 14.10 amd64' (bootable)\012- x86 boot sector; partition 2: ID=0xef, starthead 254, startsector 2250448, 4544 sectors, code offset 0x52
 
Old 02-05-2016, 03:10 PM   #40
brockm789
LQ Newbie
 
Registered: Feb 2016
Posts: 17

Rep: Reputation: 3
Quote:
Originally Posted by rknichols View Post
Yes, and you will find that running file on that hybrid iso will just say it's ISO 9660 data, while "file -k" will show it as that plus an x86 boot sector with a partition table. That's how hybrid images appear in the file command. It discovers the ISO 9660 header first. That tahr-6.0.5_PAE.iso file is a hybrid image, or at least the one I downloaded from the Puppy Linux site is. Perhaps the OP somehow got something different.
Code:
$ ls -l tahr-6.0.5_PAE.iso 
-rw-rw-r--. 1 qemu qemu 214958080 Feb  3 08:10 tahr-6.0.5_PAE.iso
$ md5sum tahr-6.0.5_PAE.iso
902e1b3bb6999a6269271a0e54305efe  tahr-6.0.5_PAE.iso
$ file ubuntu-14.10-desktop-amd64.iso 
ubuntu-14.10-desktop-amd64.iso: ISO 9660 CD-ROM filesystem data 'Ubuntu 14.10 amd64' (bootable)
$ file -k ubuntu-14.10-desktop-amd64.iso 
ubuntu-14.10-desktop-amd64.iso: ISO 9660 CD-ROM filesystem data 'Ubuntu 14.10 amd64' (bootable)\012- x86 boot sector; partition 2: ID=0xef, starthead 254, startsector 2250448, 4544 sectors, code offset 0x52
Code:
file -k ubuntu-14.04.3-server-amd64.iso 

ubuntu-14.04.3-server-amd64.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 620572, 4544 sectors DOS/MBR boot sector\012- # ISO 9660 CD-ROM filesystem data 'Ubuntu-Server 14.04.3 LTS amd64' (bootable) Apple Driver Map, blocksize 2048, blockcount 37008, devtype 0, devid 0, descriptors 0, contains[@0x800]: # ISO 9660 CD-ROM filesystem data\012- Apple Partition Map, map block count 2, start block 1, block count 2, name Apple, type Apple_partition_map, contains[@0x1000]: # ISO 9660 CD-ROM filesystem data\012- Apple Partition Map, map block count 2, start block 155143, block count 1136, name EFI, type Apple_HFS, contains[@0x1800]: # ISO 9660 CD-ROM filesystem data
You're right, Using the -k option will have more verbose output. Not only is DOS/MBR present for the ubuntu server iso, but ISO 9660 is present as well.

Thanks for the -k option tip.

Last edited by brockm789; 02-05-2016 at 03:13 PM.
 
Old 02-05-2016, 04:56 PM   #41
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Thanks as well.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Burn iso to usb pen drive Fixit7 Puppy 20 10-30-2015 12:52 PM
Boot iso on pen drive by grub installed on pen drive jena Linux - Hardware 2 11-01-2008 09:09 AM
Burning .Iso image on pen drive? linuxlover.chaitanya Linux - Software 14 09-01-2008 03:56 AM
boot from any .iso file on a USB pen drive browny_amiga Linux - General 10 04-07-2008 04:44 PM
Trouble Burning ISO image to USB pen drive madh@ter Linux - Hardware 1 08-30-2004 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:29 PM.

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