1 (edited by gedakc 2013-04-02 02:30:35)

Topic: SOLVED - Hybrid ISO

Since GParted is build with a recent version of syslinux, it is possible to convert the ISOs of GParted to hybrid-ISOs using isohybrid. With the hybrid-ISO it is possible to directly burn the (converted) ISO to an USB-drive without extra tools that fiddle around with their own bootloaders (like UNetBootin). You only need very basic tools like dd (for Linux/Mac) or ImageWriter (Windows) with the hybrid ISO.

My question is whether it is possible to distribute the GParted ISOs as hybrid ones, so that people don't have to convert them and it works on Windows without problems (using ImageWriter).

An added bonus, which is the main reason I'm asking here, is that I can add GParted to DriveDroids list of distributions. DriveDroid is an application for Android that lets you host ISO/IMG files by making your phone emulate an USB-drive. It has an distributionlist from which ISO/IMG files can be downloaded directly onto the phone. It's ideal if your PC is broken and do not have any other PC around to burn a USB drive, but it's also just easy.

You can find the app here: https://play.google.com/store/apps/deta … drivedroid
The distros that are in the downloadlist can be found here: github.com/FrozenCow/distscraper/tree/master/scrapers (only one link is allowed)

2

Re: SOLVED - Hybrid ISO

Do you have instructions on how to convert a standard .iso image to a hybrid .iso image?

3

Re: SOLVED - Hybrid ISO

gedakc wrote:

Do you have instructions on how to convert a standard .iso image to a hybrid .iso image?

The syslinux package should contain the tool 'isohybrid'. If it does not, I'm using syslinux 4.06-1 on ArchLinux. I'm guessing you have a compatible version, since the gparted ISO can be converted to a hybrid iso. (Only ISOs that are made with a recent version of syslinux can be converted to hybrid ISOs)

If you have isohybrid it is as simple as:

$ isohybrid ~/downloads/gparted-live-0.15.0-1-i486.iso

It'll convert the iso in-place. After doing that you can verify it (at least I use this method) by using fdisk, which should report that the iso has one partition:

$ fdisk -l ~/downloads/gparted-live-0.15.0-1-i486.iso
...
/downloads/gparted-live-0.15.0-1-i486.iso1   *           0      272383      136192   17  Hidden HPFS/NTFS

Before running isohybrid this partition isn't there. The trick is (as far as I understand) that MBR and ISO-header overlap and isohybrid has a special format that is compatible with both.

4

Re: SOLVED - Hybrid ISO

Thank you frozencow for the instructions.  :-)

5

Re: SOLVED - Hybrid ISO

gedakc wrote:

Thank you frozencow for the instructions.  :-)

Np. Any chance this can be done on future releases of the gparted ISOs?

6

Re: SOLVED - Hybrid ISO

There is a always a chance, but it really comes down to time for making the change, testing the change, and maintaining it longer term.  We do our best to entertain enhancement requests, but like every one else we only have a limited amount of time to spend on the project.

7

Re: SOLVED - Hybrid ISO

gedakc wrote:

There is a always a chance, but it really comes down to time for making the change, testing the change, and maintaining it longer term.  We do our best to entertain enhancement requests, but like every one else we only have a limited amount of time to spend on the project.

Indeed, I understand. I'm just going around the Linux distros that do not have hybrid ISOs yet. The developer of Tails was also wary of using hybrid ISOs, but it's hard to test whether it will work on *all* systems. I know most of the bigger distributions do have hybrid ISOs though (Ubuntu, Debian, OpenSuse, Fedora, ArchLinux and some of the derived distros)

