[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Putting It All On a Stick



Hi,

Steve Matzura:
> Thomas, just dd the file? That really works?

Yes. It's called "isohybrid".
  http://www.syslinux.org/wiki/index.php/Isohybrid

As said: Copy it onto the base device, the whole "disk".
It must overwrite MBR, partition table, GPT, whatever partitioning
and boot sector is present on the disk.

Common mistakes are to copy it as data file into a file system,
or as filesystem image into a partition of the "disk".


> I've heard of this being the way to do things, but find it hard to
> understand how it could work. I suppose the boot loaders know what to
> do with ISO images.

It is an interesting adventure to boot on as many systems as possible:
{ BIOS, EFI, Mac firmware, ... } x { Hard disk/USB stick, CD/DVD/BD }

MBR x86 boot code at the start of the ISO image brings you to
the file

  /isolinux/isolinux.bin

in the ISO image, where CD booting would start too.

The MBR bears a partition table. Partition 1 has the
"bootable/active" flag for stubborn BIOSes which would not
boot without it. Partition 2 is the EFI System Partition:

  $ /sbin/fdisk -l debian-8.2.0-amd64-BD-1.iso
  ...
  Device                       Boot Start      End  Sectors  Size Id Type
  debian-8.2.0-amd64-BD-1.iso1 *        0 43859651 43859652 20.9G  0 Empty
  debian-8.2.0-amd64-BD-1.iso2      75632    76463      832  416K ef EFI (FAT-12/16/32)

Because SYSLINUX does not boot from CD via EFI firmware,
the EFI equipment is of GRUB2.
If you mount the ISO

  # mkdir /mnt/iso
  # mount -o loop debian-8.2.0-amd64-BD-1.iso /mnt/iso

then you can mount the EFI System Partition as FAT filesystem

  # mkdir /mnt/fat
  # mount -o loop /mnt/iso/boot/grub/efi.img /mnt/fat

and see

  # ls -l /mnt/fat/efi/boot/bootx64.efi
  -rwxr-xr-x 1 root root 392192 Sep  6 11:14 /mnt/fat/efi/boot/bootx64.efi

This file brings you from EFI to the GRUB2 configuration in
  /mnt/iso/boot/grub

For certain old x86 Macs there may be even a HFS+ filesystem
with blessings and all. debian-cd does not do this. But Fedora
LiveCD has HFS+.
The result from grub-mkrescue has HFS+ too. It uses GRUB2 for
both, BIOS and EFI.

Debian just has an Apple Partition Map entry which points to
the EFI System Partition. (I would really like to know whether
this is of any paractical use.)


Have a nice day :)

Thomas


Reply to: