Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Hide Unmounted Partitions

  1. #11
    Join Date
    Dec 2008
    Location
    PA
    Beans
    13
    Distro
    Ubuntu

    Re: Hide Unmounted Partitions

    Quote Originally Posted by Morbius1 View Post
    Good lord,

    sudo mkdir /Windows/sda2
    sudo mkdir /Windows/sda3

    Add the following lines in /etc/fstab:
    /dev/sda2 /Windows/sda2 ntfs defaults,umask=777 0 0
    /dev/sda3 /Windows/sda3 ntfs defaults,umask=777 0 0

    It won't show up under "Places" in nautilus, it won't show up on the desktop, and with umask=777 not even root will be able to touch it.

    Badda - Bing.

    You got me on the floppy. Don't put a floppy in it would be my first suggestion.
    How do you add the lines in /etc/fstab Sorry I'm a noob at this lol. I've been trying to do this forever.

  2. #12
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Hide Unmounted Partitions

    Quote Originally Posted by Morbius1 View Post

    Add the following lines in /etc/fstab:
    Code:
    /dev/sda2 /Windows/sda2      ntfs    defaults,noauto,umask=777    0    0
    /dev/sda3 /Windows/sda3      ntfs    defaults,noauto,umask=777    0    0
    man fsck:
    noauto Can only be mounted explicitly (i.e., the -a option will not cause the file system to be mounted).
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  3. #13
    Join Date
    Oct 2009
    Location
    Brisbane
    Beans
    35
    Distro
    Ubuntu 11.04 Natty Narwhal

    Wink Re: Hide Unmounted Partitions

    mbudden you add the lines by typing in terminal:
    Code:
    sudo gedit /etc/fstab
    And dcstar, this is a question about how to hide certain partitions altogether in gnome/Ubuntu... not just to stop it from auto-mounting.

  4. #14
    Join Date
    Dec 2009
    Beans
    6,789

    Re: Hide Unmounted Partitions

    Quote:
    Originally Posted by
    Morbius1

    Add the following lines in /etc/fstab:
    Code:
    /dev/sda2 /Windows/sda2 ntfs defaults,noauto,umask=777 0 0
    /dev/sda3 /Windows/sda3 ntfs defaults,noauto,umask=777 0 0
    man fsck:
    noauto Can only be mounted explicitly (i.e., the -a option will not cause the file system to be mounted).
    Quote Originally Posted by dcstar View Post
    man fsck:
    noauto Can only be mounted explicitly (i.e., the -a option will not cause the file system to be mounted).
    I'd appreciate it if you didn't quote me with your modifications, If I had wanted the noauto option I would have placed it there myself.

    Akavashi,

    Not to be nit pickey but I'd recommend gksu gedit /etc/fstab

    sudo for command line
    gksu for GUI applications

    It's not that it won't work, it's just that I have experienced bad things when using sudo with GUI apps.

  5. #15
    Join Date
    Oct 2009
    Location
    Brisbane
    Beans
    35
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Hide Unmounted Partitions

    lol ah k, sorry about that, I've never been in the habit of using gksu... Cheers for the tip, I'll remember that
    Turns out you learn heaps of new things every day when using Ubuntu

  6. #16
    Join Date
    Oct 2009
    Location
    Brisbane
    Beans
    35
    Distro
    Ubuntu 11.04 Natty Narwhal

    Talking Re: Hide Unmounted Partitions

    So in the final days of this thread, I reinstalled Ubuntu again with all of the windows partitions hidden using Morbius1's neat little post:
    (Edited, 'cause mkdir doesn't handle linked directories, only makes single directories at a time)

    Quote Originally Posted by Morbius1 View Post
    cd /
    sudo mkdir /Windows
    cd /Windows
    sudo mkdir sda2
    sudo mkdir sda3

    then

    gksu gedit /etc/fstab

    Add the following lines in /etc/fstab:
    /dev/sda2 /Windows/sda2 ntfs defaults,umask=777 0 0
    /dev/sda3 /Windows/sda3 ntfs defaults,umask=777 0 0

    It won't show up under "Places" in nautilus, it won't show up on the desktop, and with umask=777 not even root will be able to touch it.
    Just remember that you change sda2 and sda3 according to how your partitions are set up, and for the Floppy... I just used the grotty devicekit way... *vomits*
    Go to /etc/udev/rules.d/ and make a blank file named "hidden-floppy.rules"
    and enter in this code into the file, and save:
    Code:
    ACTION!="add|change", GOTO="hide_partitions_end"
    SUBSYSTEM!="block", GOTO="hide_partitions_end"
    KERNEL=="loop*|ram*", GOTO="hide_partitions_end"
    
    ################################################## ############################
    
    # Floppy Drive which should not display
    KERNEL=="fd0", ENV{ID_DRIVE_FLOPPY}="1", ENV{DKD_PRESENTATION_HIDE}="1"
    
    ################################################## ############################
    
    LABEL="hide_partitions_end"

    Thanks to Ezanium and Morbius1 for all of their help with this problem

  7. #17
    Join Date
    Dec 2009
    Beans
    6,789

    Re: Hide Unmounted Partitions

    (Edited, 'cause mkdir doesn't handle linked directories, only makes single directories at a time)
    Quite right. Appreciate the correction. I always create the /Windows directory during an initial install and then add mount points at a later date after I decide how I want to mount them. I got sloppy again

  8. #18
    Join Date
    Oct 2009
    Location
    Brisbane
    Beans
    35
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Hide Unmounted Partitions

    Haha, no worries mate! Pretty sure I gave out dodgey advice with the mix up between sudo and gksu anyway, so I appreciate your help too.

  9. #19
    Join Date
    Jul 2005
    Beans
    740
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Hide Unmounted Partitions

    Using this
    sudo gedit /etc/udev/rules.d/hide-partitions.rules
    was working fine in Karmic, but in Lucid it is not

    Edit:
    in Lucid DKD_PRESENTATION_HIDE was changed to
    UDISKS_PRESENTATION_HIDE

    http://fedoraforum.org/forum/showthread.php?t=250263

    It is all working now when using UDISKS_PRESENTATION_HIDE
    Last edited by pt123; August 28th, 2010 at 01:50 AM. Reason: found the solution

  10. #20
    Join Date
    Aug 2006
    Beans
    13,354
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Hide Unmounted Partitions

    The 'udev rule' method works well with all the *buntus. Here is an example:
    ACTION!="add|change", GOTO="hide_partitions_end"
    SUBSYSTEM!="block", GOTO="hide_partitions_end"
    KERNEL=="loop*|ram*", GOTO="hide_partitions_end"

    ################################################## ############################

    # Let's hide sda1 and sda3
    KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"
    KERNEL=="sda3", ENV{UDISKS_PRESENTATION_HIDE}="1"

    ################################################## ############################

    LABEL="hide_partitions_end"

Page 2 of 3 FirstFirst 123 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
  •