Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 2006 15:18:07 -0700
From:      Sean McNeil <sean@mcneil.com>
To:        Joe Marcus Clarke <marcus@marcuscom.com>
Cc:        gnome@freebsd.org
Subject:   Re: HAL tutorial and rc.d scripts
Message-ID:  <1161123487.45372.22.camel@triton.mcneil.com>
In-Reply-To: <1161119012.23262.81.camel@shumai.marcuscom.com>
References:  <1161114358.3416.7.camel@triton.mcneil.com> <1161115290.23262.58.camel@shumai.marcuscom.com> <1161118407.10744.22.camel@triton.mcneil.com> <1161119012.23262.81.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2006-10-17 at 17:03 -0400, Joe Marcus Clarke wrote:
> On Tue, 2006-10-17 at 13:53 -0700, Sean McNeil wrote:
> > On Tue, 2006-10-17 at 16:01 -0400, Joe Marcus Clarke wrote:
> > > On Tue, 2006-10-17 at 12:45 -0700, Sean McNeil wrote:
> > > > I've just managed to get my system updated to GNOME 2.16 after some
> > > > difficulties.  I understand that HAL is supported with this version, but
> > > > I cannot find any man page for hald or any tutorial for how it is used.
> > > > Can someone please point me in the right direction?
> > > 
> > > There is a README installed, but in general, you just want to add
> > > yourself to the operator group (if not already there), and start hald.
> > > Everything else should just work.
> > > 
> > > If you'd like to submit documentation for the FreeBSD GNOME FAQ, or add
> > > to the README, your patches would be happily accepted.
> > 
> > If I understood how it works, I would be glad to add patches.  Perhaps
> > you can describe what is happening to my setup and that would help my
> > understanding:
> > 
> > I have the following ata devices:
> > ATA channel 0:
> >     Master:  ad0 <Maxtor 6Y120L0/YAR41VW0> ATA/ATAPI revision 7
> >     Slave:   ad1 <Maxtor 6L200R0/BAH41E00> ATA/ATAPI revision 7
> > ATA channel 1:
> >     Master: acd0 <PIONEER DVD-RW DVR-104/1.40> ATA/ATAPI revision 6
> >     Slave:  acd1 <TOSHIBA CD/DVDW SD-R5372/TU31> ATA/ATAPI revision 7
> > ATA channel 2:
> >     Master:  ad4 <ST380013AS/3.05> Serial ATA v1.0
> > ATA channel 3:
> >     Master:  ad6 <WDC WD4000KD-00NAB0/01.06A01> Serial ATA v1.0
> > ATA channel 4:
> >     Master:  ad8 <WDC WD4000KD-00NAB0/01.06A01> Serial ATA v1.0
> >     Slave:       no device present
> > ATA channel 5:
> >     Master: ad10 <WDC WD2000JD-00HBB0/08.02D08> Serial ATA v1.0
> > 
> > ad4 - My root filesystem
> > 
> > ad0 - Part of a gmirror /dev/mirror/folka
> > ad1 - Part of a gmirror /dev/mirror/folka and extra space as /export (glabel /dev/ufs/export)
> > 
> > ad6 and ad8 - gmirror /dev/mirror/home
> > 
> > ad10 - /users (glabel /dev/ufs/users)
> > 
> > my fstab has:
> > # Device                Mountpoint      FStype  Options         Dump    Pass#
> > /dev/ad4s1b             none            swap    sw              0       0
> > /dev/ad4s1a             /               ufs     rw              1       1
> > /dev/mirror/home        /home           ufs     rw,acls         1       1
> > /dev/mirror/folka       /folk           ufs     rw,acls         1       1
> > /dev/ufs/users          /users          ufs     rw,acls         1       1
> > /dev/ufs/export         /export         ufs     rw,acls         1       1
> > proc                    /proc           procfs  rw              0       0
> > linproc         /compat/linux/proc      linprocfs rw            0       0
> > /dev/cd0                /mnt/dvd0       udf     rw,noauto       0       0
> > /dev/cd1                /mnt/dvd1       udf     rw,noauto       0       0
> > /dev/cd0                /mnt/cdrom0     cd9660  rw,noauto       0       0
> > /dev/cd1                /mnt/cdrom1     cd9660  rw,noauto       0       0
> > 
> > (tried with acd* as well)
> > 
> > My df shows:
> > Filesystem              Size    Used   Avail Capacity  Mounted on
> > /dev/ad4s1a              69G     21G     42G    33%    /
> > devfs                   1.0K    1.0K      0B   100%    /dev
> > /dev/mirror/home        361G     83G    250G    25%    /home
> > /dev/mirror/folka       111G     60G     42G    59%    /folk
> > /dev/ufs/users          180G    128G     38G    77%    /users
> > /dev/ufs/export          73G    520M     67G     1%    /export
> > procfs                  4.0K    4.0K      0B   100%    /proc
> > linprocfs               4.0K    4.0K      0B   100%    /compat/linux/proc
> > /dev/md0                124M     64K    114M     0%    /tmp
> > devfs                   1.0K    1.0K      0B   100%    /var/named/dev
> > 
> > I'm guessing fstab doesn't really have anything to do with hald.  In
> > Nautilus, I now end up with a new icon on the desktop that is part of
> > my /dev/mirror/folka.  I think it's from ad1 as it must have decided
> > since /export is on there to pull that in as well.
> > 
> > In "Computer" from nautilus, I see:
> > CD-RW/DVD-R Drive
> > 114.5 GB Volume
> > 372.6 GB Volume
> > 372.6 GB Volume (2)
> > export
> > users
> > Filesystem
> > Network
> > 
> > So it is obvious to me that the separate drives are showing for gmirror
> > (which is a bug?) instead of the mirrors, but I'm puzzled about my /folk
> > disk as it only shows one of the discs.  I also only see one of my DVD
> > drives and I can't get it to mount anything.  To make everything
> > complete, here is my /var/log/message of disc detection:
> 
> hal currently lacks RAID support, so each disk will be displayed.  You
> can choose to ignore these entries by
> modifying /usr/local/share/hal/fdi/preprobe/20thirdparty/10-ignore-disks.fdi.  Something like this should work:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <deviceinfo version="0.2">
>   <device>
>     <match key="block.device" string="/dev/ad0">
>       <merge key="info.ignore" type="bool">true</merge>
>     </match>
>   </device>
> </deviceinfo>
> 
> The block device string should be whatever lshal reports it to be.

OK, I can get rid of those guys with:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="block.device" string="/dev/ad6">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ad8">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ad0">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ad1s1">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
</deviceinfo>

Now I only have:
CD-RW/DVD-R Drive
export
users
Filesystem
Network

which looks a lot better.  But I still only have 1 of 2 DVDs and if I
click on export, or users I get a "Cannot mount volume" error dialog.

lshal shows:

udi = '/org/freedesktop/Hal/devices/volume_label_export'
  volume.mount.valid_options = {'ro', 'noexec'} (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths =
{'hal-storage-mount', 'ha
l-system-storage-unmount', 'hal-system-storage-eject'} (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as',
'as'} (st
ring list)
  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount',
'Eject'}
 (string list)
  info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
  block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_L605EN8H' 
 (string)
  info.product = 'export'  (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_label_export'
(string)
  block.is_volume = true  (bool)
  volume.mount_point = ''  (string)
  volume.is_mounted_read_only = false  (bool)
  volume.is_mounted = false  (bool)
  volume.num_blocks = 158175990  (0x96d92f6)  (uint64)
  volume.size = 80986106880  (0x12db25ec00)  (uint64)
  volume.block_size = 512  (0x200)  (uint64)
  volume.uuid = ''  (string)
  volume.label = 'export'  (string)
  volume.fsversion = '2'  (string)
  volume.fstype = 'ufs'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.ignore = false  (bool)
  volume.is_partition = true  (bool)
  volume.is_disc = false  (bool)
  volume.partition.msdos_part_table_type = 165  (0xa5)  (int)
  volume.partition.number = 2  (0x2)  (int)
  block.minor = 108  (0x6c)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/ad1s2'  (string)
  info.category = 'volume'  (string)
  info.bus = 'block'  (string)
  info.capabilities = {'block', 'volume'} (string list)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_L605EN8H'
(string)

udi = '/org/freedesktop/Hal/devices/volume_label_users'
  volume.mount.valid_options = {'ro', 'noexec'} (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths =
{'hal-storage-mount', 'ha
l-system-storage-unmount', 'hal-system-storage-eject'} (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as',
'as'} (st
ring list)
  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount',
'Eject'}
 (string list)
  info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
  block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_WD_WCAL715
39806'  (string)
  info.product = 'users'  (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_label_users'  (string)
  block.is_volume = true  (bool)
  volume.mount_point = ''  (string)
  volume.is_mounted_read_only = false  (bool)
  volume.is_mounted = false  (bool)
  volume.num_blocks = 390716802  (0x1749dd82)  (uint64)
  volume.size = 200047002624  (0x2e93bb0400)  (uint64)
  volume.block_size = 512  (0x200)  (uint64)
  volume.uuid = ''  (string)
  volume.label = 'users'  (string)
  volume.fsversion = '2'  (string)
  volume.fstype = 'ufs'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.ignore = false  (bool)
  volume.is_partition = true  (bool)
  volume.is_disc = false  (bool)
  volume.partition.msdos_part_table_type = 165  (0xa5)  (int)
  volume.partition.number = 1  (0x1)  (int)
  block.minor = 125  (0x7d)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/ad10s1'  (string)
  info.category = 'volume'  (string)
  info.bus = 'block'  (string)
  info.capabilities = {'block', 'volume'} (string list)
  info.parent =
'/org/freedesktop/Hal/devices/storage_serial_WD_WCAL71539806'  (
string)

udi = '/org/freedesktop/Hal/devices/temp/77'
  info.udi = '/org/freedesktop/Hal/devices/ignored-device'  (string)
  info.ignore = true  (bool)
  storage.lun = 0  (0x0)  (int)
  storage.firmware_revision = '1.40'  (string)
  info.product = 'Ignored Device'  (string)
  info.vendor = 'PIONEER'  (string)
  storage.cdrom.write_speed = 0  (0x0)  (int)
  storage.cdrom.read_speed = 0  (0x0)  (int)
  storage.cdrom.support_media_changed = false  (bool)
  storage.cdrom.hddvdrw = false  (bool)
  storage.cdrom.hddvdr = false  (bool)
  storage.cdrom.hddvd = false  (bool)
  storage.cdrom.bdre = false  (bool)
  storage.cdrom.bdr = false  (bool)
  storage.cdrom.bd = false  (bool)
  storage.cdrom.dvdplusrwdl = false  (bool)
  storage.cdrom.dvdplusrdl = false  (bool)
  storage.cdrom.dvdplusrw = false  (bool)
  storage.cdrom.dvdplusr = false  (bool)
  storage.cdrom.dvdram = false  (bool)
  storage.cdrom.dvdrw = false  (bool)
  storage.cdrom.dvdr = false  (bool)
  storage.cdrom.dvd = false  (bool)
  storage.cdrom.cdrw = false  (bool)
  storage.cdrom.cdr = false  (bool)
  storage.vendor = 'PIONEER'  (string)
  storage.model = 'DVD-RW  DVR-104'  (string)
  storage.physical_device =
'/org/freedesktop/Hal/devices/ide_host_1_scsi_host_s
csi_device_lun0'  (string)
  storage.no_partitions_hint = true  (bool)
  storage.automount_enabled_hint = true  (bool)
  storage.media_check_enabled = true  (bool)
  storage.hotpluggable = false  (bool)
  storage.requires_eject = true  (bool)
  storage.removable = true  (bool)
  storage.drive_type = 'cdrom'  (string)
  storage.bus = 'scsi'  (string)
  block.minor = 137  (0x89)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/cd0'  (string)
  info.bus = 'block'  (string)
  freebsd.unit = 0  (0x0)  (int)
  freebsd.driver = 'cd'  (string)
  info.parent =
'/org/freedesktop/Hal/devices/ide_host_1_scsi_host_scsi_device_l
un0'  (string)

udi = '/org/freedesktop/Hal/devices/storage_serial_MBEDC021782WL'
  info.addons = {'hald-addon-storage'} (string list)
  storage.cdrom.write_speeds = {'1411', '705'} (string list)
  block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_MBEDC02178
2WL'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_MBEDC021782WL'
(strin
g)
  block.is_volume = false  (bool)
  storage.firmware_revision = '1.40'  (string)
  storage.serial = 'MBEDC021782WL'  (string)
  storage.cdrom.write_speed = 1411  (0x583)  (int)
  storage.cdrom.read_speed = 4233  (0x1089)  (int)
  storage.cdrom.support_media_changed = false  (bool)
  storage.cdrom.hddvdrw = false  (bool)
  storage.cdrom.hddvdr = false  (bool)
  storage.cdrom.hddvd = false  (bool)
  storage.cdrom.bdre = false  (bool)
  storage.cdrom.bdr = false  (bool)
  storage.cdrom.bd = false  (bool)
  storage.cdrom.dvdplusrwdl = false  (bool)
  storage.cdrom.dvdplusrdl = false  (bool)
  storage.cdrom.dvdplusrw = true  (bool)
  storage.cdrom.dvdplusr = false  (bool)
  storage.cdrom.dvdram = false  (bool)
  storage.cdrom.dvdrw = false  (bool)
  storage.cdrom.dvdr = true  (bool)
  storage.cdrom.dvd = true  (bool)
  storage.cdrom.cdrw = true  (bool)
  storage.cdrom.cdr = true  (bool)
  info.vendor = 'PIONEER'  (string)
  info.product = 'PIONEER DVD-RW DVR-104'  (string)
  storage.vendor = 'PIONEER'  (string)
  storage.model = 'PIONEER DVD-RW DVR-104'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/ide_1_0'
(string)
  storage.no_partitions_hint = true  (bool)
  storage.automount_enabled_hint = true  (bool)
  storage.media_check_enabled = true  (bool)
  storage.hotpluggable = false  (bool)
  storage.requires_eject = true  (bool)
  storage.removable = true  (bool)
  storage.drive_type = 'cdrom'  (string)
  storage.bus = 'ide'  (string)
  block.minor = 109  (0x6d)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/acd0'  (string)
  info.category = 'storage.cdrom'  (string)
  info.bus = 'block'  (string)
  info.capabilities = {'block', 'storage', 'storage.cdrom'} (string
list)
  freebsd.unit = 0  (0x0)  (int)
  freebsd.driver = 'acd'  (string)
  info.parent = '/org/freedesktop/Hal/devices/ide_1_0'  (string)

udi = '/org/freedesktop/Hal/devices/temp/79'
  info.udi = '/org/freedesktop/Hal/devices/ignored-device'  (string)
  info.ignore = true  (bool)
  storage.lun = 0  (0x0)  (int)
  storage.firmware_revision = 'TU31'  (string)
  info.product = 'Ignored Device'  (string)
  info.vendor = 'TOSHIBA'  (string)
  storage.cdrom.write_speed = 0  (0x0)  (int)
  storage.cdrom.read_speed = 0  (0x0)  (int)
  storage.cdrom.support_media_changed = false  (bool)
  storage.cdrom.hddvdrw = false  (bool)
  storage.cdrom.hddvdr = false  (bool)
  storage.cdrom.hddvd = false  (bool)
  storage.cdrom.bdre = false  (bool)
  storage.cdrom.bdr = false  (bool)
  storage.cdrom.bd = false  (bool)
  storage.cdrom.dvdplusrwdl = false  (bool)
  storage.cdrom.dvdplusrdl = false  (bool)
  storage.cdrom.dvdplusrw = false  (bool)
  storage.cdrom.dvdplusr = false  (bool)
  storage.cdrom.dvdram = false  (bool)
  storage.cdrom.dvdrw = false  (bool)
  storage.cdrom.dvdr = false  (bool)
  storage.cdrom.dvd = false  (bool)
  storage.cdrom.cdrw = false  (bool)
  storage.cdrom.cdr = false  (bool)
  storage.vendor = 'TOSHIBA'  (string)
  storage.model = 'CD/DVDW SD-R5372'  (string)
  storage.physical_device =
'/org/freedesktop/Hal/devices/ide_host_1_scsi_host_s
csi_device_lun0_0'  (string)
  storage.no_partitions_hint = true  (bool)
  storage.automount_enabled_hint = true  (bool)
  storage.media_check_enabled = true  (bool)
  storage.hotpluggable = false  (bool)
  storage.requires_eject = true  (bool)
  storage.removable = true  (bool)
  storage.drive_type = 'cdrom'  (string)
  storage.bus = 'scsi'  (string)
  block.minor = 138  (0x8a)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/cd1'  (string)
  info.bus = 'block'  (string)
  freebsd.unit = 1  (0x1)  (int)
  freebsd.driver = 'cd'  (string)
  info.parent =
'/org/freedesktop/Hal/devices/ide_host_1_scsi_host_scsi_device_l
un0_0'  (string)

udi = '/org/freedesktop/Hal/devices/storage_serial_Y44R300185'
  info.addons = {'hald-addon-storage'} (string list)
  storage.cdrom.write_speeds = {'8467', '7056', '6703', '5645', '4234',
'2822', 
'1411', '706'} (string list)
  block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_Y44R300185
'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_Y44R300185'
(string)
  block.is_volume = false  (bool)
  storage.firmware_revision = 'TU31'  (string)
  storage.serial = 'Y44R300185'  (string)
  storage.cdrom.write_speed = 8467  (0x2113)  (int)
  storage.cdrom.read_speed = 8467  (0x2113)  (int)
  storage.cdrom.support_media_changed = false  (bool)
  storage.cdrom.hddvdrw = false  (bool)
  storage.cdrom.hddvdr = false  (bool)
  storage.cdrom.hddvd = false  (bool)
  storage.cdrom.bdre = false  (bool)
  storage.cdrom.bdr = false  (bool)
  storage.cdrom.bd = false  (bool)
  storage.cdrom.dvdplusrwdl = false  (bool)
  storage.cdrom.dvdplusrdl = false  (bool)
  storage.cdrom.dvdplusrw = true  (bool)
  storage.cdrom.dvdplusr = false  (bool)
  storage.cdrom.dvdram = false  (bool)
  storage.cdrom.dvdrw = false  (bool)
  storage.cdrom.dvdr = true  (bool)
  storage.cdrom.dvd = true  (bool)
  storage.cdrom.cdrw = true  (bool)
  storage.cdrom.cdr = true  (bool)
  info.vendor = 'TOSHIBA'  (string)
  info.product = 'TOSHIBA CD/DVDW SD-R5372'  (string)
  storage.vendor = 'TOSHIBA'  (string)
  storage.model = 'TOSHIBA CD/DVDW SD-R5372'  (string)
  storage.physical_device = '/org/freedesktop/Hal/devices/ide_1_1'
(string)
  storage.no_partitions_hint = true  (bool)
  storage.automount_enabled_hint = true  (bool)
  storage.media_check_enabled = true  (bool)
  storage.hotpluggable = false  (bool)
  storage.requires_eject = true  (bool)
  storage.removable = true  (bool)
  storage.drive_type = 'cdrom'  (string)
  storage.bus = 'ide'  (string)
  block.minor = 110  (0x6e)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/acd1'  (string)
  info.category = 'storage.cdrom'  (string)
  info.bus = 'block'  (string)
  info.capabilities = {'block', 'storage', 'storage.cdrom'} (string
list)
  freebsd.unit = 1  (0x1)  (int)
  freebsd.driver = 'acd'  (string)
  info.parent = '/org/freedesktop/Hal/devices/ide_1_1'  (string)

udi = '/org/freedesktop/Hal/devices/storage_serial_Y44R300185_block'
  block.storage_device =
'/org/freedesktop/Hal/devices/storage_serial_Y44R300185
'  (string)
  info.product = 'Block Device'  (string)
  info.udi =
'/org/freedesktop/Hal/devices/storage_serial_Y44R300185_block'  (st
ring)
  block.is_volume = false  (bool)
  volume.disc.capacity = 4706074624  (0x118810000)  (uint64)
  volume.disc.type = 'dvd_rw'  (string)
  volume.disc.is_rewritable = true  (bool)
  volume.disc.is_blank = false  (bool)
  volume.disc.is_appendable = false  (bool)
  volume.disc.is_videodvd = false  (bool)
  volume.disc.is_svcd = false  (bool)
  volume.disc.is_vcd = false  (bool)
  volume.disc.has_data = true  (bool)
  volume.disc.has_audio = false  (bool)
  block.minor = 110  (0x6e)  (int)
  block.major = 0  (0x0)  (int)
  block.device = '/dev/acd1'  (string)
  info.category = 'volume.disc'  (string)
  info.bus = 'block'  (string)
  info.capabilities = {'block', 'volume', 'volume.disc'} (string list)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_Y44R300185'
(strin
g)

Playing around with /dev/cd0 and /dev/cd1 I think there might be
something wrong with -STABLE. I cannot seem to mount anything
on /dev/cd0 anymore.  I can mount on /dev/cd1 properly and the mounted
volume actually shows up in nautilus then disappears when unmounted.
Nothing for that device in "Computer" folder, though, except when
mounted.  Strangely enough, I can also eject the disc and it still shows
as mounted.  If I mount as acd1, I can't eject.

For the other drive, I get

# mount /mnt/cdrom0
mount_cd9660: /dev/cd0: Input/output error
kernel: g_vfs_done():cd0[READ(offset=32768, length=2048)]error = 5
Clicking on the "CD-RW/DVD-R Drive" in "Computer" folder gives me a
dialog that says "There is probably no media in the drive.".





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1161123487.45372.22.camel>