Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Sector 32 FlexNet Problem -- Grub

  1. #1
    Join Date
    Nov 2008
    Beans
    Hidden!

    Sector 32 FlexNet Problem -- Grub

    A few months ago, a friend of mine had an MS-Windows PC that was riddled with viruses, and he asked me to help him out with it.

    So I shrunk his main MS-Windows partition and I created a partition for Ubuntu.

    When Grub was installing to the MBR, it said something about Sector 32 being in use by FlexNet, but it didn't say that this was a fatal error.

    After I installed Grub, I rebooted the PC, but I wasn't able to get Ubuntu to boot up. I eventually decided to explore the Sector 32 problem to see if that was the cause.

    It seems a lot of people encounter this problem but I haven't seen one solution for it on the web other than to "wipe your hard disk". Total nonsense.

    So I'm gonna try put together a solution in this thread. Let's take a look at the problem:

    A hard disk is made up of sectors. A sector on a modern hard disk is 512 bytes. The first sector is called Sector 0, and it stores the Master Boot Record. The MBR consists of:
    * 440 bytes for bootable code (such as Grub)
    * 4 bytes for the disk signature
    * 2 bytes of nulls
    * 64 bytes for the partition table
    * 2 bytes for the MBR signature

    The partition table contains the list of partitions, saying what sector they start at and what sector they finish on.

    You might expect the 1st partition to start at Sector 1, but actually it tends to start at Sector 63 on a lot of computers. (The 1st partition tends to start at Sector 63 because there's 63 sectors in a cylinder, and MS-DOS wanted every partition to start at a cylinder boundary). So that means there's 62 unused sectors between the MBR and the 1st partition.

    (To find out where your own first partition starts, do fdisk -lu /dev/sda. On modern PC's this could be all sorts of numbers because of the way recovery partitions are laid out. By the way make sure that fdisk says that the sector size is "512 bytes"... because emm... I don't know what to say if it doesn't!).

    It so happens that more than one program likes to make use of those 62 free sectors between the MBR and the 1st partition.

    Grub has 440 bytes available to it in the MBR to store its bootable code, but it wants more space than that, so it uses the space between the MBR and the 1st partition. But Grub isn't the only program that wants to use that space, a thing called FlexNet does too. FlexNet is some sort of software license manager, and according to the warning issued by Grub, it likes to store data in Sector 32.

    When you try to install Grub over FlexNet, Grub refuses to overwrite Sector 32 if it sees FlexNet data in it. It would be great if you could just tell Grub to overwrite Sector 32, but it provides no such facility. For me, this caused a problem and Ubuntu wouldn't boot up for me.

    So what's the solution to get Grub working? You don't need to go wiping your entire hard disk, you just need to wipe the area between the MBR and the 1st partition.

    EXTREME CAUTION ADVISED: Wiping the storage area between your MBR and the 1st partition is an inherently dangerous activity. Doing so may result in serious injury and even death. Programs which make use of this storage area, such as FlexNet, may cease to function. You willingly accept the serious risks involved. You accept as your own responsiblity any harm that comes about as a result of following this guide, even if the guide contains errors or oversights.

    First, make a backup of the first 63 sectors of your hard disk (i.e. the MBR along with the 62 free sectors):

    Code:
    sudo dd if=/dev/sda of=~/first_63_sectors bs=512 count=63


    Trust me, back this up. No really. Do. Back it up. Seriously. You don't want to lose your partition table.
    Plus it's handy to have it backed up just in case you actually need that FlexNet data in future for whatever reason.

    Next, erase Sector 1 through Sector 62 (i.e the 62 free sectors):

    Code:
    sudo dd if=/dev/zero of=/dev/sda bs=512 count=62 seek=1
    That should do it, now Sector 1 through Sector 62 should be full of zeroes. Do "grub-install" again and see what happens.

    I'm not sure if FlexNet stores data in sectors other than Sector 32, but that's not a problem since we've just wiped everything between the MBR and the 1st partition.

    If you want to target one individual sector to erase, then you can erase Sector 32 as follows:

    Code:
    sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=32
    After I erased the FlexNet data and re-installed Grub, the PC booted up fine.

    If anyone sees any error in this post then please post here ASAP -- I'd hate for someone to lose data because of an error made in this guide.

    Last edited by Virchanza; January 6th, 2011 at 07:24 PM.

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Sector 32 FlexNet Problem -- Grub

    It is not just Flexnet which may be part of many different windows programs. Colin Watson from the grub2 team was looking for disk signatures as the windows software kept overwriting grub2. They obviously now have a workaround for flexnet, but may not for all software. Just be aware of other windows programs also.

    http://linux.slashdot.org/story/10/0...B-2-Unbootable
    http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/debian/2010-08-28-windows-applications-making-grub2-unbootable.html
    In Windows 7, had to remove Windows 7 DataSafe.
    HP ProtectTools, Dell Recovery, flexnet and a few others write into MBR meierfra.
    https://bugs.launchpad.net/ubuntu/+s...b2/+bug/441941
    https://bugs.edge.launchpad.net/ubun...1?comments=all

    Some software that may use Flexnet, just so you do not lose it unless you have no need anymore for it.
    Adobe Photoshop, CAD/CAM, Rosetta Stone, Matlab others
    Last edited by oldfred; January 6th, 2011 at 08:16 PM. Reason: Some software using flexnet in windows
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Feb 2007
    Location
    Folsom, CA
    Beans
    59
    Distro
    Ubuntu

    Re: Sector 32 FlexNet Problem -- Grub

    I am trying to set up a triple boot Win7 x64, Ubuntu x64, XP x32 setup. 7 and Ubuntu are up and running. While setting up Grub 2 I got the message about FlexNet. XP installer crashes with the 0x0000007B BSOD. I'm wondering if the XP installer thinks FlexNet is a boot sector virus and thus halts.

    I really thinking about trying those commands you listed above to see if my theory is correct. The one thing I am not sure on is how to restore the sectors if worse comes for worse. Just to be sure, the command to restore the sectors would be "sudo dd if=~/first_63_sectors of=/dev/sda bs=512 count=63" correct?

  4. #4
    Join Date
    Feb 2007
    Location
    Folsom, CA
    Beans
    59
    Distro
    Ubuntu

    Re: Sector 32 FlexNet Problem -- Grub

    Well, tried it anyway. BTW the third command (the one that erases only sector 32) works just fine. Grub reinstalled with no errors.

    My hunch was wrong about the XP installer though That issue is off topic, however. If someone reading this thinks they know the answer, msg me and I'll start a new thread elsewhere.

  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Sector 32 FlexNet Problem -- Grub

    Do you have a primary partition formated NTFS for XP?

    To get each MS to have its own boot loader make a primary partition and set its boot flag on, then install the 2nd product in it. Multibooters, Pictures here worth 1000+ words
    http://www.multibooters.co.uk/multiboot.html
    A user who installed two windows & it worked to boot from grub directly
    http://ubuntuforums.org/showthread.php?t=1271600
    Another user who disconnected and used a second drive
    http://ubuntuforums.org/showthread.php?t=1334346
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Aug 2008
    Beans
    7

    Re: Sector 32 FlexNet Problem -- Grub

    Thanks for your completed and explained procedure!

  7. #7
    Join Date
    Apr 2007
    Beans
    200
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Sector 32 FlexNet Problem -- Grub

    Thanks for this info! I found out that I had to write sector 58 instead of 32 in order to remove FlexNet, but in the end it all worked out well. Thanks to this post and TestDisk!

  8. #8
    Join Date
    Sep 2007
    Location
    Germany
    Beans
    41
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Sector 32 FlexNet Problem -- Grub

    Thanks to this thread i did not have to completely reinstall both my systems. My FlexNet was in sector 10, so i executed:

    Code:
    sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=10
    But i have still a problem, after a while i got the same error, where Grub did not start and realized that FlexNet is in the MBR again. I think it was some automatic updater or something like that.

    Does anybody know how to wipe FlexNet completely out from my system?

  9. #9
    Join Date
    Feb 2007
    Location
    Folsom, CA
    Beans
    59
    Distro
    Ubuntu

    Re: Sector 32 FlexNet Problem -- Grub

    Yeah I had the same problem- after I uninstalled it, I noticed it came right back. Weird. I called Gateway and they would not disclose any information about it unless I started a paid support session. My hunch, after some research, is that a system recovery utility is putting it there.

    BTW if you are using Matlab, I know for sure it uses Flexnet. Don't uninstall it or Matlab won't run. Some other super expensive software packages use it too, so be careful. Be sure you back it up (using the instructions in a post above) in case suddenly something doesn't work.

  10. #10
    Join Date
    Jul 2011
    Beans
    2

    Talking Re: Sector 32 FlexNet Problem -- Grub

    The suggestions made here work perfectly. FlexNet on my dual boot system was on Sector 10 as one of the above posts and is DEFINITELY what was breaking my GRUB (actually in my case, BURG) boot.

    Note: You will have to reinstall/repair GRUB every time you open whatever program is using FlexNet Licensing Service. In my case it was Adobe Acrobat.

    I'd also like to mention that before I came to this post, I had searched for a good tool to repair GRUB. The best one I found that requires very little user interaction and is GUI driven and runs from the LIVE CD is Boot Repair. It is very easy to use. Simply add the PPA, download the program, and run.

    If the web link to BOOT REPAIR goes inactive, then simply type/paste the following code into a terminal opened on the LIVE CD:
    Code:
    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
    sudo apt-get install boot-repair
    After the terminal session is finished, you can go to System - Administration - Boot Repair or search for and run Boot Repair.
    Last edited by dArksp0re; March 2nd, 2012 at 02:13 AM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •