Rechercher dans ce blog

mercredi 9 décembre 2015

Générer une image ISO de DVD à partir d'un dossier VIDEO_TS en CLI / UBUNTU

Utiliser la commande :

genisoimage -dvd-video -o dvd.iso DIRECTORY/

Le dossier VIDEO_TS doit être un sous-dossier de DIRECTORY

La commande genisoimage semble installée d'origine sur ubuntu 14.04 (en tout cas je ne me souviens pas de l'avoir installée).


mercredi 27 mai 2015

GRUB 2 REPAIR & RESCUE

from : https://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-grub-2-on-linux/ 
 
 
grub> set pager=1
 
grub> ls
(hd0) (hd0,msdos2) (hd0,msdos1
 
grub> ls (hd0,1)/
lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/  lib/
lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/ 
srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old 
initrd.img initrd.img.old
 
grub> cat (hd0,1)/etc/issue
Ubuntu 14.04 LTS \n \l
 

Booting From grub>

grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot

grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot

Pour voir et booter les liens symboliques
 
$ ls -l /
vmlinuz -> boot/vmlinuz-3.13.0-29-generic
initrd.img -> boot/initrd.img-3.13.0-29-generic 


grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot 

Booting From grub-rescue>

If you're in the GRUB rescue shell the commands are different, 
and you have to load the normal.mod andlinux.mod modules: 

insmod normal
insmod linux


mais prefix doit être "set" avant...

grub rescue> set prefix=(hd0,1)/boot/grub
grub rescue> set root=(hd0,1)
grub rescue> insmod normal
grub rescue> normal
grub rescue> insmod linux
grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub rescue> initrd /boot/initrd.img-3.13.0-29-generic
grub rescue> boot
 

Making Permanent Repairs


# update-grub
Generating grub configuration file ...
Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
Found background image: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
Found linux image: /boot/vmlinuz-3.13.0-29-generic
Found initrd image: /boot/initrd.img-3.13.0-29-generic
Found linux image: /boot/vmlinuz-3.13.0-27-generic
Found initrd image: /boot/initrd.img-3.13.0-27-generic
Found linux image: /boot/vmlinuz-3.13.0-24-generic
Found initrd image: /boot/initrd.img-3.13.0-24-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done 
 
# grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.

mardi 21 avril 2015

HP Elitebook 8470p fingerprint reader validity


Procédure pour activer le lecteur d'empreintes digitales sur HP elitebook 8470p sous UBUNTU 14.04


Uninstallation
===========
GNOME users: The package policykit-

1-fingerprint-gui replaces GNOME's standard PolicyKit daemon (contained in package policykit-1-gnome). However, when you decide to uninstall Fingerprint GUI (and hence remove policykit-1-fingerprint-gui), policykit-1-gnome will not get automatically installed back, hence there won't be any PolicyKit daemon in the system, and APT will try to remove all the packages that depend on it. Therefore, if you want to remove Fingerprint GUI, make sure you install policykit-1-gnome back first.
   sudo apt-get install policykit-1-gnome
   sudo apt-get remove fingerprint-gui


Je donne toutes les démarches à faire pour obtenir le fonctionnement, mais on peut simplifier en installant directement installer le pkg et copier le fichier de démarrage et ensuite on peut passer toutes les étapes de la compilation en récupérant la libfprint0 déjà compilée comme le pkg et le script sur mon drive google (https://drive.google.com/fingerprint_reader_files).

uname -a :

Linux uranix 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

lsusb -s 001:003 -v :

Bus 001 Device 003: ID 138a:003d Validity Sensors, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass        17
  bDeviceProtocol       255
  bMaxPacketSize0         8
  idVendor           0x138a Validity Sensors, Inc.
  idProduct          0x003d
  bcdDevice            1.04
  iManufacturer           0
  iProduct                0
  iSerial                 1 0030d8cdc38f
  bNumConfigurations      1






... cut ...








Le plus simple est d'installer :

sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui

Cela devrait installer automatiquement : libfprint0

Si nécessaire installer d'abord :

sudo apt-add-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update


Attention : la version 1.07 de fingerprint ne fonctionne pas correctement aussi je maintiens la version 1.07. Comme les packages ne sont pas disponible dans cette version via le ppa je mets les pkg version 1.06 sur le drive google avec les autres fichiers. A suivre lorsqu'il y aura une mise à jour fingerprint...

Dans cet état le fingerprint reader ne fonctionne pas.

Il faut installer une libfprint0 qui le reconnaisse et qui est (si je comprends bien) un wrapper pour le pilote que HP a développé pour la distribution Suse. Je suis ici les indications données sur le blog (merci à lui) mais en les modifiant et les complétant là où c'est nécessaire :

http://blog.pasqualefiorillo.it/post/hp-probook-4540s-validity-sensors-driver-su-linux-mintdebian/


1 - télécharger le pilote :

ftp://ftp.hp.com/pub/softpaq/sp57001-57500/sp57317.tar
 
2 -  tar xvf sp57317.tar

3 - On obtient un paquet .rpm

Validity-Sensor-Setup-4.4-100.00.x86_64.rpm

On le convertit en paquet debian

sudo alien -d Validity-Sensor-Setup-4.4-100.00.x86_64.rpm

4 - On installe le paquet debian

sudo dpkg -i validity-sensor-setup-4.4-100.00.x86_64.deb

5 - On modifie le script de démarrage

/etc/init.d/vcsFPServiceDaemon

en remplaçant son contenu par

#!/bin/sh
### BEGIN INIT INFO
# Provides: Validity Fingerprint Service Daemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 5
# Default-Stop: 0 6
# Short-Description: Validity Fingerprint Service Daemon
# Description: Start vcsFPService to provide Validity FP Service
### END INIT INFO
#
# Note on runlevels:
# 0 - halt/poweroff 6 - reboot
# 1 - single user 2 - multiuser without network exported
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
#

. /lib/lsb/init-functions

vcsFPService_BIN=/usr/bin/vcsFPService
test -x $vcsFPService_BIN || { echo "$vcsFPServiceDaemon is not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }

case "$1" in
start)
echo -n "Starting vcsFPService Daemon \n"
start-stop-daemon --start --background --quiet --exec "$vcsFPService_BIN" > /dev/null 2 >&1

;;
stop)
echo -n "Stopping vcsFPService Daemon \n"

#/sbin/killall -TERM $vcsFPService_BIN
start-stop-daemon --stop --quiet --quiet --oknodo --retry=0/1/KILL/5 --exec "$vcsFPService_BIN" > /dev/null 2 >&1

;;
status)
echo "Checking for vcsFPService Daemon \n"

