Convert any ISO into a hybrid & use dd to place any

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Convert any ISO into a hybrid & use dd to place any

#1 Post by ETP »

Convert any ISO into a hybrid & use dd to place any hybrid ISO or .img file on a card or USB stick.

How to convert any ISO into a hybrid ISO.
*****************************************
1. Use pfind to confirm that your pup has isohybrid installed. (/usr/bin/isohybrid)

2. If not, use PPM to install syslinux, any version => 3.72 will do, then check again.

In a terminal issue the command:

Code: Select all

isohybrid path/to/name-of-the.iso
Notes:

Hardly rocket science!
There is no excuse for not issuing all ISOs as hybrids. (O/K I plead guilty :oops: )
There is no output from the command unless it fails for some reason.
The modified date & time on the file will not change but the pre MD5 sum and post MD5 sum will be different.
EDIT1: Execution is instant
EDIT2: Ensure that the ISO is not mounted.

Use dd to write a hybrid ISO or .img file to a USB stick or SD card.
********************************************************************

Code: Select all

dd if=path/to/name-of-the.iso of=/dev/sde && sync
Things to keep in mind:

dd will completely overwrite your card or USB stick: Any data on it will be lost so if you use this method you'll want to use it with a dedicated card or stick.

dd needs to write to the disk path, not the partition path: in the above example /dev/sde is the disk path device, /dev/sde1 is the partition path (e.g., sde1 is the first partition on sde).
You need to write to the disk path because isohybrid prepends a partition structure to the ISO.

Example One:

Used in Rapid Pup V2 for new 16MB boot image K4.1.7

Code: Select all

dd if=/root/Downloads/boot_utility_7.2_k4.1.7.img of=/dev/sdx && sync
Example Two:

Same as ONE but with dd progress bar once attached 64bit pet has been installed.

Code: Select all

(pv -n /root/Downloads/boot_utility_7.2_k4.1.7.img | dd of=/dev/sdx) 2>&1 | dialog --gauge "Writing Image to target, please wait... Show total bytes written when finished." 12 70 0
(There is no need to specify a bs=xxxx value with small images such as these or a typical 300MB Puppy ISO. A safe default value of 512 will be used.)
Attachments
pv-1.5.1-x86_64-1.pet
64-bit pv pet for Rapid
(36.04 KiB) Downloaded 442 times
image-3.jpg
dd with progress indicator
(25.15 KiB) Downloaded 1575 times
Last edited by ETP on Tue 26 Dec 2017, 07:00, edited 4 times in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#2 Post by greengeek »

Hi ETP - does use of isohybrid overwrite the original iso or do you end up with two isos?
cheers

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

#3 Post by ETP »

greengeek wrote:Hi ETP - does use of isohybrid overwrite the original iso or do you end up with two isos?
cheers
Hi greengeek,
It just makes a small change to the original ISO. You do not finish up with two ISOs.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#4 Post by slavvo67 »

In these particular instructions, there is no mention of the USB format type. I know you usually need the fat32 for booting and typically an f2fs 2nd partition. Do the instructions above require that in order to boot?

gcmartin

#5 Post by gcmartin »

Hello @ETP. Nice.

Questions
  • Does isohybrid check the current ISO to see if it currently a hybrid ISO? If not, is there a test to determine if the ISO is a hybrid?
Thanks for this contribution.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

#6 Post by ETP »

@slavvo67,
In these particular instructions, there is no mention of the USB format type. I know you usually need the fat32 for booting and typically an f2fs 2nd partition. Do the instructions above require that in order to boot?
If using dd the format on the stick or card does not matter. Everything on it will be wiped and replaced by
whatever is in the .img or ISO that you are writing to it. If the original .img file or ISO is bootable the copy will be bootable.

The format of the target USB or SD is important only if you are using Win32diskimager (My favourite tool) with Windows to write an .img file or hybrid ISO to a card or stick.
The target has to be fat32 for Windows to recognise it & to then present it as a drive letter such as H:

