Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th March 2012, 10:03 AM
Browser Offline
Registered User
 
Join Date: Dec 2009
Posts: 9
linuxfirefox
How do i remove the default GRUB2 menu entry for Windows?

Hi everyone,

I duel boot Fedora 16 and Windows 7 and i use GRUB2.
I've managed to remove the defualt GRUB2 menu entry for linux with "chmod -x 10_linux",
and make my own custom GRUB2 menu entry for "Fedora 16 GNU/Linux".
However, I don't know how to remove the default GRUB2 menu entry for Windows 7.
Can anyone tell me how to remove the defualt GRUB2 menu entry for Windows?

Currently, i have the default Windows 7 entry commented out in the 'grub.cfg' file
so that i can use my own custom GRUB2 menu entry, but i find this to be an unsatifactory
solution.

Thank you.
Regards, Browser.
Reply With Quote
  #2  
Old 18th March 2012, 01:09 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,979
linuxchrome
Re: How do i remove the default GRUB2 menu entry for Windows?

You can try adding

GRUB_DISABLE_OS_PROBER=true

in the file /etc/default/grub, then running


grub2-mkconfig -o /boot/grub2/grub.cfg

Sometimes, however, this results in grub not looking at the custom configs too--however, I've only that problem (of it resulting in grub2 ignoring custom configs) with Ubuntu, not Fedora.
Reply With Quote
  #3  
Old 18th March 2012, 06:11 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
linuxchrome
Re: How do i remove the default GRUB2 menu entry for Windows?

The grub2 script file /etc/grub.d/10_linux is responsible for determining your current Fedora kernel entries in the menu.
The grub2 script file /etc/grub.d/30_os-prober is responsible for pretty much everything else, including Windows and earlier versions of Fedora that might be present.
You can modify the 30_os-prober to exclude adding any or all Windows (NT and up) OS's, like so:

Find the entry, should begin around line 98 in the file:
Code:
  if [ -z "${LONGNAME}" ] ; then
    LONGNAME="${LABEL}"
  fi
And right below it, add the following, where /dev/sdxx is your W7 bootable drive/partition:
Code:
  if [ "${DEVICE}" = "/dev/sdxx" ]; then
  continue
  fi
I do this to good effect to keep a long unused W2K install on one of my 3 hdd's from showing up in the grub2 menu. The only caveat is that by manually editing any of the script files in /etc/grub.d/, when there is an update to grub2, you're edited script file will be preserved as "30_os-prober.rpmsave" and a new "30_os-prober" file, without your edits, will be installed. Both will be executable and so both will run, regardless of the name change, when you subsequently run a "grub2-mkconfig -o /boot/grub2/grub.cfg" command.

To prevent that being a problem, you then need to either apply your edits to the new "30_os-prober" file and either delete or unset the execute bits on the "30_os-prober.rpmsave" file, or unset the execute bits on the new "30_os-prober" file. A minor annoyance, but then, grub2 doesn't get updated all that often, at least not yet.

I can't put my finger on the Ubuntu guide at the moment that gave instructions on how to do what I just described, That guide contains a wealth of information. I thought I had it bookmarked...oh, I'm chrome, it's probably in my FF bookmarks.

Edit: OK.. found the link in my FF bookmarks: Grub2 Title Tweaks

---------- Post added at 01:11 PM ---------- Previous post was at 11:12 AM ----------

If I may have misunderstood you and what you mean is that Windows is the "default" OS at the grub2 menu (top of the menu list) and you wish to have another OS as default, and NOT to remove the Windows entry completely from the grub2 menu, then ignore the information I gave above.

There are a couple of different methods to make any one of the grub2 menu entries the "default". Please state more clearly which it is you're trying to accomplish.

Last edited by PabloTwo; 18th March 2012 at 04:18 PM.
Reply With Quote
  #4  
Old 21st March 2012, 09:32 AM
Browser Offline
Registered User
 
Join Date: Dec 2009
Posts: 9
linuxfirefox
[Solved] - How do i remove the default GRUB2 menu entry for Windows?

Hi smr54 and PabloTwo,

Thank you both for your response to my post.

PabloTwo: your solution did the trick for me.
The link you gave turned out to be a valuable resource.

Regards,
Browser.
Reply With Quote
Reply

Tags
default, entry, grub2, menu, remove, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW TO: remove GRUB2 booloader and recover windows default deathmood Guides & Solutions (No Questions) 4 18th March 2013 01:31 AM
Grub2: How to *REALLY* set the default OS rgaelzer Using Fedora 6 30th May 2012 11:00 AM
Using Grub2 (Not using the legacy grub entry) uncholowapo Guides & Solutions (No Questions) 13 6th October 2011 10:21 AM
Remove entry from Places Menu menotu3169 Using Fedora 11 12th March 2010 01:05 AM


Current GMT-time: 15:35 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat