Page 6 of 6 FirstFirst ... 456
Results 51 to 59 of 59

Thread: How to hide partitions from Places menu..

  1. #51
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to hide partitions from Places menu..

    Code:
    karthick@Ubuntu-desktop:~$ cat /etc/fstab
    # /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/sda7 :
    UUID=ea6bb1fd-65fd-42f8-aa64-4a591993fe3b  /            ext4,acl  errors=remount-ro      0  1  
    #Entry for /dev/sda2 :
    UUID=16b8e005-ba37-4212-986f-0ecd20243003  /media/sda2  ext3      defaults               0  0  
    #Entry for /dev/sda5 :
    UUID=B630D52430D4EC7D                      /media/sda5  ntfs-3g   defaults,locale=en_IN  0  0  
    #Entry for /dev/sda6 :
    UUID=D6E8DAE8E8DAC5C1                      /media/sda6  ntfs-3g   defaults,locale=en_IN  0  0  
    #Entry for /dev/sda8 :
    UUID=94f3a305-5cd8-4f4d-ba07-91c2a63d7498  none         swap      sw                     0  0
    For example i wanna hide sda5,wat you want me to do??

  2. #52
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to hide partitions from Places menu..

    Hi

    Post your rules file in /etc/udev/rules.d.

    What partitions are you trying to hide?

    EDIT: Sorry missed your last post's comment. Hold on.

    Kind regards.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  3. #53
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to hide partitions from Places menu..

    Hi

    Try this. You are using 10.04 or higher aren't you? Karmic and lower require a different idendifier. I.E. not UDISKS_PRESENTATION_HIDE

    Code:
    sudo nano /etc/udev/rules.d/hide-partitions.rules
    Enter password as per usual and copy and paste the code below into that file.

    Code:
    ACTION!="add|change", GOTO="hide_partition_end"
    SUBSYSTEM!="block", GOTO="hide_partition_end"
    KERNEL=="loop*|ram*", GOTO="hide_partition_end"
    
    KERNEL=="sda5", ENV{UDISKS_PRESENTATION_HIDE}="1"
    
    LABEL="hide_partition_end"
    Save the file and verify by typing
    Code:
    cat /etc/udev/rules.d/hide-partitions.rules
    Check the flie is correct.

    Next edit you fstab file

    sudo nano /etc/fstab

    Put a # in front of the line

    Code:
    UUID=B630D52430D4EC7D                      /media/sda5  ntfs-3g   defaults,locale=en_IN  0  0
    so it becomes

    Code:
    # UUID=B630D52430D4EC7D                      /media/sda5  ntfs-3g   defaults,locale=en_IN  0  0
    and save the file.

    Again
    Code:
    cat /etc/fstab
    to check the file.

    Assuming all is well, reboot you PC. Then, hopefully, sda5 will not appear. This is what i did and it worked for me.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  4. #54
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to hide partitions from Places menu..

    Hi

    On my machine...

    sudo blkid

    Code:
    /dev/sda1: LABEL="System_restore_win7" UUID="DAA41C49A41C2B11" TYPE="ntfs" 
    /dev/sda2: LABEL="Windows_7_boot" UUID="921C18621C18441F" TYPE="ntfs" 
    /dev/sda3: LABEL="Windows_7" UUID="A2984D43984D1767" TYPE="ntfs" 
    /dev/sda5: LABEL="Ubuntu_10.04" UUID="3d48429c-7361-4ab8-8689-54407673b141" TYPE="ext4" 
    /dev/sda6: UUID="b1c6171a-075e-4291-af69-64baf751d10e" TYPE="swap" 
    /dev/sda7: LABEL="OpenSuse" UUID="56a4c951-b189-45cb-91e6-76c83b765044" TYPE="ext4" 
    /dev/sda8: LABEL="natty" UUID="fb661c9e-e56a-413b-bef4-dc2e0db8c0b1" TYPE="ext4" 
    /dev/sda9: LABEL="Fedora-14" UUID="3d35b416-3b1b-467d-892c-ac2095c0ab18" TYPE="ext4" 
    /dev/sda10: LABEL="Arch_Linux" UUID="6aa72302-2b4f-432c-953a-33c7513bfa47" TYPE="ext4" 
    /dev/sda11: UUID="926199d8-a8a5-4ae0-9014-e7ae790187a9" TYPE="ext4" 
    /dev/sda12: UUID="ef9ae3cc-e084-4664-bf0e-ae9bac39dace" TYPE="ext4" 
    /dev/sda13: UUID="f8dc5390-f494-4963-95ee-c27ecbf4fea1" TYPE="ext4"
    My rule

    cat /etc/udev/rules.d/hide--partitions.rules

    Code:
    ACTION!="add|change", GOTO="hide_partition_end"
    SUBSYSTEM!="block", GOTO="hide_partition_end"
    KERNEL=="loop*|ram*", GOTO="hide_partition_end"
    
    KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"
    
    LABEL="hide_partition_end"
    sda2 is my windows boot partition, as can be seen from blkid and the partition label.

    Below is a screen shot of my menu. As you can see, sda2 or window_7_boot it is not under places. If i remove the rule it is displayed under places

    Kind regards
    Attached Images Attached Images
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  5. #55
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to hide partitions from Places menu..

    That worked like a charm Thank you matt_symes.

  6. #56
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to hide partitions from Places menu..

    Hi

    ... and here is a screen shot with the rule removed.

    matthew@matthew-laptop:~$ ls -a /etc/udev/rules.d/
    . .. 70-persistent-cd.rules 70-persistent-net.rules README
    matthew@matthew-laptop:~$

    screen shot below. I hope it answers some of the questions about menu behaviour.

    Kind regards
    Attached Images Attached Images
    Last edited by matt_symes; December 12th, 2010 at 07:40 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  7. #57
    Join Date
    Mar 2010
    Location
    /home
    Beans
    9,426
    Distro
    Xubuntu

    Re: How to hide partitions from Places menu..

    Excellent stuff matt_symes

    But an awfully complicated way to go about editing the Places menu!

    Shouldn't this be made easier, especially for new users?

  8. #58
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to hide partitions from Places menu..

    Shouldn't this be made easier, especially for new users?
    Definitely!!!! Might make a nice project for someone.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  9. #59
    Join Date
    Jul 2007
    Beans
    78

    Re: How to hide partitions from Places menu..

    thanks a lot... I also was searching for this...

Page 6 of 6 FirstFirst ... 456

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
  •