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

Thread: hiding partitions in Grub 2

  1. #1
    Join Date
    Nov 2009
    Location
    Sydney
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    hiding partitions in Grub 2

    anyone help on how to hide a partition in grub 2.

    cannot find anywhere on how to set this up.
    have a test system that has.
    Win XP
    Vista
    and had ubuntu 9.04 with grub 1

    in the grub menu.lst

    had

    This is a divider, added to separate the menu items below from the Debian
    # ones.
    title Other operating systems:
    root


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda2
    title Windows XP Professional
    unhide (hd0,1)
    hide (hd0,2)
    rootnoverify (hd0,1)
    savedefault
    makeactive
    chainloader +1


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda3
    title Windows Vista
    unhide (hd0,2)
    hide (hd0,1)
    rootnoverify (hd0,2)
    savedefault
    makeactive
    chainloader +1



    This was so win xp didn't see vista and stuff up and vista didn't see win xp
    also so straight boot to both os not using linux boot loader then the stupid vista boot loader.

    I cannot find any info on how to setup this in the new grub.cfg

    or were to set this up.

  2. #2
    Join Date
    May 2009
    Location
    North West England
    Beans
    2,676
    Distro
    Ubuntu Development Release

    Re: hiding partitions in Grub 2


  3. #3
    Join Date
    Nov 2009
    Location
    Sydney
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: hiding partitions in Grub 2

    none of these post help all about change background pictures etc.
    have not found any useful info on how to get it working. yet.
    no man pages on grub 2.

    Please help someone out there must have this working already.

  4. #4
    Join Date
    Apr 2006
    Location
    Galax,Va. USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Question Re: hiding partitions in Grub 2

    I'm also having problems hiding a backup drive from the grub 2 menu. I looked at all the info I can find but still can't come up with an answer on how to hide a partition or drive from the probing.
    Iguana

    Registered Linux User #490719

  5. #5
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: hiding partitions in Grub 2

    @ dpg77
    I am not familiar with hiding the drives so I don't think the following would apply to you.

    @ Eddie Wilson,

    If all you want to do is exclude a particular partition from showing up in the menu, one solution might be buried in Grub 2 Title Tweaks. This post shows how you can change what is displayed in the menu by using scripting to hide or alter these items. Look at the 30_os-prober section.

    It would take a bit of work to come up with the exact script entries, but it can be done. If I have time, I will try to experiment with it, but everyone else is encouraged to take up the challenge and present the script entry which would hide a specific partition.

    Another option would be to change /usr/bin/os-prober to prevent it from looking at a particular partition.
    Back to Xorg...

    Retired.

  6. #6
    Join Date
    Apr 2006
    Location
    Galax,Va. USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: hiding partitions in Grub 2

    Thanks, I'll see what I can do.
    Iguana

    Registered Linux User #490719

  7. #7
    Join Date
    Apr 2006
    Location
    Galax,Va. USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: hiding partitions in Grub 2

    I dug into it some more and really couldn't find any info on not including a drive. I can change about everything else I need to but I'm stuck on this one. If anyone has any ideas then just jump right in.

    Can't wait till we get a decent Startup-Manager.
    Iguana

    Registered Linux User #490719

  8. #8
    Join Date
    Nov 2009
    Location
    Sydney
    Beans
    10
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: hiding partitions in Grub 2

    Found the answer but will more than likely have problems when i update the kernel but at least i got it going now.

    from my grub.cfg
    which i manually editted.

    Triple boot here i come.


    BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Microsoft Windows XP Professional (on /dev/sda2)" {
    insmod ntfs
    set root=(hd0,2)
    parttool (hd0,2) hidden-
    parttool (hd0,3) hidden+
    parttool (hd0,2) boot+
    search --no-floppy --fs-uuid --set ecb80573b8053d98
    drivemap -s (hd0) ${root}
    chainloader +1
    }
    menuentry "Windows Vista (loader) (on /dev/sda3)" {
    insmod ntfs
    parttool (hd0,3) hidden-
    parttool (hd0,2) hidden+
    parttool (hd0,3) boot+
    set root=(hd0,3)
    search --no-floppy --fs-uuid --set 66900a65900a3bd5
    chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###

  9. #9
    Join Date
    Apr 2006
    Location
    Galax,Va. USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: hiding partitions in Grub 2

    If I'm correct in my thinking the menu entries will still show up in your grub menu but I believe that's what you wanted. Now what I want to do is to prevent a backup hard drive from being detected and put into the menu list. The backup drive is not bootable so it shouldn't even be listed. Here we go again.
    Iguana

    Registered Linux User #490719

  10. #10
    Join Date
    Sep 2008
    Location
    Philadelphia, PA
    Beans
    5,193
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: hiding partitions in Grub 2

    Quote Originally Posted by Eddie Wilson View Post
    If I'm correct in my thinking the menu entries will still show up in your grub menu but I believe that's what you wanted. Now what I want to do is to prevent a backup hard drive from being detected and put into the menu list. The backup drive is not bootable so it shouldn't even be listed. Here we go again.
    Hmmmmm, I have 4 hard disks: IDE 160 GB, 250 GB SATA, 500 GB SATA and 80 GB external USB.

    The 160 GB IDE has 9.10, 9.04, Masonux & XP on it. The 250 GB is data (not mounted as /home) and the 500 GB is backups & PING images. No disks/partitions other than the OSs on the 160 GB show up in the GRUB menu.

    Something must have gone awry when you installed GRUB.
    Multi-boot: Arch linux, Ubuntu 12.04, Windows 7 & Windows 8

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
  •