[rear-users] Convert ISO to USB

Schlomo Schapiro schlomo at schapiro.org
Tue Feb 9 18:29:58 CET 2016


Caveat Emptor. There is a hybrid mode for BIOS boot and another one for EFI
boot and probably several ways how to combine them.

I did some experiments in this area some time ago. Bottom line is that I
gave up using syslinux/isolinux and switched over to use grub 2:
http://blog.schlomo.schapiro.org/2013/11/magic-iso-image-booting-with-gnu-grub-2.html

In more recent experiments I found out that grub-mkrescue already does
everything right. Put some grub configs and grub modules into a directory
and run grub-mkrescue -o iso-file.iso <dir> to get an ISO that can boot
both from CD/DVD and from USB drive. If you use BIOS boot. With EFI I did
not manage to get it to boot from USB. Booting EFI from CD/DVD was really
simple. I only had to add EFI/BOOT/BOOTX64.EFI to the dir.

Maybe you can find out how Ubuntu ISOs are made?

In general, I think that we should slowly start to think about moving to
grub2 in ReaR. I think that it will make the entire boot code much much
simpler.

On 9 February 2016 at 18:08, Brent Bolin <brent.bolin at gmail.com> wrote:

> I did try that -
>
> >> fdisk -l rear-host110.iso
>
> Disk rear-host110.iso: 77 MB, 77594624 bytes
> 64 heads, 32 sectors/track, 74 cylinders, total 151552 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: 0x5be95d00
>
>            Device Boot      Start         End      Blocks   Id  System
> rear-host110.iso1   *           0      151551       75776   17  Hidden
> HPFS/NTFS
>
> Funky.  Don't remember if I used unetbootin syntax to create, think I
> did. Seemed to reboot a couple of times and then take a real long time to
> reload.
>
> Typeical hybrid iso looks like this -
>
> >> fdisk -l ubuntu-12.04.5-server-amd64.iso
>
> WARNING: GPT (GUID Partition Table) detected on
> 'ubuntu-12.04.5-server-amd64.iso'! The util fdisk doesn't support GPT. Use
> GNU Parted.
>
>
> Disk ubuntu-12.04.5-server-amd64.iso: 722 MB, 722468864 bytes
> 255 heads, 63 sectors/track, 87 cylinders, total 1411072 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: 0x3ff07489
>
>                           Device Boot      Start         End      Blocks
> Id  System
> ubuntu-12.04.5-server-amd64.iso1   *           0     1411071      705536
>  0  Empty
> ubuntu-12.04.5-server-amd64.iso2           90376       94727        2176
> ef  EFI (FAT-12/16/32)
>
> Don't want to make a big deal about this.  Just want to know what others
> are using
>
> On Tue, Feb 9, 2016 at 10:02 AM, Schlomo Schapiro <schlomo at schapiro.org>
> wrote:
>
>> Hello Brent,
>>
>> good point. Maybe calling isohybrid on the resulting ISO is actually
>> enough (see http://www.syslinux.org/wiki/index.php/Isohybrid).
>>
>> Can you test that please? If that works then we can simply add that as an
>> additional step.
>>
>> Kind Regards,
>> Schlomo
>>
>> On 9 February 2016 at 16:09, Brent Bolin <brent.bolin at gmail.com> wrote:
>>
>>> What are people using to convert iso images?
>>>
>>> I want to create backups and ISO on a nfs mount.  I've been testing Rear
>>> using virtualbox so I copy the iso back to my desktop and set virtualbox vm
>>> to use it.
>>>
>>> The documentation on the website indicates this -
>>>
>>> sfdisk /dev/sdd <<EOF
>>> ;
>>> EOF
>>>
>>> mkfs.vfat -F32 -n REAR-USB  /dev/sdd1
>>> Pull and replug the USB stick. Verify it is mounted.
>>>
>>> unetbootin method=diskimage isofile=/path/to/[ISO].iso installtype=USB
>>> targetdrive=/dev/sdd1 autoinstall=yes
>>>
>>> However when I look ( fdisk -l /dev/sdb) at the usb flash it shows it as
>>> a Linux partition.  And then running mkfs.vfat -F32 on that same
>>> partition.  Doesn't seem correct.  Sometimes it boots.  Sometimes it drops
>>> me to grub.  Kinda flaky.
>>>
>>> Since the iso created by Rear isn't a hybrid(fdisk -l myimage.iso) iso I
>>> can't simply use 'dd' to the non partitioned device (/dev/sdb).
>>>
>>> Would like to know what others are using.  Want a reliable way to create
>>> usb flash drives since this would generally be used in an emergency
>>> recovery.
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> rear-users mailing list
>>> rear-users at lists.relax-and-recover.org
>>> http://pikachu.3ti.be/mailman/listinfo/rear-users
>>>
>>>
>>
>> _______________________________________________
>> rear-users mailing list
>> rear-users at lists.relax-and-recover.org
>> http://pikachu.3ti.be/mailman/listinfo/rear-users
>>
>>
>
> _______________________________________________
> rear-users mailing list
> rear-users at lists.relax-and-recover.org
> http://pikachu.3ti.be/mailman/listinfo/rear-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pikachu.3ti.be/pipermail/rear-users/attachments/20160209/b8cb502a/attachment.html>


More information about the rear-users mailing list