11.2 partition isolation issue

I’m new to 11.2, coming from 10.1 (and other distros going back to RH5 in '98), and I have noticed (another) undesirable feature. Partitions which are not in fstab appear in Dolphin as “Volumes”. I multiboot and have always maintained strict isolation of partitions from other OSs to the extent that I do Custom Partitioning during Installation to “try” to enforce that isolation. Is there a way to remove 11.2’s awareness of the partitions/volumes that it shouldn’t be aware of?

I noticed the same. Those partitions, on purpose NOT mounted by the sytem manager (by NOT putting them in /etc/fstab) are nevertheless shown by Dolphin to the innocent end-user.
Then when that end user clicks on it, (s)he gets the message that the partition can only be mounted by root. Which is of course very true, but it is frustrating for that end-user.
Why is it shown when it can not (and should not) be used.

This comes under the category of saving you from yourself. Not sure if this will work, but it looks like something to try: First, you can’t really hide anything from a program like GPARTED or openSUSE’s Partitioner, but perhaps you can in other places. You need to know the logical name for the partition like sda2; run the following command to find out the name(s) for the partition you wish to disappear.

ls -l /dev/sd*

To create a rule to hide say sda2, create a file called /etc/udev/rules.d/hide–partitions.rules and include the following text:

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"

If you use KDE, you could use this command to create the file:

kdesu kwrite /etc/udev/rules.d/hide--partitions.rules

Reboot to see if this took effect.

Thank You,

That is something one can do. But imho it goes a bit to far. Not speaking for the OP (I hope we get his comment also), my idea is that this not mounted partition should not be offered to the end-user as a possibility to look for files in such an end-user file manager like Dolphin. It is not my intention that such a partition should be hidden from those who (know to) manage the system (in fact: root). Thus tools like YaST > System > Partitioner and fdisk are not where I am after. Like the OP, I never saw such behaviour before (that was Konqui as file manager in KDE 3.5).

In fact I am not convinced that I understand the function of the panel called Places/Locations in Dolphin (where this not available partition is shown).

Thanks for the suggestion, James. But doesn’t that shoot me in the foot for when I WANT to access the partitions? What I have done in the past is to manually mount them as root when they are needed. My concern here is Linux (or KDE) automatically usurping my authority as the root human. I object to any computer program automatically doing ANYTHING with a partition if doesn’t own. (Once had to rebuild the partition table by hand with a hex editor when a bug in a disk driver trashed it - NEVER again.)

I do not know what will be done, it is shown and when the end-user clicks, it asks for the root password to mount it. As the end-user normaly does not know this, you, as root, are save.
But I never trusted this mechanism enough to type the root password (I happen to wear two caps on the system, being normaly the end-user, but also the system manager). Thus I have no idea if it asks for a mount point, or just mounts it god knows where and which what parameters.

Thanks for the suggestion, James. But doesn’t that shoot me in the foot for when I WANT to access the partitions? What I have done in the past is to manually mount them as root when they are needed. My concern here is Linux (or KDE) automatically usurping my authority as the root human. I object to any computer program automatically doing ANYTHING with a partition if doesn’t own. (Once had to rebuild the partition table by hand with a hex editor when a bug in a disk driver trashed it - NEVER again.)
I can only say that I do not switch to root unless I need to and only the partitions that are mounted in my fstab are used. I can plug in a USB drive and work with it without using the root user password and perhaps this is what is wrong, but I am not sure how to fix that, though I don’t wish to change how it works. I do hope you find what you are looking for.

Thank You,

Maybe you did not get the correct picture before your eyes. That is not that strange because a lot of systems will not have this. Think of my system as an example:

I have one Swap partition, one partition for /home and TWO partitions for /. Thus I can install a new version on one of those while the current version is still on the other one. Needless to say in normal day to day running only one of those two partitions is mounted on / and the other one is not used at all. Thus:

boven:~ # fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1549f232

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         262     2104483+  82  Linux swap / Solaris
/dev/sda2             263        2873    20972857+  83  Linux
/dev/sda3            2874       15000    97410127+  83  Linux
/dev/sda4   *       15001       38913   192081172+   f  W95 Ext'd (LBA)
/dev/sda5           15001       17611    20972826   83  Linux
boven:~ #

and

boven:~ # cat /etc/fstab
/dev/disk/by-id/ata-Hitachi_HDT725032VLA380_VFJ201R23XUEXW-part5 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-Hitachi_HDT725032VLA380_VFJ201R23XUEXW-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-Hitachi_HDT725032VLA380_VFJ201R23XUEXW-part3 /home                ext3       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
#/dev/disk/by-id/ata-Hitachi_HDT725032VLA380_VFJ201R23XUEXW-part2 /mnt/oldroot         ext3       ro,acl                1 2
boven:~ #

where you see in the last line that I have a prepared entry for this partition that still holds the 10.3 system. This (still) ext3 prtition has a label System_A.

Now this is from the system Managers point of view.

But we have one or more end-users on this system. And when they run KDE with Dolphin as file manager they see at the left a panel called Places and there they will see a certain System_A. And the OP and I think that that is none of their bussiness! And to repeat what I explained earlier, when they click on that System_A it opens a window telling them that they need root privileges to mount it, and are asked for the root password, which they (happily) do not know. We think that that is very embarassing for them.

On 2010-12-26 17:06, nospam990 wrote:

> Is there a way to remove 11.2’s awareness of
> the partitions/volumes that it shouldn’t be aware of?

I define all partitions in fstab, and put those that should not be mounted
as “noauto”.

But yes, all desktop should have a global setting (by root) to make them
ignore partitions.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Well, putting a # before the line is easier then adding the noauto. And I am from the days (long ago) that every key to press was one to much (therefore the lot of two letter commands there are).

But I doubt that using noauto will teach Dolphin to behave >:(

First of all, dolphin doesn’t care about /etc/fstab. If it would (as it should!), the solution would just be as easy as commenting out lines in that files. I have no name to qualify such “features” of those filemanagers … maybe stupid, unacceptable, windowish, total nonsense. Twenty years ago we used to say that there was no decent filemanager for Unix (except maybe the Midnight Commander) … and this hasn’t changed. Dolphin, nautilus, Thunar and others are all pieces od the same kind of … whatever you can figure out … and all suffer from the Windows syndrom: making the user interface as friendly as possible and automounting, autoshowing, autoKISSing as many things as possible.

It is not limited to filemanagers though but also affect open/save dialogs of any program using more or less directly the hal and udev daemons. In the case of dolphin it appears to be - still - a hal issue. The solution suggested by jdmcdaniel3 in post #3 or a similar one involving user defined udev rules should in theory (or would eventually) work. Unfortunately it does not as today because too many programs still rely on the hal daemon.

An appropriate hal policy might help in some cases - although I have read people complainig that it didn’t work for them …

Here’s a screenshot of what I would ‘normally’ see in dolphin without the help of some extra hal policies - I took a screenshot of taking a screenshot because it was just hilarious. Where should I save this file?

http://img819.imageshack.us/img819/5641/dolphin1i.th.jpg](http://img819.imageshack.us/img819/5641/dolphin1i.jpg)

Now here’s which partitions dolphin shows after

  • closing it
  • writing the file /etc/hal/fdi/policy/preferences.fdi
    with the following content:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
    <!-- hide ufs partitions -->
    <match key="volume.fstype" string="ufs">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>
</deviceinfo>

  • restarting the hal daemon:
service haldaemeon restart
  • finally reopening dophin

http://img813.imageshack.us/img813/6108/dolphin2.th.jpg](http://img813.imageshack.us/img813/6108/dolphin2.jpg)

This policy made dolphin ignore all these ufs partitions. Again, it has nothing to do with /etc/fstab, the end of which you can see on that picture too.

Now, as it doesn’t still look clean enough, let’s hide some other non openSUSE Linux partitions (logically in this example, FED means Fedora, UBU means UBUNTU, DEB means Debian and GEN means Gentoo). This can be achieved with the following /etc/hal/fdi/policy/preferences.fdi:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
<device>
     <!-- hide ufs partitions -->
    <match key="volume.fstype" string="ufs">
        <merge key="volume.ignore" type="bool">true</merge>
    </match>
    <!-- hide Debian partitions -->
    <match key="volume.label" string_outof="DEB_ROOT;DEB_USR;DEB_VAR;DEB_LOCAL">
      <merge key="volume.ignore" type="bool">true</merge>
    </match>
    <!-- hide Ubuntu partitions -->
    <match key="volume.label" string_outof="UBU_ROOT;UBU_USR;UBU_VAR;UBU_LOCAL">
      <merge key="volume.ignore" type="bool">true</merge>
    </match>
    <!-- hide Fedora partitions -->
    <match key="volume.label" string_outof="FED_ROOT;FED_USR;FED_VAR;FED_LOCAL">
      <merge key="volume.ignore" type="bool">true</merge>
    </match>
    <!-- hide Gentoo partitions -->
    <match key="volume.label" string_outof="GEN_ROOT;GEN_USR;GEN_VAR;GEN_LOCAL">
      <merge key="volume.ignore" type="bool">true</merge>
    </match>
</device>
</deviceinfo>

Now there are all gone from dolphin’s left pane. But to illustrate that it has nothing to do with /etc/fstab and whatever partitions are really mounted, I also mounted my Fedora partitions, that I could of course browse with dolphin (if ever I would happend to use it - chances are low though.)

http://img443.imageshack.us/img443/1033/dolphin3.th.jpg](http://img443.imageshack.us/img443/1033/dolphin3.jpg)

Your descriptions and solutions are outstanding as usual please_try_again. I must say that I am not sure you really need a color monitor though. A green filter over the front might do the same thing. Back in the olden days we used to have green screen monitors, that could almost look the same. Ah, just joshin you please_try_again. lol!

Thank You,

@please_try_again.

Excelent illustration!
Now I never thought that Dolphin looked at /etc/fstab. I mentioned the commented out entry there only as a clarification of it’s existence (I hate obfuscating computer output when showing it here, in general it will often lead to hiding the problem that must be found). Then Carlos pointed to the fact that noauto had a similar (but for me not the same) effect of an entry not being used at boot. It was (and I think Carlos will admit this) more or less off topic and realy leading away from the subject.

I am realy pleased by your:

I have no name to qualify such “features” of those filemanagers … maybe stupid, unacceptable, windowish, total nonsense. Twenty years ago we used to say that there was no decent filemanager for Unix (except maybe the Midnight Commander) … and this hasn’t changed. Dolphin, nautilus, Thunar and others are all pieces od the same kind of … whatever you can figure out … and all suffer from the Windows syndrom: making the user interface as friendly as possible and automounting, autoshowing, autoKISSing as many things as possible.

It expresses my feelings very good. I tried to say something similar above:

In fact I am not convinced that I understand the function of the panel called Places/Locations in Dolphin (where this not available partition is shown).

Partitions must not be shown by an end-user tool to an end-user. The system manager/administrator has configured the syystem to mount them (or not) at a proper place end the end-user walks through the directory tree and wil cross the partition boundaries without knowing. That is where an Operating System is for: hiding away the hardware from the user.

And to please_try_again’s solution. While it works without doubt, I think it is no practical solution. Everytime that I on some system create/change/remove a partition that is not to be mounted at normal day to day running, I have to create/change/remove such a policy file. And what is done then? I assume that even no device special files are created or am I wrong here? When no device spcial files are created this is a nono. The system manager must be able to do something with those partitions, think of a quick mount - look at a 10.3 config file - unmount sequence.

No the error (design error, no doubt advertised as a feature) is in Dolphin. And I have given up on these sorts of things ever being handled in a Unix/Linux way. Were it not for the OP’s start of this thread, I wouldn’t even have posted about it.

Well, against such “features”, there is no solution but only more or less clever and efficient workarounds. After having a closer look at hal specs, I finally wrote a more generic policy, which seems to work fine under dolphin (which definitely still uses hal) but has no effect on nautilus (which probably needs a udev rule). It is intended to hide any not mounted partition. In fact, it just hides all partitions on non removable disks that have not to appear in a filemanager. The user needs to see directories and not hard disk partitions. (Notice that HAL actually means Hardware Abstraction Layer!)

The /etc/hal/fdi/policy/preferences.fdi below should work as long as dolphin uses hal (probably not very long).


<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
  <!-- hide not mounted partitions on non removable disks -->
  <match key="@info.parent:storage.removable" bool="false">
    <match key="volume.is_partition" bool="true">
      <match key="volume.is_mounted" bool="false">
        <merge key="volume.ignore" type="bool">true</merge>
      </match>
    </match>
  </match>
</device>
</deviceinfo>

I understand the logic of the match rules. But may I ask what it does with the answer? If I understand correctly, it sets volume.ignore to true. But where is this stored and who (besides Dophin interpretes this?

BTW about the test on volume.is_mounted. I see that Dokphin does NOT show mounted partitions in Places. That is, on my system, it shows / (with something that translates as Main Folder :frowning: ), but I have a separate /home which is not shown.
This gives me the idea that the test about being mounted can be omitted.

And that panel Places also show somehing like Network??? Should that look if my eth0 is up???

On 2010-12-26 23:36, hcvv wrote:
>
> robin_listas;2270472 Wrote:

>> I define all partitions in fstab, and put those that should not be
>> mounted
>> as “noauto”.

> Well, putting a # before the line is easier then adding the noauto.

No, it doesn’t. A line commented out does not exist, for all effects. I want to inform the system
that I don’t want the partition on boot, but that I may want to do it myself, manually.

> But I doubt that using noauto will teach Dolphin to behave >:(

It does tell nautilus to behave. I know because I reported those problems in Bugzilla and were
corrected through the years: in gnome listed no auto partitions are not mounted and not shown. At
least in my computer.

I do not know how dolphin behaves in that situation, I just assumed it would.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))

I am very well aware about the difference between commenting out and usiing the noauto parameter. And when I comment it out, I want the system not to interprete it at all. I do not give the System Manager then the opportunity to mount it in an easy way because I want it like that. I keep it there only as a reminder to me (not to the system) how I used it last time. I am sorry that I made the little joke about the number of keys to type instead of pointing out that I choose delibratly between the several possibilities available.

The fact that several of these “file manager” tools handle these unmounted partitions different makes the situation even worse. One looks to the partitions available (using something like fdisk -l or HAL), the next looks in the fstab without looking at the the noauto. the third looks at the fstab and ignores the noaouto ones (even when they are mounted by hand or not?) and another one looks at what is mounted. It is a mess.

Yes, it sets volume.ignore to true. The value is stored in the hal properties of this volume and passed to the applications (Dolphin among others) through the message bus. That’s how (actually the hal way) you would hide partitions from filemanagers using hal.

That’s right. This match rule doesn’t add anything. So the following policy does it too:


<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
        <!-- hide not mounted partitions on non removable disks -->
        <match key="@info.parent:storage.removable" bool="false">
                <match key="volume.is_partition" bool="true">
                        <merge key="volume.ignore" type="bool">true</merge>
                </match>
        </match>
</device>
</deviceinfo>

Nope. It’s not about your nic. I don’t think hal can tell if it’s up as it is not in the hardware layer, but it stores the MAC address:

for nic in $(lshal -s | grep '^net'  | sed '/loopback/d;/00_27_00_00/d;s|^|/org/freedesktop/Hal/devices/|') ; do
	echo $(hal-get-property --udi $nic --key net.interface) ":" $(hal-get-property --udi $nic --key net.address) 
done

Actually I wanted to skip hal and wait until it dies. I hid my Unix partitions with a volume.fstype match rule. But this thread reminds me how annoying it can be to see partitions anywhere around and finally inspired me a script to query the hal daemon about partitions properties : Displaying partitions infos from hal daemon

The hal specs are in the package hal-doc.

Well, you have realy ventured deep into HAL.

I am afraid that even when HAL disappears, this behaviour of showing the wrong things in File managers and the like will continue, because the designers of these software tools took the decission that it is a feature to show these partitions. Thus they will find ways to continue this in spite of HAL disappearing.

To the OP @nospam999 (if (s)he is still following this thread): It seems that you have some supporters in your idea that these partitions should not be shown to end-users. I am however afraid that the Windows way of having things has crept to much into the minds of those who make tools like Dolphin and thus there is almost no chance to have this changed.

You have also seen that there are ways to get what you want, but they keep your constant attention to keep things up-to-date and will most certainly have to be changed in future levels of the tools as they adapt their non-features to new ways of working.