Hi,

rhkra...@gmail.com wrote:
> I'll characterize those as, generally, partition the USB stick, then add the
> installer image (and, iiuc, you have to use a different install image than
> the DVD-1 .iso.) and a different procedure.

The installer ISOs are supposed to be put on the base device of the
USB stick (e.g. /dev/sdc, not /dev/sdc1).
There they establish an MBR partition table which has two partitions:

  $ /sbin/fdisk -lu debian-8.4.0-amd64-netinst.iso
  ...
  Device                          Boot Start    End Sectors  Size Id Type
  debian-8.4.0-amd64-netinst.iso1 *        0 505855  505856  247M  0 Empty
  debian-8.4.0-amd64-netinst.iso2       3900   4731     832  416K ef EFI (FAT
 
This is not a very neat one, as Pascal Hambourg wrote meanwhile.
(My program makes it, but it is not to blame because it only follows
the ishoybrid+GRUB layout developed by Matthew Garrett for Fedora.)
Also there is a GPT head block, which is normally not considered valid
because not properly announced by MBR. Nevertheless some partition editors
actively hate it.

The type "Empty" is part of the trick, because EFI ignores it but Linux
is willing to mount it (yielding the overall ISO).

I tried on Debian 8:

  # get rw-permission to /dev/sdc

  $ dd if=debian-8.4.0-amd64-netinst.iso of=/dev/sdc bs=1M

  $ /sbin/fdisk -l /dev/sdc
  ...
  /dev/sdc1  *        0 505855  505856  247M  0 Empty
  /dev/sdc2        3900   4731     832  416K ef EFI (FAT-12/16/32)

  $ /sbin/fdisk  /dev/sdc
  ...
  Command (m for help): n
  Select (default p): p
  Partition number (3,4, default 3): 3
  First sector (505856-3915775, default 505856): 
  Last sector, +sectors or +size{K,M,G,T,P} (505856-3915775, default 3915775): 

  Created a new partition 3 of type 'Linux' and of size 1.6 GiB.
  Command (m for help): w
  The partition table has been altered.
  Calling ioctl() to re-read partition table.
  Re-reading the partition table failed.: Permission denied

(I wonder by what method fdisk tries to read the table and fails)

In any case it has worked:

  $ /sbin/fdisk -l /dev/sdc
  ...
  Device     Boot  Start     End Sectors  Size Id Type
  /dev/sdc1  *         0  505855  505856  247M  0 Empty
  /dev/sdc2         3900    4731     832  416K ef EFI (FAT-12/16/32)
  /dev/sdc3       505856 3915775 3409920  1.6G 83 Linux

Let's hope the USB stick still boots via BIOS and EFI ...

Next one would mkfs.fat a filesystem onto /dev/sdc2 and copy files to it.


Have a nice day :)

Thomas

Reply via email to