If you want testing and if you have a mirror somewhere where you can host the hybrid ISO (I don't have that kind of bandwidth on my cheap webserver), I can put the (potentially unstable) ISO in DriveDroids downloadlist. There are loads of people who would like to quickly download and use gparted from their phone, so that creates enough testers. I could put up a notice in DriveDroid (would need a change in the app) for people to see  before they download to ask whether they could test on a particular system.

If you want to do this, please say so, I can start working on a message in DriveDroids downloadlist that will be shown.

8

Re: SOLVED - Hybrid ISO

isohybrid is not changing existing properties of a iso file, is just adding a new one, the possibility to write the hybrid iso file directly to a USB stick.
See also:
http://www.syslinux.org/wiki/index.php/ … _DISK_MODE
So, the hybrid iso file can be still written to a CD disk, Unetbootin or the installer from pendrivelinux.com or another can still make a bootable USB stick from it, but additionally, using dd, or a nice python script  mic-image-writer from:

meego.gitorious.org/meego-developer-tools/image-creator/blobs/raw/0.24.5/tools/mic-image-writer

is possible to make a bootable usb stick.

The easiest way to use the script is as follow:
Type in terminal following commands:

wget -qO- tinyurl.com/img-writer-gui|sed /os.geteuid/,+1d > mic-image-writer
chmod +x mic-image-writer
./mic-image-writer

if necessary use sudo

The new iso file has a different checksum.

From  such USB stick the OS will be started as from a CD, i.e. it is not possible to save nothing on it, no error logs, no additional files.
If a iso file is 400 MB and the USB stick 500 MB it is not to bad, but if the USB stick is 16 MB or 32 MB, then 15 MB or 31 MB are lost.
For this, it make no really sense to use this way to make a bootable USB stick.

Something another is, what frozencow is suggesting, the DriveDroids.
If on this way it could be possible to help somebody, why not.


If such USB stick will be insert and then Gparted will be started, the following message will be given out:

Libparted Bug Found!
Invalid partition table – recursive partition on /dev/sdx

After clicking on Ignore the space on the stick will be displayed as unallocated.
But this not true, there are files on it.

On Debian live, the Disk Utility from Red Hat shows this stick correctly, on graphic the used part will be displayed on the right side, there will be written the name of the installed iso.

On Fedora, as well  as on Linux Mint in Accessories/Disks the stick will also be recognize correctly.

Maybe correct detection of such sticks can be add to Gparted?


Hallo  frozencow, the Parted Magic, collection of useful tools around a HDD,  is since 3 years the hybrid iso, if you like, have a look on it.

Best Regards
cvbn

9

Re: SOLVED - Hybrid ISO

The GParted project is very fortunate to have Steven Shiau as our maintainer of the Live images.  Steven is currently busy with other work.  I have sent him an email regarding this request.  In the meantime we will need to wait until he has time to look into this.

10

Re: SOLVED - Hybrid ISO

Back to GParted live 0.4.5-1, we have released it with isohybrid. This was listed in the Changelog:
http://free.nchc.org.tw/gparted-live/st … d-live.txt
...
GParted live 0.4.5-1
...
    * From this version, the released iso file is "isohybrided".

Did you test GParted live's iso? Do you have any issue to use that?

Steven.

11

Re: SOLVED - Hybrid ISO

Thank you Steven for pointing out that the GParted Live ISO image is already a hybrid.

frozencow and cvbn, the GParted Live image works on x86 (32-bit) and x86_64 (64-bit) architectures.  I suspect that your android phones use a different CPU architecture and hence I do not think that GParted Live will work on your android phones.

12

Re: SOLVED - Hybrid ISO

I flashed using the  python mic-image-writer script the same  SanDisk 4 GB USB stick insert always to the same computer with the following iso files:

clonezilla-live-2.1.0-19-amd64.iso
debian-live-6.0.4-i386-gnome-desktop.iso
fedora-17-x86_64-Live-Desktop.iso
linuxmint-14.1-mate-dvd-64bit.iso
pmagic_2013_03_21.iso

After each flashing procedure the computer was rebooted and the flashed OS was booted from the USB stick.

I have done the same with the file gparted-live-0.15.0-1-i486.iso, but after rebooting not the gparted from USB stick, but the OS from HDD was started. I have repeated the flashing procedure but no changes.

As many another iso files were able to be started from USB stick and gparted not, then I thought, gparted iso file is not a hybrid iso file.

After Steven wrote the gparted iso is hybridiso, I made a few tests more.
MD5 – OK
CD burned from the iso file, gparted booted OK
Iso file copied to a USB stick with grub2 and booted directly from the iso file – OK

Used Unetbootin to make a bootable USB stick, after reboot the boot procedure started, but then  stopped with the message:
This Debian Live image failed to boot.
The error message was
can not mount /dev/loop0 (/live/image/live/filesystem.squashfs) on //filesystem.squashfs

Used Universal USB Installer from pendrivelinux.com
The same results as by Unetbootin

I found an old file gparted-live-0.7.1-5.iso and flashed it to the same USB stick using the mic-image-writer  script, but also here after reboot not gparted from the USB stick, but the OS from the HDD was started.

Something is different in gparted iso file then in the another iso files.

Regards
cvbn

13

Re: SOLVED - Hybrid ISO

Thanks for the bug report. This issue has been fixed in GParted live 0.15.0-3, and now it's in the testing release.
Please give it a try and let us know the results.

Steven.

14

Re: SOLVED - Hybrid ISO

Hi Steven,

the isohybrid problem is solved.
I've downloaded the gparted-live-0.15.0-3-i486.iso file.
Burned CD and booted from it, OK
Copied the file to USB stick with Grub2 and booted from the iso file, OK
Using dd copied the file to the USB stick and booted from it, now OK
There is a question I asked it before, but this question do not belong th the Live Media.
I will open a new thread in GParted for it.

I have still problem addressed before, gparted live cannot be started after using Unetbootin for flashing.

I've used Unetbootin (fresh downloaded) for flashing the file to the USB stick.
After reboot the startup procedure stopped with the message:
This Debian Live image failed to boot.
The error message was
can not mount /dev/loop0 (/live/image/live/filesystem.squashfs) on //filesystem.squashfs

I've used then tuxboot-0.4.exe.
After reboot exactly the same message.

Then I've used Unetbootin and flashed the file clonezilla-live-2.1.0-19-amd64.iso
Cannot be started, the same message as before.

Using Unetbootin I flashed pmagic_2013_03_21.iso
After reboot pmagic was started without any problems.

Using Unetbootin I flashed then linuxmint-14.1-mate-dvd-64bit.iso
After reboot linuxmint was started without any problems.

In the end using Unetbootin I flashed again the  gparted-live-0.15.0-3-i486.iso file.
After reboot again the message:
This Debian Live image failed to boot.
The error message was
can not mount /dev/loop0 (/live/image/live/filesystem.squashfs) on //filesystem.squashfs

As I used the same program Unetbootin and two iso files after flashing were able to boot, but gparted and clonzilla not, then something else could be not OK with the file(s).
This rather will not be the problem of the Unetbootin because after flashing with tuxboot give the same problem.

Regards
cvbn

15

Re: SOLVED - Hybrid ISO

As described here:
http://gparted.org/liveusb.php#windows-method-c
Unetbootin is not recommended to use for GParted live. It uses its own syslinux, which might be different from that in GParted live.

Steven.

16

Re: SOLVED - Hybrid ISO

cvbn wrote:

I have still problem addressed before, gparted live cannot be started after using Unetbootin for flashing.

I've used Unetbootin (fresh downloaded) for flashing the file to the USB stick.
After reboot the startup procedure stopped with the message:
This Debian Live image failed to boot.
The error message was
can not mount /dev/loop0 (/live/image/live/filesystem.squashfs) on //filesystem.squashfs

I've used then tuxboot-0.4.exe.
After reboot exactly the same message.

Using tuxboot_0.4_amd64.deb, I have successfully written gparted-live-0.15.0-3-i486.iso to a 2 GB USB flash drive, and then succesfully booted my Acer Aspire One with the USB flash drive.

Steven,

Might this be a Windows only problem with tuxboot?


frozencow,

Would you be able to test the new GParted Live image ISOHYBRID properties?

17

Re: SOLVED - Hybrid ISO

No, this is not the tuxboot problem.

I found in the end, if debian-live, or distro based directly on debian-live (boot-repair-disk, clonezilla, gparted) will be flashed using tuxboot-0.4.exe, or unetbootin, or Universal USB Installer, then the flashed to the 4 GB USB stick OS cannot be booted.
There was always the message: This Debian Live image failed to boot.

Another distros like Fedore, or Linux Mint 14 flashed with the same programs were able to boot without any problems.

After gedakc wrote, he successfully flashed using tuxboot, I took an another, 2 GB USB stick, formatted it on W$ with FAT32 and using tuxboot-0.4.exe flashed the gparted-live-0.15.0-3-i486.iso file. After reboot no problem with start, no error messages.
Later, using dd, I copied the file to the stick, booted, then again  tuxboot-0.4.exe. No problem.

The originally problem was the “do not like debian” 4 GB USB stick.

Regards
cvbn

18

Re: SOLVED - Hybrid ISO

I wonder what the differrence is between the 2 GB and the 4 GB USB sticks?

Following is the partition layout on my 2 GB USB flash drive:

$ sudo fdisk -l -u /dev/sdf

Disk /dev/sdf: 2004 MB, 2004877312 bytes
191 heads, 11 sectors/track, 1863 cylinders, total 3915776 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: 0x00010678

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          63     3915775     1957856+   b  W95 FAT32
$ sudo parted /dev/sdf unit s print
Model:  USB DISK 2.0 (scsi)
Disk /dev/sdf: 3915776s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Flags
 1      63s    3915775s  3915713s  primary  fat32        boot

cvbn, what are the results for your 2 GB and 4 GB USB sticks?

19

Re: SOLVED - Hybrid ISO

I would never believe it this, if the stick will be not mine.

bash-4.2# fdisk -l -u /dev/sdc

Disk /dev/sdc: 2107 MB, 2107113472 bytes
29 heads, 28 sectors/track, 5068 cylinders, total 4115456 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: 0x000cd45c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048     4114431     2056192    b  W95 FAT32
bash-4.2#
bash-4.2# parted /dev/sdc unit s print
Model: takeMS USB Mini (scsi)
Disk /dev/sdc: 4115456s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start  End       Size      Type     File system  Flags
1      2048s  4114431s  4112384s  primary  fat32        boot

bash-4.2#
bash-4.2# fdisk -l -u /dev/sdb

Disk /dev/sdb: 4004 MB, 4004511744 bytes
218 heads, 51 sectors/track, 703 cylinders, total 7821312 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: 0x000da265

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048     7821311     3909632    b  W95 FAT32
bash-4.2#
bash-4.2# parted /dev/sdb unit s print
Model: SanDisk Cruzer Micro (scsi)
Disk /dev/sdb: 7821312s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start  End       Size      Type     File system  Flags
1      2048s  7821311s  7819264s  primary  fat32        boot

20

Re: SOLVED - Hybrid ISO

I found this page in the Sandisk forums, with problem reports on this device.

Is it perhaps a firmware issue?

I see that the first partition doesn't start at sector 63, however it is true for both drives. The 2GB doesn't have any issue with this.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

21

Re: SOLVED - Hybrid ISO

The problem is/was the start sector.

I always format all sticks with MiB alignment, for this the start sector is 2048.

Now I created on this stick a new partition table, then made a new partition, but this time I selected  not MiB, but cylinder  alignment. The start sector is now 63.

bash-4.2# fdisk -l -u /dev/sdb

Disk /dev/sdb: 4004 MB, 4004511744 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7821312 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: 0x000eba52

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     7807589     3903763+   b  W95 FAT32

After this, using tuxboot-0.4.exe I flashed the gparted-live-0.15.0-3-i486.iso file to the stick and rebooted the comp.
The Gparted live was started, no problem any more.

Thanks for help with finding the problem.

Regards
cvbn

22

Re: SOLVED - Hybrid ISO

'Glad to know that the problem is now resolved.  If you are satisfied with the answer you can edit the initial post to prefix SOLVED in front of the title.  This can help others searching for answers to similar problems.

23

Re: SOLVED - Hybrid ISO

I would be glad to add [solved] to the initial thread, but as it was started by frozencow, I could not.

The first problem “isohybrid” is solved, by  the second, minor problem, it came by testing, the reason of it is not known, but how to solve it is known, so I will say the problem is solved too.

Now frozencow have to add [solved] to the initial thread.
As frozencow is since a while not here, I will say, Gedack please feel free to add [solved] to the initial thread.

Regards
cvbn

24

Re: SOLVED - Hybrid ISO

Good point cvbn.  Original post title marked as SOLVED.  :-)

25

Re: SOLVED - Hybrid ISO

Oh man, I didn't get notified through email on this topic and I didn't check back here. I just got another request from a user of DriveDroid to add GParted to its downloadlist and checked back here. Thanks for working this all out and making the ISOs hybrid!

If you are interested, I've added GParted to DriveDroids downloadlist too. I'm using the following code to scrape the SourceForges file-directory for new versions of GParted with the following code: https://github.com/FrozenCow/distscrape … d45e18825e . If future releases are done using the same directory structure and filenames as is used now, it should auto-update the downloadlist in DriveDroid after a day.

Thanks again!