Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche

1 2 3 >

vendredi 30 décembre 2011

Déboucher ses toillettes: méthode testée et approuvée

Une méthode très efficace trouvée sur le blog d'une jeune geek http://www.pakito.eu/vie-pratique/how-to-deboucher-ses-chiottes/. Comme beaucoup au début, je ne croyais pas trop à  l'efficacité de sa méthode. Mais elle fonctionne du tonnerre de dieu

dimanche 25 décembre 2011

Xen 4.2 unstable: Xen PVHVM on Linux HVM + VGA Pass Through (NVIDIA): it works for Linux 3.1.6 !

I asked myself if it could be possible to use
  • Xen VGA Pass Through for NVIDIA
  • Xen PVHVM
on a Linhx HVM domU.

The answer is yes! I went on [1]. I was a little confused by the idea that it could very easy to do.

I spent a lof of time trying to resolve several issues (...) But all issues are fixed now .

Here the assumption is done that we've already have a fresh domU running on Ubuntu Lucid 10.4.3 and Xen VGA Pass Through (for more info about VGA Pass Through refer to my previous article)

1. When everything is OK, we've got...

Refer to [1], we have

Xen PV HVM on domU (HVM) Ubuntu Lucid 10.4.3: VGA Pass Through is working too
root@mercury-xen01:~# dmesg | egrep -i 'xen|blk'
[    0.000000] Linux version 3.1.6 (root@mercury-xen01) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #1 SMP Sun Dec 25 01:26:07 CET 2011
[    0.000000] DMI: Xen HVM domU, BIOS 4.2-unstable 12/22/2011
[    0.000000] Hypervisor detected: Xen HVM
[    0.000000] Xen version 4.2.
[    0.000000] Xen Platform PCI: I/O protocol version 1
[    0.000000] Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.
[    0.000000] Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
[    0.000000] ACPI: RSDP 00000000000ea020 00024 (v02    Xen)
[    0.000000] ACPI: XSDT 00000000fc00f680 00054 (v01    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: FACP 00000000fc00f340 000F4 (v04    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: DSDT 00000000fc003600 0BCBC (v02    Xen      HVM 00000000 INTL 20100528)
[    0.000000] ACPI: APIC 00000000fc00f440 000D8 (v02    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: HPET 00000000fc00f590 00038 (v01    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: WAET 00000000fc00f5d0 00028 (v01    Xen      HVM 00000000 HVML 00000000)
[    0.000000] ACPI: SSDT 00000000fc00f600 00031 (v02    Xen      HVM 00000000 INTL 20100528)
[    0.000000] ACPI: SSDT 00000000fc00f640 00031 (v02    Xen      HVM 00000000 INTL 20100528)
[    0.000000] Booting paravirtualized kernel on Xen HVM
[    0.000000] Xen HVM callback vector for event delivery is enabled
[    0.135090] Xen: using vcpuop timer interface
[    0.135094] installing Xen timer for CPU 0
[    0.300043] installing Xen timer for CPU 1
[    0.470043] installing Xen timer for CPU 2
[    0.640040] installing Xen timer for CPU 3
[    1.031644] xen/balloon: Initialising balloon driver.
[    1.031654] xen-balloon: Initialising balloon driver.
[    1.050023] Switching to clocksource xen
[    1.051618] xen: --> pirq=19 -> irq=8 (gsi=8)
[    1.051659] xen: --> pirq=20 -> irq=12 (gsi=12)
[    1.051689] xen: --> pirq=21 -> irq=1 (gsi=1)
[    1.051720] xen: --> pirq=22 -> irq=6 (gsi=6)
[    1.051753] xen: --> pirq=23 -> irq=4 (gsi=4)
[    1.051791] xen: --> pirq=54 -> irq=7 (gsi=7)
[    2.061962] QLogic/NetXen Network Driver v4.0.76
[    2.062183] xen: --> pirq=17 -> irq=17 (gsi=17)
[    2.090348] xen: --> pirq=18 -> irq=21 (gsi=21)
[    2.260133] xen: --> pirq=53 -> irq=28 (gsi=28)
[    2.260136] xen-platform-pci 0000:00:03.0: PCI INT A -> GSI 28 (level, low) -> IRQ 28
[    2.266953] input: Xen Virtual Keyboard as /devices/virtual/input/input3
[    2.267012] input: Xen Virtual Pointer as /devices/virtual/input/input4
[    2.269131] Initialising Xen virtual ethernet driver.
[    2.281965] blkfront: xvda: flush diskcache: enabled
[    2.282796] vbd vbd-51744: 19 xenbus_dev_probe on device/vbd/51744
[    2.283048] vbd vbd-51744: failed to write error node for device/vbd/51744 (19 xenbus_dev_probe on device/vbd/51744)
[    7.515418] xen: --> pirq=55 -> irq=44 (gsi=44)
[    8.328334] xen: --> pirq=52 -> irq=40 (gsi=40)
[    8.488638] xen: --> pirq=51 -> irq=36 (gsi=36)


2. domU: Kernel 3.1.6

  1. Download the sources
    wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.1.6.tar.bz2
    tar xjf linux-3.1.6.tar.bz2
    cd linux-3.1.6
  2. Prepare the configuration
    make menuconfig
    The most important is to be sure to have the same following configuration. Be sure to have CONFIG_XEN_PLATFORM_PCI compile as a module (=m).
    root@mercury-xen01:/usr/src/linux-3.1.6# grep -i xen .config
    # CONFIG_XEN_WDT is not set
    # Xen driver support
    Notice: you can download my own configuration here
  3. Build and install
    make -j4 bzImage modules
    make install modules_install
  4. Change the content of file /etc/initramfs-tools/modules
    root@mercury-xen01:~# cat /etc/initramfs-tools/modules 
    # List of modules that you want to include in your initramfs.
    # Syntax:  module_name [args ...]
    # You must run update-initramfs(8) to effect this change.
    # Examples:
    # raid1
    # sd_mod
  5. Build initrd
    mkinitramfs -o /boot/initrd.img-3.1.6 3.1.6

3. domU: Grub

  1. Change grub options in /etc/default/grub
    root@mercury-xen01:~# cat /etc/default/grub 
    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="loglevel=9 rootdelay=120 quiet splash"
    # Uncomment to disable graphical terminal (grub-pc only)
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    # Uncomment to disable generation of recovery mode menu entries
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
  2. Update grub
    root@mercury-xen01:~# update-grub
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.1.6
    Found initrd image: /boot/initrd.img-3.1.6
  3. Edit /boot/grub/grub.cfg. We need to replace the line root=/dev/sda1 by root=/dev/xvda1
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, avec Linux 3.1.6' --class ubuntu --class gnu-linux --class gnu --class os {
            insmod ext2
            set root='(hd0,1)'
            search --no-floppy --fs-uuid --set b199c136-7ea3-4244-b51a-9adfd52ea892
            linux   /boot/vmlinuz-3.1.6 root=/dev/xvda1 ro   loglevel=9 rootdelay=120 quiet splash
            initrd  /boot/initrd.img-3.1.6
  4. Shutdown the domU

4. dom0: domU configuration

  1. For the first boot (*) You need to change every hdX to xvdX. For example, here the content of my configuration file
    root@mercury:~# grep -vE '^(#|$)' /etc/xen/machines/mercury-xen01.cfg 
    shadow_memory = 128
    name = "mercury-xen01"
    memory      = '3072'
    vcpus = '4'
    disk        = [
    name        = 'mercury-xen01'
    vif         = [ 'mac=00:16:3E:B7:05:58,bridge=eth0,model=e1000' ]
    on_poweroff = 'destroy'
    on_reboot   = 'restart'
    on_crash    = 'restart'
    pci  = [ '01:00.0','00:1a.0','00:1d.0' ]
    hpet = 1
    hap = 1
    soundhw = "all"
    (*) For a unknown reason , after several reboots, you can put hd[a-] instead of xvd[a-d]
  2. Restart the domU
  3. Reinstall NVIDIA driver for the new kernel

5 Last fix: Automount CDROM device

When googling a lot, I found this url http://www.ossramblings.com/automount-cdrom-ubuntu-lucid-maverick then I did
apt-get remove --purge hal
apt-get install hal
apt-get install halevt
gnome-volume-manager is not available on Ubuntu Lucid 10.4.3 so I replace it by halevt

samedi 24 décembre 2011

2012: Call of the dragon from the dark side...

Tonight it's Christmas! As far as I remembered while I was listening Relax - done by Mika -, my mind went out(...) To my family, to my friends, I was thinking a couple hours ago! At 06:00 PM, I went to the church - not away from where I live -. I dedicated a prayer to my famlily and my friends. I called my family (Reunion Island) in Indian Ocean. I was very glad to listen my mother and my sister on phone. Dad was a little tired. Happy I was to call with him :) even if I was not with them.

Last night and tonight, I called my friends for Christmas. I was happy to have one of my friends - on phone -. I was a little stressed about what happened to her. For each Chritsmas, knowing that person I know thinks about you is all I need.

For the 4 pasted years, several chapters of my life were done

  • 2007: Dragon down
  • Feb 2008/ July 2009: Dragon Reborn
  • September 2009/ June 2011: Dragon Reloaded
  • July 2011/December 2011: Dragon came back...
2012 will be the call of the dragon. Dark side is like the black background that you can see in the image on the left on this article. Foreground: you see the beauty of Jana Defi. Background: it's up to you. I love this image. I put in on my mug at job. It's my angel whereas I am a dragon.

2011 was a very surprising year. Well it was a very good year. Hope for 2012

mercredi 21 décembre 2011

Supprimer la chaine "<U+FEFF>", BOM

En faisant un less sur un fichier, cette chaà®ne apparaà®t en début de fichier
<U+FEFF>..... ......
........ ......... .........
Pour la supprimer
sed -i '1 s:\xEF\xBB\xBF::' file
Source: http://thegreyblog.blogspot.com/2010/09/shell-script-to-find-and-remove-bom.html