@gcmartin,
Does isohybrid check the current ISO to see if it currently a hybrid ISO? If not, is there a test to determine if the ISO is a hybrid?
AFAIK there is no check. Generally the release notes will tell you whether the ISO is a hybrid or not.
If you simply don't know just issue the command. If it was not a hybrid it will become one. If it was a hybrid already it
will do no harm. Any Puppy ISO ever issued can be turned into a hybrid.
One thing I forgot to mention is that when you do issue the command the action is instant which may give the false impression
that nothing as happened.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Convert any ISO into a hybdrid & use dd to place any

#7 Post by L18L »

ETP wrote:There is no output from the command unless it fails for some reason.
Did you try:

Code: Select all

isohybrid --verbose path/to/name-of-the.iso
?

Very interesting things, isohybrid and these others iso (tab tab) s!

Thank you.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#8 Post by amigo »

I think you could check an ISO by running fdisk on it. If it has a partition table, then it is a hybrid. If not, fdisk will say that no valid partition table was found.

gcmartin

#9 Post by gcmartin »

Thanks @Amigo. I was not aware that one could run fdisk to a file like an ISO. Does fdisk require the ISO to be mounted on a loop?

Update: Loop mount not required (should have known, duh..."everything in Linux is a file")

Code: Select all

root# which isohybrid
/usr/bin/isohybrid
root# echo "So, this TahrPUP has 'isohybrid' installed"
So, this TahrPUP has 'isohybrid' installed
root#
root# fdisk -l android-x86-4.4-r2.iso

Disk android-x86-4.4-r2.iso: 406 MB, 406847488 bytes
64 heads, 32 sectors/track, 388 cylinders, total 794624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x26d40bfd

                                  Device Boot      Start         End      Blocks   Id  System
android-x86-4.4-r2.iso1   *           0      794623      397312   17  Hidden HPFS/NTFS
root# 
Thanks!

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

#10 Post by ETP »

@L18L & amigo,

Thanks to you both for your tips.
An easy way of checking an ISO is to right click it then select properties.
The shot below shows a normal bootable ISO on the left & a hybrid on the right with its partition.
Attachments
image-1.png
(143.96 KiB) Downloaded 1402 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#11 Post by slavvo67 »

Please put in your instructions that the destination USB must be unmounted. Sometimes, it's the little things....

Does anyone know if you can use Gparted after the install to create a second partition (perhaps an f2fs) for larger usb drives? Also, how do the save files work with this type of install?

Note: Worked with my Fluxpup.iso file but I think it's running a bit slower than the CD or even slower than the bootflash install included in the Puppy itself. It might just be me. I'll need to test this more.

Either way, it's a nice way to avoid CD's / DVD's.

Edit: Works very well with Tahrpup. Used save file to local partition (sda1) but the save file wasn't read when rebooting. :-(

Thanks!

gcmartin

#12 Post by gcmartin »

Using TahrPUP 602, install PET. Use MultiPUP to create an ISO.

Code: Select all

root# isohybrid --verbose  /mnt/sda6/MultiPup-v6r22/New-ISO/April7s.iso
/usr/bin/isohybrid: cannot open --verbose: No such file or directory
root# isohybrid /mnt/sda6/MultiPup-v6r22/New-ISO/April7s.iso
/usr/bin/isohybrid: /mnt/sda6/MultiPup-v6r22/New-ISO/April7s.iso: bootloader is missing isolinux.bin hybrid signature
Note: isolinux-debug.bin does not support hybrid booting
then, had a look at the ISO properties:
Attachments
ISO properties.png
Non Hybrid ISO
(46.59 KiB) Downloaded 1338 times

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#13 Post by goingnuts »

# isohybrid xwoaf_pup170910.iso
/usr/bin/isohybrid: xwoaf_pup170910.iso: bootloader does not have a isolinux.bin hybrid signature.Note that isolinux-debug.bin does not support hybrid booting.
Probably isolinux.bin on iso comes from syslinux version less than 3.86 - check with:

Code: Select all

# strings isolinux.bin | grep ISOLINUX

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

isohybrid

#14 Post by L18L »

ETP wrote:An easy way of checking an ISO is to right click it then select properties.
Thanks.

An other easy way I just have found is using command line:

Code: Select all

file *.iso
This is working at least in Fatdog where also "--verbose" works.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Queries

#15 Post by ETP »

Hi slavvo67,
Please put in your instructions that the destination USB must be unmounted. Sometimes, it's the little things....
Good point - done.
Does anyone know if you can use Gparted after the install to create a second partition (perhaps an f2fs) for larger usb drives?
Yes - if you are dealing with a .img file. (See OP in UCF2FS Pup)
No - if you are placing a bootable hybrid ISO on a stick or card.
Also, how do the save files work with this type of install?
If you place a bootable hybrid ISO on a stick or card you are to all intents & purposes then dealing with a CD.
Note: Worked with my Fluxpup.iso file but I think it's running a bit slower than the CD or even slower than the bootflash install included in the Puppy itself. It might just be me. I'll need to test this more.
Best to use a USB2 or USB3 stick. If you have a USB3 port available put the USB2 stick in that. It will be slightly quicker.
Either way, it's a nice way to avoid CD's / DVD's.
Agreed. Many devices lack optical drives these days but we continue to issue standard ISOs. :roll: The optical drives that are installed are generally
of poor quality & fail quite quickly with heavy use.

Edit: Works very well with Tahrpup. Used save file to local partition (sda1) but the save file wasn't read when rebooting. Sad


Give it a bit of help with some boot codes.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Re: isohybrid

#16 Post by ETP »

L18L wrote:
ETP wrote:An easy way of checking an ISO is to right click it then select properties.
Thanks.

An other easy way I just have found is using command line:

Code: Select all

file *.iso
This is working at least in Fatdog where also "--verbose" works.
Hi L18L,
Nice find. For clarity here is a shot of the expected outputs:
Attachments
image-2.png
(161.25 KiB) Downloaded 652 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

gcmartin

#17 Post by gcmartin »

As @GoingNuts and I have shown, is there some method that would be needed so that the hybrid can be produced? And, if the problem is always the same for certain PUP's ISOs and a solution is consistent, can a preprocessor method be scripted with the command to convert the ISO into the PET? Maybe this kind of simple preprocessor could detect hybrid and abandon too.

just thoughts...

Jasper

#18 Post by Jasper »

Hi ETP,

It seems to me:

For those with a working optical drive, it is easier to use that.

Using a single dedicated stick or card, multiple distros are not possible.

Please comment and correct as necessary.

My regards

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#19 Post by slavvo67 »

I am ecstatic with these simple scripts. It's just that save file issue that's hindering me. I guess a workaround would be to remaster an ISO with changes prior to using dd for transfer to USB.

gcmartin

#20 Post by gcmartin »

Hi @Slavvo67 and @ETP. I think one idea gotten from your posts, combined, is that the hybrid ISO could be used to produce a USB that has the ISO's boot needs in one area, as well as, leaving a writable area for session-save needs. I would imagine that a writable area formatted to a Linux filesystem would allow the running distro to create a save folder/file to the area. One obvious requirement for this multi-partition outcome to occur is that the ISO would need to produce an .IMG file that can be restructure into a new multipartition .IMG file to be written to the USB stick. But, I can see where this may be outside of the scope of this hybrid to USB process.

And, in my current attempts, I tried to use @Smokey01/@CatDude MultiPUP ISO output as input to this process. But, the error I encountered (shown in an earlier post) trying to create the hybrid ISO from a MultiPUP ISO does not allow an OOTB solution.

These are just some ideas.

A comment
Number of writes to a modern USB stick suggest that data integrity remains now, after years and years of use. Some of the early early problems of integrity as use increases, have been resolved. Recent USB Sticks can be written to for years of operation and data integrity remains; just as is found with HDDs.

Hope this info is helpful
Edited: The 1st paragraph.
Last edited by gcmartin on Fri 16 Oct 2015, 20:12, edited 1 time in total.

Post Reply