Author Topic: anothr hal-mtab query? (solved)  (Read 1589 times)

Offline Jankers

  • Full Member
  • ***
  • Posts: 145
anothr hal-mtab query? (solved)
« on: February 12, 2010, 07:42:49 AM »
On making the latest install onto a new system i put PCLos minime onto a new sata drive.
Whilst doing so i created two new partitiions, "data" and "backup", both using the live-cd install screen.

Now, when i boot, i find both drives appear as mounted and the only way i have to unmount is to do so via PCC. This lasts for the session only, once rebooted i am back to square one.

fsab
# Entry for /dev/sda1 :MiniMe
UUID=174e7320-7ae2-479e-87e9-f482345a53ad / ext3 defaults 1 1
# Entry for /dev/sda7 :Backup
LABEL=backup /backup ext3 relatime 1 2
# Entry for /dev/sda5 :Data
UUID=bc33e967-7133-44bc-9973-5ec21e2f1ec5 /data ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
# Entry for /dev/hdb6 :Home
UUID=4db808f4-a6d2-538b-acf3-01354f7d578e /home ext3 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/hda5 :TMP
UUID=501bf9e4-3610-4ca5-ad32-13fde0e16ea8 /tmp ext3 defaults 1 2
# Entry for /dev/hdb7 :Swap
UUID=0047ffe1-b41c-40db-b34d-d3580c4b9296 swap swap defaults 0 0

(the additional labels,eg "minime", "backup", in the hash lines were put in by me later)