if pidof -o %PPID $vcsFPService_BIN> /dev/null; then
echo "client is running. \n"
exit 0
else
echo "client is not running. \n"
exit 1
fi
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac

exit 0

6 - On met à jour  les liens de démarrage

sudo update-rc.d vcsFPServiceDaemon defaults

Pour savoir si le service fonctionne ou non :

sudo /etc/init.d/vcsFPServiceDaemon status

7 - Téléchargement de libfprint0

http://suse.mes.edu.cu/SLES_11_SP2/CD2/suse/src/libfprint-0.0.6-18.20.1.src.rpm

 8 - Extraire le contenu du paquet rpm avec le gestionnaire d'archives soit par l'interface graphique soit en utilisant la commande :

file-roller -h libfprint-0.0.6-18.20.1.src.rpm

9 - cd libfprint-0.0.6-18.20.1.src/

Extraire

bzip2 -d libfprint-0.0.6.tar.bz2

Untarer :

tar xf libfprint-0.0.6.tar

10 - Patcher pour ajouter le support pour le fingerprint reader validity 0138:003d

cd libfprint-0.0.6/
patch -p1 <../libfprint-validity.patch


moi@uranix:~/Téléchargements/libfprint-0.0.6-18.20.1.src/libfprint-0.0.6$ patch -p1 <../libfprint-validity.patch
patching file libfprint/Makefile.am
Hunk #1 succeeded at 7 (offset -1 lines).
Hunk #2 succeeded at 64 (offset -9 lines).
patching file libfprint/Makefile.in
patching file libfprint/core.c
patching file libfprint/drivers/validity/vfsDriver.c
patching file libfprint/drivers/validity/vfsDriver.h
patching file libfprint/drivers/validity/vfsWrapper.h
patching file libfprint/fp_internal.h
Hunk #1 succeeded at 122 (offset -3 lines).
Hunk #2 succeeded at 149 (offset -4 lines).
patching file libfprint/imgdev.c


