Ronald F. Guilmette
2014-Jan-15 09:04 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
Ady, before responding to you further, I'll ask you now to take onje more (fresh) look at this thread that I started over in the GParted forums: http://gparted-forum.surf4.info/viewtopic.php?pid=31834 Please note that I have now followed-up on myself and that I have added quite a lot of new & additional information. It now appears to me that GParted's reporting of the status of the per-partition "bootable" flags may have been right all along, *but* if that is true, then the BIOS of my GA-M55Plus-S3G motherboard has some *really* serious drain bamage, because if there is a mass storage device connected to this motherboard via USB and if that device has an MBR partition table and only one partition, and if the "bootable" flags for that one partition, as reported by GParted, is *set*, then the BIOS on this motherboard will, paradoxically, *not* see the drive in question as bootable, and conversely, if the partiton's bootable flag is *not* set, then in that case the BIOS *does* see the device as bootable. This is clearly bass ackwards, but I have verified this several times now, and I believe that the BIOS is just plain wrong, i.e. it is probably the one that has things bass-ackwards. (But this theory still fails to explain how my main/regular hard drive for this same desktop system came to have the bootable flag on the actual Win7 OS partition UN-set. I can assure you that *I* never did anything to set it like that. I did however perform a totally plain vanilla install of Win7 ("retail" version) onto this exact drive from an official MS Win7 CD not very long ago. Separately, having failed, utterly, to get anywhere when I tried to use GParted to both (1) install an MBR record and to (2) create the one FAT32 partition that we need, I decided to back up and try again to use your recommended tool, RUFUS, instead, and see how far I could get with that. The results were enlightening. I asked RUFUS to create for me a USB stick which was bootable and which contained FreeDOS. It obliged me. I subsequently took the resulting USB stick and tried to boot it on both my laptop and my small HTPC system. In both cases it booted to FreeDOS with no problem at all. I then looked in detail at what RUFUS had created for me, using GParted. Of course, RUFUS had created a MBR partition table, and that table, of course, contained only one entry. It is the *flags* on that one RUFUS-created partition that I found especially interesting. According to GParted, the partition that RUFUS created had two (and only two) partition flags set, i.e. the bootable flag and the "LBA" flag. Obviously, this is why my ill-advised efforts to create a bootable USB stick, starting with GParted, failed. I had no idea at that time that I needed to set _both_ the bootable flag and the (non- standard?) "LBA" flag. But apparently both are vital. Now I know. (Actually, someone else in this thread mentioned "LBA" but I failed to properly read those comments. Sorry.) In any case, I'm sure that you would like to know what happend when I took my perfectly working perfectly bootable RUFUS-generated FreeDOS USB stick and tried to boot it on my problematic GA-M55Plus-S3G system. But you could easily predict what happened when I did this, based on everything else I've already said. Remember that RUFUS *does* set the bootable flag and that, as I said already, my goofy motherboard refuses to see a USB-connected device as being bootable if the device in question contains a single partition that *does* have that flag set. In short, that perfectly working RUFUS-generated bootable FreeDOS USB stick that worked just fine on both my laptop and HTPC failed to boot on my (desktop) GA-M55Plus-S3G system, because it had the bootable flag set, and in all such cases, this motherboard doesn't even list such things in its Boot Priority list. It is like the device is not even there at all! (I am still in the process of exchanging e-mails with a tech support guy @ Gigabyte, and you can bet your bottom dollar that I will be giving him very much of a hard time about this.) Anyway, that is the bottom line. It appears to me that RUFUS isn't even using SYSLINUX. Is that correct? Regardless of what it uses, even it can't/won't generate a USB stick that this motherboard is willing to boot, so that fact says to me that this really isn't even a SYSLINUX problem... and I probably shouldn't have bothered any of you folks with any of this. My apologies. Regards, rfg P.S. Just for laughs, I did try taking that perfectly working RUFUS- generated FreeDOS USB stick and (using GParted) UN-setting its bootable flag, just so that I could try, one last time, to see if maybe that was all that might be needed to entice the GA-M55Plus-S3G to boot from it. Then I tried again to boot the GA-M55Plus-S3G from the USB stick. This also failed. (The system freezes just after printing "Boot from CD/DVD :") I believe that the reason most probably has something to do with that LBA flag. The BIOS on this brain damaged motherboard probably doesn't properly understand that either. (And actually, it appears, based on my googling, that this LBA flag may not be "standardized" in any meaningful sense anyway. So maybe the motherboard isn't in any sense obligated to do what RUFUS and/or GParted and/or anybody else thinks ought to be done with that flag.) Anyway, sorry, but I don't think that I want to work on this problem any more. It isn't fun and it just isn't worth my time. It is more cost effective for me to just replace the motherboard with something sane... something that works, both with SYSLINUX and also with RUFUS- created sticks. If/when I do replace it, I'll be more than happy to ship it to you Ady, or anybody else who desires to conduct further tests.
Thomas Schmitt
2014-Jan-15 10:10 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
Hi, Ronald F. Guilmette wrote:> Remember that RUFUS *does* set the > bootable flag and that, as I said already, my goofy motherboard refuses > to see a USB-connected device as being bootable if the device in question > contains a single partition that *does* have that flag set.If this theory is right then it would suffice to set bit 7 of byte 446 of the USB stick to 0 (first byte is number 0). Pity we do not use the same operating system. But this should be not too hard to do in any programming language, if you can open the stick device for read/write operations.> I had no idea at that > time that I needed to set _both_ the bootable flag and the (non- > standard?) "LBA" flag. But apparently both are vital. Now I know.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) ? Is any background info known ? A flag to tell that C/H/S shall be ignored would be interesting. I am looking at https://git.gnome.org/browse/gparted/tree/ but don't find enlightenment. Ronald: Can you post a hexdump of the first 512 bytes of the stick state of which GParted reports that LBA-flag ? (Actually bytes 440 to 511 are of most interest.) Are you sure that without LBA-flag it is not recognized ?> (Actually, someone else in this thread mentioned "LBA" but I failed > to properly read those comments. Sorry.)We mentioned LBA (Logical Block Address) mostly because we suspected that a high address of the boot image file might reveil bugs which are not to see on other systems. There also was the suspicion that the partitioning of the stick had a stake in the problem. So it was suggested to try one of the isohybrid ISO images of the Linux distros, which get their partitioning either from program isohybrid or from my xorriso. Just to see whether they do any better and then to analyze the differences. But i doubt that both programs set an LBA-flag by accident. And typically, the active/bootable flag is set in isohybrid MBRs. So they will likely not show up with your mad board. (Unless you set bit7 in byte 446 to 0.) Further i cannot tell how to flatly copy an image file onto USB stick by help of MS-Windows. Have a nice day :) Thomas
[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
> > > Ady, before responding to you further, I'll ask you now to take onje > more (fresh) look at this thread that I started over in the GParted > forums: > > http://gparted-forum.surf4.info/viewtopic.php?pid=31834 > > Please note that I have now followed-up on myself and that I have added > quite a lot of new & additional information. > > It now appears to me that GParted's reporting of the status of the > per-partition "bootable" flags may have been right all along, *but* > if that is true, then the BIOS of my GA-M55Plus-S3G motherboard has > some *really* serious drain bamage, because if there is a mass storage > device connected to this motherboard via USB and if that device has > an MBR partition table and only one partition, and if the "bootable" > flags for that one partition, as reported by GParted, is *set*, then the > BIOS on this motherboard will, paradoxically, *not* see the drive in > question as bootable, and conversely, if the partiton's bootable flag > is *not* set, then in that case the BIOS *does* see the device as bootable. > > This is clearly bass ackwards, but I have verified this several times > now, and I believe that the BIOS is just plain wrong, i.e. it is probably > the one that has things bass-ackwards. (But this theory still fails to > explain how my main/regular hard drive for this same desktop system > came to have the bootable flag on the actual Win7 OS partition UN-set. > I can assure you that *I* never did anything to set it like that. I did > however perform a totally plain vanilla install of Win7 ("retail" > version) onto this exact drive from an official MS Win7 CD not very > long ago. > > Separately, having failed, utterly, to get anywhere when I tried to use > GParted to both (1) install an MBR record and to (2) create the one > FAT32 partition that we need, I decided to back up and try again to use > your recommended tool, RUFUS, instead, and see how far I could get with > that. > > The results were enlightening. I asked RUFUS to create for me a USB > stick which was bootable and which contained FreeDOS. It obliged me. > I subsequently took the resulting USB stick and tried to boot it on > both my laptop and my small HTPC system. In both cases it booted to > FreeDOS with no problem at all. I then looked in detail at what RUFUS > had created for me, using GParted. Of course, RUFUS had created a MBR > partition table, and that table, of course, contained only one entry. > It is the *flags* on that one RUFUS-created partition that I found > especially interesting. According to GParted, the partition that RUFUS > created had two (and only two) partition flags set, i.e. the bootable > flag and the "LBA" flag. > > Obviously, this is why my ill-advised efforts to create a bootable > USB stick, starting with GParted, failed. I had no idea at that > time that I needed to set _both_ the bootable flag and the (non- > standard?) "LBA" flag. But apparently both are vital. Now I know. > (Actually, someone else in this thread mentioned "LBA" but I failed > to properly read those comments. Sorry.) > > In any case, I'm sure that you would like to know what happend when I > took my perfectly working perfectly bootable RUFUS-generated FreeDOS > USB stick and tried to boot it on my problematic GA-M55Plus-S3G system. > But you could easily predict what happened when I did this, based on > everything else I've already said. Remember that RUFUS *does* set the > bootable flag and that, as I said already, my goofy motherboard refuses > to see a USB-connected device as being bootable if the device in question > contains a single partition that *does* have that flag set. > > In short, that perfectly working RUFUS-generated bootable FreeDOS USB > stick that worked just fine on both my laptop and HTPC failed to boot > on my (desktop) GA-M55Plus-S3G system, because it had the bootable flag > set, and in all such cases, this motherboard doesn't even list such > things in its Boot Priority list. It is like the device is not even > there at all! > > (I am still in the process of exchanging e-mails with a tech support > guy @ Gigabyte, and you can bet your bottom dollar that I will be giving > him very much of a hard time about this.) > > Anyway, that is the bottom line. It appears to me that RUFUS isn't > even using SYSLINUX. Is that correct? Regardless of what it uses, > even it can't/won't generate a USB stick that this motherboard is > willing to boot, so that fact says to me that this really isn't even a > SYSLINUX problem... and I probably shouldn't have bothered any of you > folks with any of this. My apologies. > > > Regards, > rfg > > > P.S. Just for laughs, I did try taking that perfectly working RUFUS- > generated FreeDOS USB stick and (using GParted) UN-setting its bootable > flag, just so that I could try, one last time, to see if maybe that > was all that might be needed to entice the GA-M55Plus-S3G to boot from > it. Then I tried again to boot the GA-M55Plus-S3G from the USB stick. > This also failed. (The system freezes just after printing "Boot from > CD/DVD :") I believe that the reason most probably has something to do > with that LBA flag. The BIOS on this brain damaged motherboard probably > doesn't properly understand that either. (And actually, it appears, > based on my googling, that this LBA flag may not be "standardized" in > any meaningful sense anyway. So maybe the motherboard isn't in any > sense obligated to do what RUFUS and/or GParted and/or anybody else > thinks ought to be done with that flag.) > > Anyway, sorry, but I don't think that I want to work on this problem > any more. It isn't fun and it just isn't worth my time. It is more > cost effective for me to just replace the motherboard with something > sane... something that works, both with SYSLINUX and also with RUFUS- > created sticks. > > If/when I do replace it, I'll be more than happy to ship it to you Ady, > or anybody else who desires to conduct further tests. >@Ronald, I have to admit I am a little bit frustrated. Are you really abandoning the tests? Your last email mentions several different procedures you tried, but not the one I suggested after extracting Clonezilla: d: cd d:\utils\win32\ syslinux64.exe --mbr --active --directory /syslinux/ --install d: By the time I am writing this, the issue about the "LBA" flag has already been answered by others. Unfortunately, I wasn't available so to answer you before. It would had saved them some time. Just for generic information, the partition IDs used by MS depend not only on the filesystem, but also on which version of DOS/Windows supports it. And when I say "supports it", I actually mean the fdisk plus format utilities that came with each version. The reasons for this are off-topic now. Similarly to the "LBA" flag (that implies a simple change in the partition ID for that filesystem), also a "hidden" flag exists. For example, a partition ID of "07" is changed to "17". Removing the "hidden" flag means changing back from "17" to "07". The "boot" flag is different, in the sense that it is independent of the partition ID. It is a "field" by itself. Can any of these flags prevent booting a USB drive? Generally speaking, they can. Can GParted *by itself* make a USB drive bootable? No, it can *not*. Not even by changing these flags. I have no interest in knowing the exact procedure you used with GParted on this USB drive. There are so many variables, that describing the steps would make it a waste of time. There is one fact that I know: your USB drive *is* potentially bootable in this particular system. I know it because of your own emails. All we need is to use the correct set of files, with the correct version of Syslinux, with the correct command line to install SYSLINUX in the adequate directory. Although I have no way to know it for certain, my guess is that when you saw something like "Boot from CD/DVD :" was either because the code in the USB drive failed to complete the boot process and the BIOS tried to boot from the next available device, or because the code in the MBR of the USB drive was not a "bootable" code at that particular moment. If you were to follow the instructions I posted in my previous email, with Clonezilla files alone and the installation command I provided: syslinux64.exe --mbr --active --directory /syslinux/ --install d: and assuming that Syslinux version 6.03-pre1 has no bugs in the 64 bits Windows-based installer, we might be making actual progress. Regarding the USB not being listed, it can happen for several reasons. I was requesting from you to use F12 from POST, every time. If you can't find the specific USB drive the first time, have you tried again F2 and looking under a different category? I mean, after proceeding with extracting the Clonezilla files and the installation command; not after GPArted nor any other. We don't want to mix Gparted nor any other partitioning tool, unless we actually need to start over with the MBR and the partition filesystem. FWIW, the command: syslinux64.exe --mbr --active --directory /syslinux/ --install d: installs a bootable code in the MBR, marks the partition as "active", installs SYSLINUX to the VBR of the FAT32 partition, and copies the bootloader files to the relevant directory, where Clonezilla and SYSLINUX expects them.>From that point we could advance, depending on the result. But youreported other procedures instead. Other members of this mailing list also requested some info about the USB drive, its MBR, its partitions... You don't have a Linux OS installed in this particular system so to answer to those questions, but perhaps you could have the USB drive temporarily connected to other system with Linux installed? We don't know. If you want to re-read my previous email and try again the procedure with Clonezilla files and the syslinux64.exe command and let us know the result, we might be able to actually solve the issue. Perhaps this BIOS is indeed buggy, but I know (from the info you initially provided in your first email), that it is also possible to boot this particular system from this USB drive. I hope this email encourages you to try the procedure and report back. Regards, Ady.
Ronald F. Guilmette
2014-Jan-15 21:12 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
In message <1170645100953411894 at scdbackup.webframe.org>, Thomas Schmitt" <scdbackup at gmx.net> wrote:>Ronald F. Guilmette wrote: >> Remember that RUFUS *does* set the >> bootable flag and that, as I said already, my goofy motherboard refuses >> to see a USB-connected device as being bootable if the device in question >> contains a single partition that *does* have that flag set. > >If this theory is right then it would suffice to set bit 7 >of byte 446 of the USB stick to 0 (first byte is number 0).I can un-set the bootable flag using Gparted, and have already done so. Doing that causes the USB stick to be seen as bootable by the GA-M55Plus-S3G, as I recently reported.>> I had no idea at that >> time that I needed to set _both_ the bootable flag and the (non- >> standard?) "LBA" flag. But apparently both are vital. Now I know. > >As producer of MBRs i wonder where that LBA-flag is located.I am quite certainly NOT the person to ask about this. But anyway, looking at other recent messages in this thread, I gather that you fellows have already figured out all of the fine details of whatever the heck it is that GParted is showing as an "LBA flag", yes? So you don't need any additional info from me about this, right?>Further i cannot tell how to flatly copy an image file onto >USB stick by help of MS-Windows.If you are speaking of an ISO (or UDF) type image, I also know of no way to do this under Windows. If I needed to do it, I would take the stick over to my FreeBSD system and use dd. Regards, rfg
Ronald F. Guilmette
2014-Jan-15 22:07 UTC
[syslinux] USB boot problems on Gigabyte GA-M55Plus-S3G
In message <BLU0-SMTP47F18ED7837B2CE7C672C88BBE0 at phx.gbl>, Ady <ady-sf at hotmail.com> wrote:>@Ronald, > >I have to admit I am a little bit frustrated.lol Join the club! I've invested hours and hours and hours on this little project, and all I have at the end is a board that _still_ has a brain damaged BIOS that won't boot things that everything else I own will happily boot. I could (and probably should and probably will) replace this board with a newer and better one for about $55 USD, which is less than what one single hour of my time is worth.>Are you really abandoning the tests?Having asked for help here, I felt obliged to provide much information in return. Plus I always like to be supportive of free open software projects (and have been already, for nearly 25 years). But there's got to be a limit. Unfortunately, I did actually have a few other projects already on my plate that I needed to get done this lifetime.>Your last email mentions several different procedures you tried, but >not the one I suggested after extracting Clonezilla: >d: >cd d:\utils\win32\ >syslinux64.exe --mbr --active --directory /syslinux/ --install d:I'm not seeing the point of carrying out this additional experiment. As I said, I have a perfectly good RUFUS-generated bootable FreeDOS USB stick. It boots perfectly in my other systems but doesn't even show up in the Boot Priority list of the GA-M55PLUS-S3G! Isn't that enough evidence, even just all by itself, to convince us all that the GA-M55PLUS-S3G BIOS is hopelessly brain damaged? If not, then combine it with the fact that I also have Clonezilla *and* UBCD *and* OpenELEC sticks that also boot just fine everywhere except on the GA-M55PLUS-S3G, and the verdict is clear, I think. This board is worth any more of my time, and most probably isn't worth any more of your's either.>By the time I am writing this, the issue about the "LBA" flag has >already been answered by others. Unfortunately, I wasn't available so >to answer you before. It would had saved them some time.It's OK. I myself actually *had* no question about that LBA flag. Others raised questions about it, but personally, I have just been trying to report facts... as many of them as I could gather... in an effort to try to be responsive to all of the queries that have been posted from all of you guys who actually work on and understand all this stuff. (Boot loaders are *not* a part of *my* forte. Like not at all.) I don't know what the LBA flag is and quite frankly I don't even care. I just reported that GParted was saying that a RUFUS-generated stick had it set to "on", and that my (uneducated) guess was that this was important and significant.>Just for generic information, the partition IDs used by MS depend not >only on the filesystem, but also on which version of DOS/Windows >supports it. And when I say "supports it", I actually mean the fdisk >plus format utilities that came with each version. The reasons for >this are off-topic now.Thank you. Yes, I gleened from earlier posts in this thread that there are different system ID byte values, depending on whether the partition contents should be addressed using LBA or not. (Not that I even understand much of this LBA versus C/H/S stuff. I don't. I only understand this stuff well enough, in general, to try to personally stay well and far away from dealing with it all, as much as I can, leaving it all instead to folks like the smart people on this list, who understand it all far better than I ever will.)>There is one fact that I know: your USB drive *is* potentially >bootable in this particular system. I know it because of your own >emails.I agree that *in theory* (since I can at least partially boot Win7 from/via USB) there is a possibility that I could take some USB device, produced by some nice tool like RUFUS... or in some other manner... and fiddle and diddle it, for a little while or a long while, in one step or maybe several, and that I might eventually get it to boot on/with this motherboard. But what's the point? It will never just work "out of the box".>All we need is to use the correct set of files, with the correct >version of Syslinux, with the correct command line to install >SYSLINUX in the adequate directory.Again I ask "What is the point?" Are people going to start releasing special releases of Clonezilla, UBCD, and OpenELEC... not to mention Rufus... that have been tailored specially so that they will work on this one brain dead motherboard? I don't think so.>Regarding the USB not being listed, it can happen for several >reasons. I was requesting from you to use F12 from POST, every time. >If you can't find the specific USB drive the first time, have you >tried again F2 and looking under a different category?I *have* managed, thus far, to extract at least a little relevant information from Gigabyte tech support about all this. The last message I got from them was completely clear and unambiguous. If and only if a device appears in the Boot Priority list (reached via the BIOS Setup screens which are in turn reached via DEL during POST) then the board can potentially boot from it... assuming all else is well, e.g. that it actually contains something bootable. If however a given device DOES NOT appear in the BIOS Boot Priority list, then it CANNOT be booted from. Period.>I hope this email encourages you to try the procedure and report >back.Thank you for your kindness and efforts, but no, not really. It just doesn't appear to be worth any further investment of time at this point. Why don't you talk to that Rufus guy? If he produces a new release which he thinks might (out-of-the-box and with no fiddling, or hex editing, or any such stuff) allow me to boot to FreeDOS from a USB using this motherboard, I'll be more than happy to download it and give it a try. In the absence of that, my offer to donate this board to you (as soon as I get a replacement) stands. You can then do as you wish with it to your heart's content. Regards, rfg