/dev/disk entry ("by-label)
file:///dev/disk/by-label/backup
file:///dev/disk/by-label/data
file:///dev/disk/by-label/home
file:///dev/disk/by-label/linux64
file:///dev/disk/by-label/MiniMe
file:///dev/disk/by-label/Open_Suse
file:///dev/disk/by-label/TMP
file:///dev/disk/by-label/WimXP

mtab
/dev/sda1 / ext3 rw 0 0
none /proc proc rw 0 0
none /dev/pts devpts rw,mode=0620 0 0
/dev/sda7 /backup ext3 rw,relatime 0 0
/dev/sda5 /data ext3 rw 0 0
/dev/hdb6 /home ext3 rw 0 0
/dev/hda5 /tmp ext3 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
none /sys/fs/fuse/connections fusectl rw 0 0


media
file:///media/backup
file:///media/cdrom
file:///media/data
(all are empty, the data and backup entries were put in via "mkdir" in an attempt to solve the problem)

Right clicking as  "user" produces the following error message,

"Unfortunately, the device system:/media/sda7 (/dev/sda7) named 'backup' and currently mounted at /backup could not be unmounted.
Unmounting failed due to the following error:
Device to unmount is not in /media/.hal-mtab so it is not mounted by HAL"


 changing to "root" via the "switch user" tab in the kicker start button produces the same result.

Can anyone suggest a means to get rid of this annoying behaviour?

Other actors which may have a bearing are the new system, i have no previous knowlege of Sata, the setup has one sata drive and the two(now much changed) ide drives, the cdrom is a new sata and is the only rom device.
The system is now an AMD 64 bit job; changed from an old 32 bit Athlon.

Any guidance greatly appreciated.

J.


edit  Just tried "umount -f" , still the same; removal is not persistent.
« Last Edit: February 12, 2010, 11:52:58 AM by Jankers »

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6475
  • I'm going South
Re: anothr hal-mtab query?
« Reply #1 on: February 12, 2010, 09:28:00 AM »
If you want your data and backup partitions to be mounted by HAL, comment out their lines in /etc/fstab. (Put a hash mark, #, in front of them.) Then remove the directories /media/data and /media/backup -- when needed, they will be recreated automatically by HAL.

But if you want to keep your mountpoints /data and /backup (instead of /media/data and /media/backup), keep the lines in fstab uncommented, but edit them so that you add ,noauto to the option field. They could look like this:

LABEL=backup  /backup  ext3  users,relatime,noauto  1  2
LABEL=data  /data  ext3  users,noauto  1  2


(If UUID=bc33e967-7133-44bc-9973-5ec21e2f1ec5 really is labelled "data".)

In this case the partitions will not be mounted automatically, and anybody will be able to unmount them.

(You could also let HAL handle the mounting and create /data and /backup as symlinks pointing to /media/data and /media/backup.)
« Last Edit: February 12, 2010, 09:44:18 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Jankers

  • Full Member
  • ***
  • Posts: 145
Re: anothr hal-mtab query? (solved)
« Reply #2 on: February 12, 2010, 11:52:00 AM »
Blackbird,
Quote
But if you want to keep your mountpoints /data and /backup (instead of /media/data and /media/backup), keep the lines in fstab uncommented, but edit them so that you add ,noauto to the option field. They could look like this:

LABEL=backup  /backup  ext3  users,relatime,noauto  1  2
LABEL=data  /data  ext3  users,noauto  1  2

(If UUID=bc33e967-7133-44bc-9973-5ec21e2f1ec5 really is labelled "data".)

In this case the partitions will not be mounted automatically, and anybody will be able to unmount them.

This shows the partitions as unmounted upon reboot, but user cannot access; error message "access denied", either from the desktop or Konq. I did not test it as root.

Have gone with your first suggestion and left Hal to deal with it; it works a treat. ;D

Many thanks.
J.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6475
  • I'm going South
Re: anothr hal-mtab query? (solved)
« Reply #3 on: February 12, 2010, 12:38:58 PM »
This shows the partitions as unmounted upon reboot, but user cannot access; error message "access denied", either from the desktop or Konq. I did not test it as root.

This is probably just related to the permissions and ownership of the mountpoints. (You must have been root when you created them as they aren't in your home directory.) But you chose a good alternative:

Quote
Have gone with your first suggestion and left Hal to deal with it; it works a treat. ;D

Many thanks.
J.

 ;D ;D
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Jankers

  • Full Member
  • ***
  • Posts: 145
Re: anothr hal-mtab query? (solved)
« Reply #4 on: February 14, 2010, 12:50:54 AM »
Blackbird,

Aye, i did create them as root and also tried to change the permissions using "chown".
I could not get  the correct syntax for the chown command which led me to the original post.

I am quite happy for hal to do it though. 8)

Thanks again.
J.



Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: anothr hal-mtab query? (solved)
« Reply #5 on: February 14, 2010, 02:38:37 AM »
Blackbird,

Aye, i did create them as root and also tried to change the permissions using "chown".
I could not get  the correct syntax for the chown command which led me to the original post.

I am quite happy for hal to do it though. 8)

Thanks again.
J.


You have to do the chown command as root, as root is the current owner of the partitions. The partitions must first be mounted, then the proper syntax is;

[root@localhost ~]# chown -R <user>:<user> /<mount point>           <Enter>

Replace <user> with the user name you log in with, and <mount point> with whatever is appropriate.

Example:

[root@localhost ~]# chown -R Jankers:Jankers /backup

The entries for /etc/fstab that blackbird gave you need to be modified a bit. To be user mountable and writable you should have the strings;

LABEL=backup  /backup  ext3  user,rw,noauto,exec  0 0
LABEL=data  /data  ext3  user,rw,noauto,exec  0 0


The use of users would allow a second user to unmount a partition he did not mount, that someone else may still need mounted. Using user (without the s) means only the person that did the mount could subsequently unmount that partition.

Example:

From my /etc/fstab;

LABEL=storage00 /zstorage00 ext3 rw,user,noauto,exec 0 0
LABEL=120backup /zbackup ext3 rw,user,noauto,exec 0 0


Note that the order of the parameters makes no difference, but they must be comma separated with no spaces in between.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6475
  • I'm going South
Re: anothr hal-mtab query? (solved)
« Reply #6 on: February 14, 2010, 05:40:05 AM »
I must admit that adding rw and exec to the options field (as O-P) recommends is a good idea.

They are both default parameters, but for instance the users parameter that I suggested implies noexec, so you have to override it with an explicit exec if you want to be able to run binaries from the partition.
« Last Edit: February 14, 2010, 05:42:08 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D