Slashdot Mirror


Some Windows Apps Make GRUB 2 Unbootable

KwahAG writes "Colin Watson, one of the Ubuntu developers, published in his blog information about Windows applications making GRUB 2 unbootable. Users of dual-boot Windows/Linux installations may face the problem, which boils down to particular Windows applications (Colin does not name them, but users point at least to HP ProtectTools, PC Angel, Adobe Flexnet) blindly overwriting hard disk content between the MBR and the first partition destroying information already stored there, in this particular case — the 'core image' of GRUB 2 (GRand Unified Bootloader) making the system unbootable."

4 of 429 comments (clear)

  1. Simple case of arrogant and lazy programmers by meerling · · Score: 1, Redundant

    They are trying to outsmart the os and other programs by using non-standard areas for some of their code without bothering to check if something else is already using it.
    Ironically I saw a lot of this during the switchover to win95.
    The stupidly assume that if their test machine isn't using that chunk of drive, nothing else does either, at any time, ever.
    You'd be shocked at how many people got their MBRs blown out because of that kind of stupidity.

    Well, it's been about 15 years, so there's a whole new crop of arrogant lazy s.o.b.s out there that have to learn that the computer is a shared environment.

  2. Re:WTF is the "embedding area"?! by FuckingNickName · · Score: 0, Redundant

    Could it be something to do with the fact that people aren't booting from FAT filesystems?

    So what's wrong with a FAT system partition? And, no, you don't need to boot from a primary partition. As a bonus, you can manipulate your boot settings just by fiddling with files in the regular filesystem in the regular partition.

    particularly if you have to support all of them.

    You only need to do initial boot from one filesystem, and you only need to install support for bootloading from that filesystem.

  3. Re:WTF is the "embedding area"?! by FuckingNickName · · Score: 1, Redundant

    Like other people mentioned, dedicating a partition to the bootloader is undesirable, as it runs into issues with recovery partitions.

    What issues? If you mean "the presence of a recovery partition means fewer unused partitions" then, yes, of course it may. Just as the presence of multiple operating systems may. But you're foolish if you start custom installing operating systems on your machine then try to use an OEM recovery partition. Either use a regular OS install ISO or something like Reflect / TrueImage / Ghost which is designed with multiple partitions in mind.

    Your menu probably was hardcoded. Grub reads the menu from disk.

    No, the same code used to search for a particular partition (primary/logical) would first be instructed to list each partition number and type. Not a sufficiently informative UI for production, but there's an awful lot you can do in ~400 bytes if you make the effort.

    But a production boot manager would load more substantial code from a particular partition so it could create an elegant, descriptive menu.

    In my understanding, an extended partition has an extended partition record right where the boot sector on a primary would be.

    Well, the logical partition is only considered to start where indicated by the extended boot record.

    To covert a primary to an extended you'd have to shrink the filesystem

    Not unless your drive was completely full, in which case you wouldn't have space to repartition for your new OS in the first place.

    and push it down by several blocks so that it starts on cylinder 0 too.

    On a cylinder boundary? How is this relevant with LBA? What are you actually achieving with a modern drive?

  4. Re:WTF is the "embedding area"?! by FuckingNickName · · Score: 1, Redundant

    First partition is NTFS, 500GB free.
    Next 3 partitions are primary, recovery data.

    We're already considering a completely idiotic setup, even though I'm sure at least one vendor has sold machines configured like that. Of course, we have to go to challenging cases for this horrible hack to even be considered appropriate ;-).

    Get Linux to install and run from the NTFS partition (in an .img file), while not adding any partitions (you can't), not passing control to the NTFS boot sector (will boot windows, so won't do).

    Either replace the boot code in the NTFS boot sector to load a Grub n'th stage or replace NTLDR (or Vista/7 equivalent) with a Grub n'th stage.

    Not sure what you mean there.

    I simply meant that the EBR should be considered metadata, not in any sense part of the logical partition.

    You'd be surprised, but people still run DOS and Win95. Legacy stuff. Can't break it arbitrarily.

    There's no obligation to not re-align on the faked cylinder boundary during any repartition. The space you waste simply ends up not being available for allocation to your new operating system's partition.