20

This only happens with one of my computers. It is an elderly laptop that has had a long and varied history with several operating systems, but in its retirement it is acting as a server for my home network using Ubuntu 12.04. It is a single-boot system, there are no other systems installed. Every so often, whenever there is a grub upgrade, I notice a message like this:

Setting up grub-common (1.99-21ubuntu3.4) ...
Installing new version of config file /etc/grub.d/00_header ...
Setting up grub2-common (1.99-21ubuntu3.4) ...
Setting up grub-pc-bin (1.99-21ubuntu3.4) ...
Setting up grub-pc (1.99-21ubuntu3.4) ...
/usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it.  This software may cause boot or other problems in future.  Please ask its authors not to store data in the boot track.
Installation finished. No error reported.

Should I be worried about this? What (if anything) should I do about it?

  • 2
    FYI, "FlexNet" is written by Flexera software to keep track of licenses. – holmis83 Jan 4 '17 at 16:24
  • I don't know when google is planning on showing the most upvoted answer first in its search results... – user10089632 Mar 30 '18 at 9:11
  • @user10089632 not sure what your comment is aimed at? The answer you linked is to a totally different question. Maybe you need to talk to Google, but otherwise I can't help you since I have no idea what search terms you were using. – Bobble Mar 31 '18 at 10:13
  • Thanks a lot! 2020 and the same issues.... QUESTION: I need to do the procedure via ssh. Is it mandatory not to run the drive where the correction is applied? Why is it necessary to have an external boot media? What would be wrong if I just do the overwrite in situ? Please give me some hints! – opinion_no9 Aug 3 at 11:56
  • @opinion_no9 Having external boot media means you are not dependent on the boot sector of the computer's hard drive, so that you can edit it without crashing the machine. This is the kind of job where I think you have to have physical access to the box, or risk bricking it. My own answer provides a few links that may help you. – Bobble Aug 4 at 12:39
25

It's not a big deal since there is no error reported so just warning.

But, if you wish to get rid of this, you need to wipe sector 32. To do this you have many choices:

a. Wiping the whole hard disk;

b. writing zeros to Whole sectors in your MBR and reinstall your grub;

c. Writing zeros to sector 32 in your MBR (that's what we'll do here).

To do that follow the following steps:

  1. Backup your MBR:

    sudo dd if=/dev/sda of=~/first_63_sectors bs=512 count=63
    
  2. zero your sector number 32:

    sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=32
    
  3. chroot and reinstall grub: Here "/media" should be whatever your chosen mount point is. Some step-by-step instructions use "/mnt" rather than "/media".

    sudo mount /dev/sda* /media/sda*
    
    sudo mount --bind /dev /media/sda*/dev
    
    sudo mount --bind /proc /media/sda*/proc
    
    sudo mount --bind /sys /media/sda*/sys
    
    sudo chroot /media/sda*
    

    PS: replace * by the appropriate number of your hdd

    Now update your grub:

    sudo update-grub
    

Note: You are not obliged to these steps, since its not an error that may affect your system.

| improve this answer | |
  • Thanks maythux. Further info about this in my own answer (especially what to do when things go wrong...) – Bobble Oct 2 '12 at 7:04
  • I think you are right, 'leave well alone' was an option here, but at the same time I figure the warning is there because in the future it will cause a problem, so it's better to get rid of it. – Bobble Oct 2 '12 at 7:08
  • You are welcome and ive read your answer its great u deserve +1 – user61928 Oct 2 '12 at 7:09
  • This didn't worked for me. I tried even this. I'm still greet with the grub bootloader. – machineaddict Aug 11 '14 at 12:30
  • Thanks, but I didn't do the whole procedure 3. I only did "sudo update-grub" in procedure 3 after 1 and 2. Is it necessary " sudo mount ..."? – Smile May 6 '19 at 22:17
2

I found a couple of useful links that explain what the message is about, and how to clean out the boot sectors on the disk. This thread gives a very good explanation of the problem. This thread gives a nice easy cookbook recipe for cleaning things up.

The cookbook worked for me, although I made a mess of the chrooting bit... (see below)

I am lucky in that my computer is single-boot and I have no plans EVER to re-install Windows. But it seems that if you have a dual-boot Windows system with software that uses FlexNet or similar software, you can expect to have regular problems. Also I think some Windows viruses may use this part of the disk. The first thread discussion offers a solution for Ubuntu users, to install an app called boot-repair on your live-CD USB booter.

I also found the boot-repair program referred to above invaluable when things go wrong. IMHO this is so useful it should be on the Live CD by default. See this link.

| improve this answer | |
  • Thanks a lot for your comment! The first contirbution in the first mentioned article is great - but I would NEVER EVER install such a dodgy "app" on a machine! Snakeoil and uncertain sources. Never! Dual Boot is not the issue. Adobe is the issue. Can not always change that .... Meanwhile I removed "FlexNet" even via ssh: Works perfect!! Just do two steps: dd zeros into "32" as described above + sudo grub-install /dev/yourdisk + reboot to verify. Problem solved! That simple! – opinion_no9 Aug 5 at 15:32
1

Less CLI typing with live DVD/USB

Here is a way of doing the same with less command line typing, using a live DVD or a live USB.

  1. Boot into a live session (= select trying out (X)Ubuntu).

  2. Use the lsblk command to show all drive partitions.

    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 298.1G  0 disk 
    ├─sda1   8:1    0   512M  0 part /boot
    ├─sda2   8:2    0   4.5G  0 part [SWAP]
    ├─sda3   8:3    0    44G  0 part /
    └─sda4   8:4    0 249.1G  0 part /home
    sr0     11:0    1  1024M  0 rom  
    

    Make sure you target the affected drive (here sda).

  3. Remove FlexNet from the affected drive (here /dev/sda), using the sector number reported by GRUB (here sector 32):

    $ sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=32
    

    There is no need to backup this usually empty part of the extended boot record (EBR).

  4. Now, mount the partition of the affected drive which is normally used for booting (here /dev/sda1).

    $ sudo mount /dev/sda1 /mnt
    
  5. Finally, reinstall GRUB on the affected drive:

    $ sudo grub-install --boot-directory=/mnt /dev/sda
    

    GRUB should now install without any warnings.

  6. You are now safe to reboot from the disinfected hard drive.

| improve this answer | |
  • great, Thanks a lot! 2020 and the same issues.... QUESTION: I need to do the procedure via ssh. Is it mandatory not to run the drive where the correction is applied? Why is it necessary to have an external boot media? What would be wrong if I just do the overwrite in situ? Please give me some hints! – opinion_no9 Aug 3 at 11:53
  • @Bobble Thanks a lot for your comment! Since the boot sector is absolutely not in use while the machine operates I can not see a risk. Meanwhile I tried to remove "FlexNet" via ssh: Works perfect!! Just do two steps: dd into "32" as described + sudo grub-install /dev/yourdisk + reboot to verify. Problem solved! That simple! Thanks to you all contributing the sophisticated solutions ... – opinion_no9 Aug 5 at 15:28
  • @opinion_no9 I used an external boot medium at the time because I was installing a used hard drive to replace a smaller boot drive. You can read more about this and removing FlexNet in my article Same PC, New HD – Serge Stroobandt Aug 5 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.