:: Re: [DNG] vdev
Página Principal
Delete this message
Reply to this message
Autor: Ralph Ronnquist
Data:  
Para: dng
Assunto: Re: [DNG] vdev
On 10/08/16 22:22, richard lucassen wrote:
> On Wed, 10 Aug 2016 18:46:36 +1000
> Ralph Ronnquist <ralph.ronnquist@???> wrote:
>
>> I've now made a snapshot of the vdev files from the working disk.
>> available at www.realthing.com.au/files/vdev/vdev-snapshot.tgz.
>
> logfile=/run/vdev/vdevd.log
>
> I'd rather choose
>
> logfile=/var/log/vdev/vdevd.log
>
> as /run/ is a ramdisk ;-)


So would I :-) but I got the impression /var (or /) is read-only when
vdevd starts, which made it spit the dummy. That's why I tried with
directing it to /run. I guess the logging needs som hands-on

>
>> As I mentioned before, it came down to a couple changes to the config
>> file and the udev-compat.sh helper (maybe not needed), then adding
>> dameonlet and the acls directory with its thing, and setting a
>> handful of links.
>
> You probably have no list of the changes you made?
>


For the actually changed files, I have the context diff:
diff -rc clean/usr/etc/vdev/vdevd.conf fixed/usr/etc/vdev/vdevd.conf
*** clean/usr/etc/vdev/vdevd.conf       2016-07-02 04:09:23.000000000 +1000
--- fixed/usr/etc/vdev/vdevd.conf       2016-08-10 00:10:07.000000000 +1000
***************
*** 1,12 ****
   [vdev-config]
! firmware=/usr/lib/firmware
   acls=/usr/etc/vdev/acls
   actions=/usr/etc/vdev/actions
   helpers=/usr/lib/vdev
   hwdb=/usr/lib/vdev/hwdb/hwdb.squashfs
   ifnames=/usr/etc/vdev/ifnames.conf
! pidfile=/usr/run/vdev/vdevd.pid
   default_permissions=0600
   loglevel=debug
! logfile=/usr/var/log/vdev/vdevd.log
   preseed=/usr/lib/vdev/dev-setup.sh
--- 1,13 ----
   [vdev-config]
! firmware=/lib/firmware
   acls=/usr/etc/vdev/acls
   actions=/usr/etc/vdev/actions
   helpers=/usr/lib/vdev
   hwdb=/usr/lib/vdev/hwdb/hwdb.squashfs
+ hwdb_loop=loop1
   ifnames=/usr/etc/vdev/ifnames.conf
! pidfile=/run/vdev/vdevd.pid
   default_permissions=0600
   loglevel=debug
! logfile=/run/vdev/vdevd.log
   preseed=/usr/lib/vdev/dev-setup.sh
diff -rc clean/usr/lib/vdev/udev-compat.sh fixed/usr/lib/vdev/udev-compat.sh
*** clean/usr/lib/vdev/udev-compat.sh   2016-07-02 04:08:31.000000000 +1000
--- fixed/usr/lib/vdev/udev-compat.sh   2016-08-10 17:55:56.007870574 +1000
***************
*** 571,580 ****
   $(udev_event_generate_text "$VDEV_ACTION" "$VDEV_OS_DEVPATH" 
"$VDEV_OS_SUBSYSTEM" "$VDEV_OS_SEQNUM" "$VDEV_METADATA")
   EOF


      echo "event-put $_DEVICE_ID" >> /tmp/udev-compat.log
      echo "" >> /tmp/udev-compat.log


-    _RC=$?
      return $_RC
   }


--- 571,580 ----
$(udev_event_generate_text "$VDEV_ACTION" "$VDEV_OS_DEVPATH"
"$VDEV_OS_SUBSYSTEM" "$VDEV_OS_SEQNUM" "$VDEV_METADATA")
EOF

+    _RC=$?
      echo "event-put $_DEVICE_ID" >> /tmp/udev-compat.log
      echo "" >> /tmp/udev-compat.log


      return $_RC
   }


----------------------------- ends here ------------------------

>> The more major thing was the addition of the initramfs making (in the
>> root director of the snapshot), which I took from github, and editing
>> it to deal with the /usr prefix.
>>
>> I made it a snapshot for forensic study, and you can choose how to
>> roll it into the packages. Note that I added "loop" to modules
>> because the hardware database is a squasfs; I haven't actually
>> verified that it's really needed but just left it so.
>
> I installed vdev like in INSTALL.md, but it seems to have problems.


Just to be clear: you are now going back to the github source. My
snapshot is from the new exercise against the gnuinos. (Except that I
brought in the making of the initramfs, which was missing in the deb)

> vdev starts, but quits.


I think that was the effect of trying to log on /var.

> It creates most devices, but does not set the
> apropiate ownerships and permissions. When I start vdev manually, it
> starts but refuses to set the apropiate ownerships and permissions.
>
> But when running:
>
> /sbin/vdevd -v2 -c /etc/vdev/vdevd.conf -l /var/log/vdev/vdev.log /dev
>
> everything seems to work well, the apropiate ownerships and
> permissions are set to the expected settings.
>
> IOW: when run manually it's ok. It might have something to do with
> initramfs which refuses to compile, due to an old bug. The workaroud is
> to:
>
> ln -s /dev/sda5 /805
>
> in order to make it work again. But generating the initramfs from the
> example directory stops with an error and an empty initramfs file. The
> thing I did was symlinking the libudev.so.1
>
> ls -al /lib/i386-linux-gnu/libudev.so.1
> lrwxrwxrwx 1 root root 17 Aug 10 14:08 /lib/i386-linux-gnu/libudev.so.1
> -> /lib/libudev.so.1
>
> and to run a update-initramfs -u -v
>
> Anyone a hint?
>
> R.
>