[disclaimer: I am the author of Rufus] Hi, On 2014.01.15 10:10, Thomas Schmitt wrote:> As producer of MBRs i wonder where that LBA-flag is located. > In bit 0 to bit 6 of byte 446 (where bit 7 means active/bootable) ?I haven't looked at what GParted does, so I may be off mark, but I have a strong suspicion that this LBA "flag" is a fake flag that simply indicates if a FAT partition type was set as CHS (0x06, 0x0b for FAT16 and FAT32 respectively [1]) or LBA (0x0e, 0x0c for FAT16 LBA and FAT32 LBA respectively [1]). Especially, I very much remember having to fix the partition types in Rufus after the Microsoft API went through the formatting, as I found that, even after you partitioned the drive and set LBA partition types for FAT, the formatting process would change the partition types to non LBA ([2] - also see the comment at line 822). I seem to recall that, unless you did that, you would indeed run into trouble during boot. Oh, since it might be useful for OP's testing, I should probably point out that Rufus can also be used to install a blank Syslinux v4 or v5 on an UFD (so you if you add something with a config file and some .c32, you should be able to test whether the Syslinux versions that are embedded in Rufus can boot). This is an advanced feature, so it is not available in default mode, but if you want to enable it, just click on the white arrow near "Format Options", so that you see the additional options panel. Once you do that, you should find that "Syslinux v4" and "Syslinux v5" are listed as extra options in the "Create a bootable disk" dropdown. Or you can see [3]. Regards, /Pete [1] http://en.wikipedia.org/wiki/Partition_type [2] https://github.com/pbatard/rufus/blob/master/src/format.c#L838 [3] https://github.com/pbatard/rufus/wiki/FAQ#wiki-Advanced_Mode
Thomas Schmitt
2014-Jan-15 12:45 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
Hi,> I have a > strong suspicion that this LBA "flag" is a fake flag that simply indicates > if a FAT partition type was set as CHS (0x06, 0x0b for FAT16 and FAT32 > respectively [1]) or LBA (0x0e, 0x0c for FAT16 LBA and FAT32 LBA > respectively [1]).This sounds plausible. (I still wonder how the C/H and H/S factors are determined for the C/H/S case.) Can you advise Ronald a way to get rid of the active/bootable flag ? Just to see how much stake this quirk of his board has in the overall problem. Have a nice day :) Thomas
On 2014.01.15 12:45, Thomas Schmitt wrote:>> I have a >> strong suspicion that this LBA "flag" is a fake flag that simply indicates >> if a FAT partition type was set as CHS (0x06, 0x0b for FAT16 and FAT32 >> respectively [1]) or LBA (0x0e, 0x0c for FAT16 LBA and FAT32 LBA >> respectively [1]). > > This sounds plausible.I have now confirmed that this is indeed the case. Booted GParted on a bootable UFD that had a single FAT32 LBA partition (type 0x0c @ address 0x1c2 of the MBR), and confirmed that GParted listed the flags: Boot, LBA. I then cleared the LBA flag, and checked the MBR, to find out that the partition type had now been switched to 0x0b (FAT32 CHS).> (I still wonder how the C/H and H/S factors are determined > for the C/H/S case.)Not sure either.> Can you advise Ronald a way to get rid of the active/bootable flag ? > Just to see how much stake this quirk of his board has in the > overall problem.Easiest way to do this from Windows is to use HxD [1], which is what I used to check my MBR. In HxD select Extras -> Open Disk and pick the relevant one under "Physical disks" (make sure to use Physical disks, not Logical disks, as you won't have access to the MBR otherwise). For an USB Flash Drive, the disk will probably be listed as "Removable Disk 1". Also make sure to _uncheck_ the "Open as Readonly" option, since we'll want to change content. From there, you can hex edit your MBR as you see fit, or any other sector of your disk for that matter, so, if you want to remove the bootable flag, just change the 0x80 at address 0x1be to 0x00. Finally, HxD can also be very convenient when someone on this mailing-lists asks you to provide a dump of an MBR from Windows ;) Simply select the content from the first sector, and go to File -> Export -> Editor View. You can then save an hexdump like the one attached (which shows the FAT32 partition @0x1c2 now being set to 0x0B instead of 0x0C, after removing the flag in GParted), and provide it to a mailing list. Regards, /Pete [1] http://mh-nexus.de/en/hxd/ -------------- next part -------------- ?Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 000000000 FA 31 C0 8E D8 8E C0 8E D0 BC 00 7C FB FC 89 E6 ?1????????.|???? 000000010 BF 00 06 B9 00 01 F3 A5 EA 1D 06 00 00 88 16 00 ?..?..???....?.. 000000020 08 B4 08 CD 13 31 C0 88 F0 40 A3 EC 06 80 E1 3F .?.?.1???@??.??? 000000030 88 0E EE 06 BE BE 07 31 C0 B9 04 00 F6 04 80 74 ?.?.??.1??..?.?t 000000040 03 40 89 F7 83 C6 10 E2 F3 83 F8 01 75 73 8A 16 .@????.????.us?. 000000050 00 08 B8 00 41 BB AA 55 31 C9 30 F6 F9 CD 13 72 ..?.A??U1?0???.r 000000060 23 81 FB 55 AA 75 1D F6 C1 01 74 18 57 BE DC 06 #.?U?u.??.t.W??. 000000070 8B 5D 08 89 5C 08 8B 5D 0A 89 5C 0A 8A 16 00 08 ?].?\.?].?\.?... 000000080 B4 42 EB 2A 57 8B 45 08 8B 55 0A F7 36 EE 06 42 ?B?*W?E.?U.?6?.B 000000090 89 D1 31 D2 F7 36 EC 06 88 C5 D1 E8 D1 E8 24 C0 ??1??6?.??????$? 0000000A0 08 C1 88 D6 8A 16 00 08 BB 00 7C B8 01 02 CD 13 .????...?.|?..?. 0000000B0 72 16 5E 81 3E FE 7D 55 AA 75 08 FA EA 00 7C 00 r.^.>?}U?u.??.|. 0000000C0 00 77 05 BE F0 06 EB 03 BE 0B 07 AC 30 C0 74 09 .w.??.?.?..?0?t. 0000000D0 B4 0E BB 07 00 CD 10 EB F2 EB FE 00 10 00 01 00 ?.?..?.????..... 0000000E0 00 7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .|.............. 0000000F0 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 74 69 6E Missing operatin 000000100 67 20 73 79 73 74 65 6D 0D 0A 00 4F 70 65 72 61 g system...Opera 000000110 74 69 6E 67 20 73 79 73 74 65 6D 20 6C 6F 61 64 ting system load 000000120 69 6E 67 20 65 72 72 6F 72 0D 0A 00 00 00 00 00 ing error....... 000000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000001B0 00 00 00 00 00 00 00 00 05 5C 3F 00 00 00 80 20 .........\?...? 0000001C0 21 00 0B FE FF FF 00 08 00 00 00 B8 C8 03 00 00 !..???.....??... 0000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?
Ronald F. Guilmette
2014-Jan-15 21:18 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
In message <52D66D45.8080108 at akeo.ie>, Pete Batard <pete at akeo.ie> wrote:>[disclaimer: I am the author of Rufus]Pleased to meet you. Rufus seems like a fine tool.>Oh, since it might be useful for OP's testing, I should probably point >out that Rufus can also be used to install a blank Syslinux v4 or v5 on >an UFD (so you if you add something with a config file and some .c32, >you should be able to test whether the Syslinux versions that are >embedded in Rufus can boot). This is an advanced feature, so it is not >available in default mode, but if you want to enable it, just click on >the white arrow near "Format Options", so that you see the additional >options panel. Once you do that, you should find that "Syslinux v4" and >"Syslinux v5" are listed as extra options in the "Create a bootable >disk" dropdown. Or you can see [3].I'm sorry, but I don't understand most of what you just said. Is this some additional new experiment that you were actually suggesting or advising me to carry out? Or were you just offering this additional information IN CASE it might appear (to me) to be useful? If the former, you will need to elaborate further. If the latter, I will just thank you for your willingness to offer potentially helpful additional info. Regards, rfg
Ronald F. Guilmette
2014-Jan-15 21:25 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
In message <13312645114355849636 at scdbackup.webframe.org>, "Thomas Schmitt" <scdbackup at gmx.net> wrote:>Can you advise Ronald a way to get rid of the active/bootable flag ?To repeat, I already do know exactly how to set or unset the bootable flag. I can use GParted to do that. (No need to open a hex editor, thank god!)>Just to see how much stake this quirk of his board has in the >overall problem.To repeat, with this board (GA-M55Plus-S3G) if I have a USB stick with an MBR partition table and one (and only one) partition on it and if the bootable flag is set on that partition then the board will not even see the USB stick. (Well... at least the *BIOS* will not see the stick as being in any sense a bootable device.) And paradoxically and conversely, if I have a USB stick with an MBR partition table, and if that contains one and only one partition, and if that partition DOES NOT have the bootable flag set, then the motherboard WILL see it and WILL (potentially/partially at least) boot off it. Regards, rfg