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

Thread: Hide drives / partitions in nautilus places.

  1. #11
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Hide drives / partitions in nautilus places.

    hi
    have a look at: man udev ( if you want to realy hide your partitions )
    hide unmounted partitions:
    create a file under /etc/udev/rules.d/
    own rule: /etc/udev/rules.d/hide-partitions.rules
    # you can just hide partitions and devices etc directly through their partition mount location (eg /dev/sda*)
    # It does hide my two partitions (52 GB Filesystem, System Reserved) and
    # the floppy drive... just also the DVD drive.!!!!!!!!.. :/
    # we only care about block devices

    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"

    # Partition sda2 that we want to hide from gnome
    KERNEL=="sda2", ENV{DKD_PRESENTATION_HIDE}="1"

    # Partition sda3 that we want to hide from gnome
    KERNEL=="sda3", ENV{DKD_PRESENTATION_HIDE}="1"

    LABEL="hide_partitions_end"

    is it that what you are looking for ?
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  2. #12
    Join Date
    Dec 2004
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Hide drives / partitions in nautilus places.

    Interesting. That seems like a rather sensible approach. Unfortunately I am currently short a testing installation.

    I'll try this when I'm back from the weekend. But so far the solution with mountpoints outside of /media works. Marking as solved.

  3. #13
    Join Date
    Feb 2006
    Location
    North Dakota
    Beans
    224
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Hide drives / partitions in nautilus places.

    Quote Originally Posted by rnerwein View Post
    hi
    have a look at: man udev ( if you want to realy hide your partitions )
    hide unmounted partitions:
    create a file under /etc/udev/rules.d/
    own rule: /etc/udev/rules.d/hide-partitions.rules

    ...

    is it that what you are looking for ?
    ciao
    What does that even do? I looked at man udev and there's no mention of DKD_PRESENTATION_HIDE. Does this only prevent the devices from showing in Nautilus Places, or does it do something like remove the /dev/sda2 entry from showing, preventing it from being mounted or manipulated with tools like dd at all?
    Search first, ask questions later!
    From Thread Tools, "Mark this thread as solved" if your problem's been solved.

  4. #14
    Join Date
    Jun 2008
    Beans
    28

    Re: Hide drives / partitions in nautilus places.

    Hi, I'm an fairly new Ubuntu user and would like to hide my other partitions too. However, I'm unfamiliar with how to "add" drives to fstab. In fact, I don't even know what fstab is =/. If someone is able to give me a quick walk through how to do this, it would be appreciated a whole lot.

    Thanks in advance,
    Danny

  5. #15
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Hide drives / partitions in nautilus places.

    Danny,

    Do the partitions automatically mount when Ubuntu loads up? Do you want these drives hidden, or hidden and simply not used at all?

  6. #16
    Join Date
    Jun 2008
    Beans
    28

    Re: Hide drives / partitions in nautilus places.

    Well, originally they didn't automatically mount, but after reading a dual boot (7 and Ubuntu) tutorial online, I downloaded something called "NTFS Configuration Tool" and now all partitions automatically mount. Also, it's probably important I tell you: I'm unable to unmount the partitions I don't want to use without using sudo nautilus.

    As for your second question: The partitions being either hidden, or "hidden-completely-without-any-availability-at-all" would be fine. I don't believe I'll ever need to access that part of my drive from Ubuntu. Thank you again in advance, I really do appreciate any help I can get!

    Danny

  7. #17
    Join Date
    Feb 2006
    Location
    North Dakota
    Beans
    224
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Hide drives / partitions in nautilus places.

    Quote Originally Posted by dtach View Post
    Well, originally they didn't automatically mount, but after reading a dual boot (7 and Ubuntu) tutorial online, I downloaded something called "NTFS Configuration Tool" and now all partitions automatically mount. Also, it's probably important I tell you: I'm unable to unmount the partitions I don't want to use without using sudo nautilus.
    Code:
    $ sudo gedit /etc/fstab
    I expect you'll see something like this:

    Code:
    /dev/sda3  /             ext4    relatime,errors=remount-ro 1 1
    //dev/sda5 /home         ext3    relatime,errors=remount-ro 0 2
    /dev/sda1  /mnt/Windows  ntfs3g  errors=remount-ro          0 2
    /dev/sda6  none         swap     sw
    /dev/sda2  /boot         ext3    relatime,errors=remount-ro 0 1
    Put a # in front of the NTFS lines to comment them. On next reboot, they shouldn't be mounted automatically. You could also try something like ",noauto" on the end of the options line, though this might make them show up in nautilus as unmounted.
    Search first, ask questions later!
    From Thread Tools, "Mark this thread as solved" if your problem's been solved.

  8. #18
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Hide drives / partitions in nautilus places.

    Ok dokes, could you please post your /etc/fstab file?

  9. #19
    Join Date
    Jun 2008
    Beans
    28

    Re: Hide drives / partitions in nautilus places.

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>

    proc /proc proc nodev,noexec,nosuid 0 0
    #Entry for /dev/sda3 :
    UUID=052a5338-47c3-4224-9120-9c078962c42e / ext3 errors=remount-ro 0 1
    #Entry for /dev/sda4 :
    UUID=116F76BF59B32A05 /media/Storage ntfs-3g defaults,nosuid,nodev,locale=en_US.utf8 0 0



    I want to keep the "storage" part of the drive, and bobpaul-- i dont think the other partitions are not showing up on here

  10. #20
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Hide drives / partitions in nautilus places.

    Quote Originally Posted by dtach View Post
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>

    proc /proc proc nodev,noexec,nosuid 0 0
    #Entry for /dev/sda3 :
    UUID=052a5338-47c3-4224-9120-9c078962c42e / ext3 errors=remount-ro 0 1
    #Entry for /dev/sda4 :
    UUID=116F76BF59B32A05 /media/Storage ntfs-3g defaults,nosuid,nodev,locale=en_US.utf8 0 0

    Easiest thing to do, is to add the partitions you don't want to see, and set their mount point to be /mnt (linux's standard mount directory). Unless something is mounted in /media, it won't automatically show up in the nautilus bar. For example:

    Code:
    /dev/sda4     /mnt/mypartition    ntfs-3g	defaults,nosuid,nodev,locale=en_US.utf8	0	0
    You'll need to make sure that mount point exists first:

    Code:
    sudo mkdir /mnt/mypartition
    Note that you don't need to use UUIDs for partitions, but it can sometimes be handy; I only use them for removable media or in machines where I'll change the partitions.

    Once done, you can test the changes with:

    Code:
    sudo mount -a

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
  •