11 - Compiler

./configure
make


12 - Remplacer libfprint0 de ubuntu par celle que l'on vient de compiler.

 cp libfprint/.libs/libfprint.so.0.0.0 /usr/lib

Attention, s'il y a une mise à jour de libfprint0 alors elle sera remplacée de nouveau par la version d'ubuntu.

Donc en faire une copie de sauvegarde dans /usr/local/lib par exemple.

cp libfprint/.libs/libfprint.so.0.0.0 /usr/local/lib

Mais aussi faire un hold sur la lib en faisant :

echo "libfprint0 hold"|dpkg --set-selections

ou

apt-mark hold libfprint0

13 A partir de là, le fingerprint reader doit être reconnu (bien s'assurer que le service vcsFPServiceDaemon est running...

avec fingerprint-gui on peut enregistrer ses empreintes et tester les différents services comme sudo, screenlocker, etc.




Je mets tous les fichiers sur mon drive google.

https://drive.google.com/fingerprint_reader_files




lundi 20 avril 2015

HP ELITEBOOK 8470p FIX Brightness control UBUNTU 14.04

Put in

/usr/share/X11/xorg.conf.d/20-intel.conf

20-intel.conf

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection


root@uranix:/usr/share/X11/xorg.conf.d# ls -ltr
total 36
-rw-r--r-- 1 root root  842 fév  5  2014 50-wacom.conf
-rw-r--r-- 1 root root  364 fév  5  2014 11-evdev-trackpoint.conf
-rw-r--r-- 1 root root  590 fév  5  2014 11-evdev-quirks.conf
-rw-r--r-- 1 root root  115 fév  5  2014 50-vmmouse.conf
-rw-r--r-- 1 root root  590 avr 10  2014 51-synaptics-quirks.conf
-rw-r--r-- 1 root root 1757 avr 10  2014 50-synaptics.conf
-rw-r--r-- 1 root root 1867 fév 12 15:51 10-quirks.conf
-rw-r--r-- 1 root root 1099 fév 12 15:51 10-evdev.conf
-rw-r--r-- 1 root root  167 mar 26 09:57 20-intel.conf

Now brightness control work fine.

lundi 17 novembre 2014

Tuning the Guest Additions time synchronization parameters

from the virtualbox manual

https://www.virtualbox.org/manual/ch09.html#idp60084960

To turn off the clock synchronization between host and VM

VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

9.14.3. Tuning the Guest Additions time synchronization parameters

The VirtualBox Guest Additions ensure that the guest's system time is synchronized with the host time. There are several parameters which can be tuned. The parameters can be set for a specific VM using the following command:

VBoxManage guestproperty set "VM name" "/VirtualBox/GuestAdd/VBoxService/PARAMETER" VALUE

where PARAMETER is one of the following:

--timesync-interval

Specifies the interval at which to synchronize the time with the host. The default is 10000 ms (10 seconds).

--timesync-min-adjust

The minimum absolute drift value measured in milliseconds to make adjustments for. The default is 1000 ms on OS/2 and 100 ms elsewhere.

--timesync-latency-factor

The factor to multiply the time query latency with to calculate the dynamic minimum adjust time. The default is 8 times, that means in detail: Measure the time it takes to determine the host time (the guest has to contact the VM host service which may take some time), multiply this value by 8 and do an adjustment only if the time difference between host and guest is bigger than this value. Don't do any time adjustment otherwise.

--timesync-max-latency

The max host timer query latency to accept. The default is 250 ms.

--timesync-set-threshold

The absolute drift threshold, given as milliseconds where to start setting the time instead of trying to smoothly adjust it. The default is 20 minutes.

--timesync-set-start

Set the time when starting the time sync service.

--timesync-set-on-restore 0|1

Set the time after the VM was restored from a saved state when passing 1 as parameter (default). Disable by passing 0. In the latter case, the time will be adjusted smoothly which can take a long time.

All these parameters can be specified as command line parameters to VBoxService as well.

9.14.4. Disabling the Guest Additions time synchronization

Once installed and started, the VirtualBox Guest Additions will try to synchronize the guest time with the host time. This can be prevented by forbidding the guest service from reading the host clock:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

samedi 15 novembre 2014

VirutalBox resize virtual hard disk

From https://forums.virtualbox.org/viewtopic.php?f=35&t=50661

Thanks to perryg the autor of the post


First resizing does not work if the guest has snapshots (prior to version 4.3.*) nor will it work on Fixed drives.
Secondly when doing anything that could prove as destructive as this should you make a mistake, backup the *.vdi file before you start.

Increasing the drive does not increase the primary partition so this is a two step process.

Step 1: Increase the size of the drive.

Use the following command to increase the size of the drive:
CODE: SELECT ALL   EXPAND VIEW
VBoxManage modifyhd <absolute path to file> --resize <size in MB>

Example: I have a 10GB drive that I want to be 20GB the command would be.
CODE: SELECT ALL   EXPAND VIEW
VBoxManage modifyhd <absolute path including the name and extension> --resize 20480

Step 2: Extend the primary partition to include the new drive space.
Download the Gparted live cd or what ever partition manager program you wish and mount it to the guests virtual CD and boot the guest.
From here you can expand the primary partition to use the new space.
Windows Vista and newer guests can use the Disk Management to expand the primary partition.

You can download the Gparted Live CD from HERE.
If you have issues where Gparted fails, try with Parted Magic HERE
Additional note about parted magic. It is no longer free to download (at least from the source).

Note 1: The only step that VirtualBox is concerned with is step 1. After that you need to seek additional information on the partition manager you wish to use from the vendor of the partition manager.

Note 2: You can not shrink a guest drive with VirtualBox due to the inherent danger of loosing data or making the guest non-bootable.

Note 3: In 4.3.0 the devs fixed a bug which had previously made it impossible to resize a snapshot. Since then it is possible, but not recommended for non-experts.

What if I used Fixed Disks or Snapshots, or VMDK?

As the advice above states, resizing of fixed VDIs or VHDs is not directly supported, nor is resizing of formats other than VHD/VDI, nor can you easily resize disks which are part of a snapshot chain.

However, all of these problems are easily addressed if you clone the disk to a supported format first, using :-
(fields in brackets are placeholders which should be replaced with actual filenames, the brackets are not literal)

CODE: SELECT ALL   EXPAND VIEW
VBoxManage clonehd <infilename or UUID> <outfilename> --format VDI --variant Standard


You can then resize the resulting dynamic VDI using "VBoxManage modifyhd" as described in the previous message.

If a snapshot chain is involved then <infilename> should be the name of the latest snapshot VDI in the "Snapshots" subfolder. Do not make the rookie mistake of cloning the base VDI. In this case "clonehd" will create a merged clone and it's important that you not incorporate this back into a VM which is still expecting a chain of difference disk images. Either build a new VM around the clone, or delete all the snapshot markers from the original VM, then replace the disk file. If the VM did not use difference images (no immutable drive, linked clone or snapshot) then you can use the Storage settings panel to remove the old disk and replace with the new one.

samedi 30 août 2014

Remove Purge old kernel version / UBUNTU

To show the current kernel version:
uname -r 
 
To completly remove old kernel releases 
 
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')