Difference between revisions of "User:Ady/test"

From Syslinux Wiki
Jump to: navigation, search
(isohdpfx)
m (Minor modification.)
Line 92: Line 92:
 
The 'syslinux-4.xx' branch of the official [http://repo.or.cz/syslinux.git Syslinux git repo] can also provide a base for a new build.  
 
The 'syslinux-4.xx' branch of the official [http://repo.or.cz/syslinux.git Syslinux git repo] can also provide a base for a new build.  
 
Package maintainers of (Linux) distributions are invited to test and provide the new 'mbr/isohdpfx.bin'.  
 
Package maintainers of (Linux) distributions are invited to test and provide the new 'mbr/isohdpfx.bin'.  
Feedback is appreciated.  
+
[[Contact|Feedback]] is appreciated.  
 
Until such build is available, users can use the above hexdump in the following ways (among others).
 
Until such build is available, users can use the above hexdump in the following ways (among others).
  
Line 144: Line 144:
 
Please note that the original md5/sha checksums / signature of the USB device will no longer be valid after applying the patch.
 
Please note that the original md5/sha checksums / signature of the USB device will no longer be valid after applying the patch.
  
For comments, feedback or questions, [[Contact]] The Syslinux Project.
+
For comments, feedback or questions, [[contact]] The Syslinux Project.

Revision as of 17:58, 17 April 2017

isohdpfx

As of 2017-Apr-17, the latest official distribution archive of Syslinux available from kernel.org is 6.04-pre1.

Until the next official archive (6.04-pre2) gets out (there is no ETA nor specific plans), this document includes a "corrected" ("fixed") 'mbr/isohdpfx.bin' (posted in this document in plain hex dump format, named here as "isohdpfx.hex") for those users that might want / need it.

Alternatively, building a new Syslinux "package" based on git (master head) should also provide a "correct" 'mbr/isohdpfx.bin'.

The two commits that are relevant for this document / file are (2017-Mar-28):

Commits:

http://repo.or.cz/syslinux.git/commit/32c09027423f61c305e2423e52f5f69ecad8e2c0 
http://repo.or.cz/syslinux.git/commit/8739e2ff9ba3f92652c8df846924fd00e1ce2753 

Patches:

http://repo.or.cz/syslinux.git/patch/32c09027423f61c305e2423e52f5f69ecad8e2c0 
http://repo.or.cz/syslinux.git/patch/8739e2ff9ba3f92652c8df846924fd00e1ce2753 


These two patches apply at least since official versions 4.07 up until 6.04-pre1. The 'syslinux-4.xx' branch in the official Syslinux git repository has been also patched with equivalent commits. These two patches affect only the 'mbr/isohdpfx.c' file in the Syslinux source code.

Once version 6.04-pre2 (or newer) gets out, users can achieve and use the "correct" 'mbr/isohdpfx.bin' file from the official archive.

prerequisites

This "isohdpfx.bin" can be useful for users failing to boot an isohybrid image from USB device, under certain conditions (please note that _all_ of them must be met for this file / method to be relevant).

  • The ISO image was built with ISOLINUX.
  • ISOLINUX versions from 3.82 up to 6.04-pre1 (both included) are potentially relevant.
  • The USB device was written via a 'dd' command, or some equivalent auxiliary tool, in which the input source was an isohybrid image.
  • Optical media, and other methods of transferring the _content_ of the isohybrid image onto a formatted USB device (i.e. instead of directly "burning" the ISO image) are _not_ expected to suffer from the specific boot problems that this method attempts to solve (i.e. are not relevant for this document).
  • The boot problems that this file / method attempts to solve are not likely to show up in newer systems. Just as a (very broad and not-at-all strict) generic approach, if the BIOS is newer than the year 2005, the problems that this file / method is trying to solve are not likely to show up. (As a non-strict reference, 48-bit LBA ATA-6 standard is circa 2003).


Under the above conditions, if the (boot) screen shows either:

isolinux.bin missing or corrupt

or

ISOLINUX x.xx CHDD isolinux: Image checksum error, sorry...

then there is a chance that this file / method could help.

hexdump

The following is a plain hexdump of the "correct" ("fixed") 'isohdpfx.bin' file (432 bytes). Let's name the new file as 'isohdpfx_20170328.bin' and its hexdump as 'isohdpfx_20170328.hex'.

33 ED 90 90 90 90 90 90 90 90 90 90 90 90 90 90 
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 
33 ED FA 8E D5 BC 00 7C FB FC 66 31 DB 66 31 C9 
66 53 66 51 06 57 8E DD 8E C5 52 BE 00 7C BF 00 
06 B9 00 01 F3 A5 EA 4B 06 00 00 52 B4 41 BB AA 
55 31 C9 30 F6 F9 CD 13 72 16 81 FB 55 AA 75 10 
83 E1 01 74 0B 66 C7 06 F3 06 B4 42 EB 15 EB 02 
31 C9 5A 51 B4 08 CD 13 5B 0F B6 C6 40 50 83 E1 
3F 51 F7 E1 53 52 50 BB 00 7C B9 04 00 66 A1 B0 
07 E8 44 00 0F 82 80 00 66 40 80 C7 02 E2 F2 66 
81 3E 40 7C FB C0 78 70 75 09 FA BC EC 7B EA 44 
7C 00 00 E8 83 00 69 73 6F 6C 69 6E 75 78 2E 62 
69 6E 20 6D 69 73 73 69 6E 67 20 6F 72 20 63 6F 
72 72 75 70 74 2E 0D 0A 66 60 66 31 D2 66 03 06 
F8 7B 66 13 16 FC 7B 66 52 66 50 06 53 6A 01 6A 
10 89 E6 66 F7 36 E8 7B C0 E4 06 88 E1 88 C5 92 
F6 36 EE 7B 88 C6 08 E1 41 B8 01 02 8A 16 F2 7B 
CD 13 8D 64 10 66 61 C3 E8 1E 00 4F 70 65 72 61 
74 69 6E 67 20 73 79 73 74 65 6D 20 6C 6F 61 64 
20 65 72 72 6F 72 2E 0D 0A 5E AC B4 0E 8A 3E 62 
04 B3 07 CD 10 3C 0A 75 F1 CD 18 F4 EB FD 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The same hexdump presented as a one-line:

33 ED 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 33 ED FA 8E D5 BC 00 7C FB FC 66 31 DB 66 31 C9 66 53 66 51 06 57 8E DD 8E C5 52 BE 00 7C BF 00 06 B9 00 01 F3 A5 EA 4B 06 00 00 52 B4 41 BB AA 55 31 C9 30 F6 F9 CD 13 72 16 81 FB 55 AA 75 10 83 E1 01 74 0B 66 C7 06 F3 06 B4 42 EB 15 EB 02 31 C9 5A 51 B4 08 CD 13 5B 0F B6 C6 40 50 83 E1 3F 51 F7 E1 53 52 50 BB 00 7C B9 04 00 66 A1 B0 07 E8 44 00 0F 82 80 00 66 40 80 C7 02 E2 F2 66 81 3E 40 7C FB C0 78 70 75 09 FA BC EC 7B EA 44 7C 00 00 E8 83 00 69 73 6F 6C 69 6E 75 78 2E 62 69 6E 20 6D 69 73 73 69 6E 67 20 6F 72 20 63 6F 72 72 75 70 74 2E 0D 0A 66 60 66 31 D2 66 03 06 F8 7B 66 13 16 FC 7B 66 52 66 50 06 53 6A 01 6A 10 89 E6 66 F7 36 E8 7B C0 E4 06 88 E1 88 C5 92 F6 36 EE 7B 88 C6 08 E1 41 B8 01 02 8A 16 F2 7B CD 13 8D 64 10 66 61 C3 E8 1E 00 4F 70 65 72 61 74 69 6E 67 20 73 79 73 74 65 6D 20 6C 6F 61 64 20 65 72 72 6F 72 2E 0D 0A 5E AC B4 0E 8A 3E 62 04 B3 07 CD 10 3C 0A 75 F1 CD 18 F4 EB FD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


obtain fixed file

There are several alternatives for users to obtain the "corrected" file. An updated version / build of Syslinux (6.04-pre2 or newer) would include a new, corrected 'isohdpfx.bin' file. The 'syslinux-4.xx' branch of the official Syslinux git repo can also provide a base for a new build. Package maintainers of (Linux) distributions are invited to test and provide the new 'mbr/isohdpfx.bin'. Feedback is appreciated. Until such build is available, users can use the above hexdump in the following ways (among others).

Alternative A

  1. Open some hex-editor program.
  2. Select the whole plain text hexdump that was posted above in a prior section of this document.
  3. Copy it.
  4. Then paste it in the hex-editor program.
  5. In the hex-editor, save the file as 'isohdpfx_20170328.bin'.

Alternative B

  1. Open some plain-text editor program (not to be confused with some Word / Write editor).
  2. Select the whole plain text hexdump that was posted above in a prior section of this document.
  3. Copy it.
  4. Then paste it in the plain-text editor program.
  5. In the plain-text editor, save the file as 'isohdpfx_20170328.hex'.
  6. Use the 'xxd' tool so as to convert the hexdump file into the binary file :
 xxd -r -p isohdpfx_20170328.hex > isohdpfx_20170328.bin

Note 1: Other tools and methods can be used; the 'xxd' tool is only a simple / suggested alternative.

Note 2: Windows users can obtain "xxd.exe" and execute the same 'xxd' command line.

Fixing the boot problem

If the USB device encountered any of the error messages / behavior described in the "prerequisites" section of this document, then the USB device can be patched and, perhaps, overcome the boot problem.

If:

  • 'sdX' represents the USB device that is having the boot problem; and,
  • it is already written with the original isohybrid image; and,
  • the relevant device(s) is/are unmounted;

then the command:

 dd conv=notrunc bs=1 count=432 if=isohdpfx_170328.bin of=/dev/sdX

would patch the first 432 bytes of the USB device.

The above 'if=isohdpfx_170328.bin' option should be modified according to the actual path and file name that is being used. The same goes to the adequate device in the 'of=/dev/sdX' parameter.

Booting with the patched USB device should be expected to solve the problems mentioned in this document. However, please note that not every case can be solved by this corrected MBR.

Please note that the original md5/sha checksums / signature of the USB device will no longer be valid after applying the patch.

For comments, feedback or questions, contact The Syslinux Project.