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

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


< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 >

mardi 9 novembre 2010

Xen 4.0.1 / Kernel 2.6.32.25:Activer support TUN/TAP pour HVM

Je connais parfaitement cette manipulation mais à chaque changement de noyau, faut s'y retrouver pour cette option. Rien ne vaut de belles screenshots pour s'en rappeler bien qu'on puisse farfouiller le fichier .config

Privé de ce support, les domU sous Windows sans le support tun/tap ne bootent pas :(

make menuconfig






jeudi 4 novembre 2010

Effacer un CD-RW (réinscriptible)

On installe cdrdao
apt-get install cdrdao
Vérifier si le CD est déjà mounté
root@gemini:~# mount
/dev/sda2 on / type ext3 (rw,errors=remount-ro)
... ...
... ...
gvfs-fuse-daemon on /home/david/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=david)
/dev/sr0 on /media/NOUVEAU type iso9660 (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)
Si oui alors le démounter
root@gemini:~# umount /media/NOUVEAU/
Un scan pour trouver le deveice
root@gemini:~# cdrdao scanbus
Cdrdao version 1.2.2 - (C) Andreas Mueller 
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'ubuntu-0.8ubuntu1'

1,0,0 : ATAPI   , DVD A  DH16AASH , SA15
On purifie
root@gemini:~# cdrdao blank --device 1,0,0
Cdrdao version 1.2.2 - (C) Andreas Mueller 
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'ubuntu-0.8ubuntu1'

1,0,0: ATAPI DVD A  DH16AASH	Rev: SA15
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

ERROR: Cannot set write parameters mode page.
Blanking disk...
Blanking time: 24 seconds

mercredi 3 novembre 2010

[Mplayer/VDPAU] Lire une vidéo en H264

mplayer -vo vdpau -vc ffh264vdpau fichier.mp4
Source: http://doc.ubuntu-fr.org/smplayer_mplayer_et_pilote_nvidia_vdpau

mardi 2 novembre 2010

Xen 4.0.1 LiveCD ( Debian Lenny 5.0.6 / Kernel 2.6.32.24 pv_ops / Xen-tools 4.2)

This LiveCD was built on a Debian Lenny 5.0.6 with kernel 2.6.32.24 taken from Jeremy repository.

I've finally succeed to installing aufs 2.2 /squashs 4.0 in the kernel 2.6.32.24 in order to be built it :)

I've installed xen-tools 4.2 with two configuration files (Lenny server and hardy server) as examples

It is a minimalist LiveCD (no X, no gdm, no libvirt) ...Only Xen 4.0.1 with

  1. xen-tools 4.2
  2. openssh-server: the password for root is toor

1. How to test it?

  1. If you have a DHCP server installed somewhere on your personal network, it's great :)
  2. Ensure that you have enough RAM. (>= 1024M)
  3. Download from http://www.davidgis.fr/download/xen-4.0.1_lenny-5.0.6_kernel-2.6.32.24_i386_v-0.3.iso. (Be patient when you download).
    wget -q http://www.davidgis.fr/download/xen-4.0.1_lenny-5.0.6_kernel-2.6.32.24_i386_v-0.3.iso
  4. Burn it. If you have a tool like wodim
  5. apt-get instal wodim
    wodim -v dev=/dev/cdrom xen-4.0.1_lenny-5.0.6_kernel-2.6.32.24_i386_v-0.3.iso
  6. Boot on CD!
  7. 2. Make a Lenny domU or a Ubuntu Hardy domU

    Once boot is ok, let's try to make a little domU. If you've got the IP from the machine, connect by ssh (the root's password is toor)

    Configuriton file for a Lenny domU

    I will make a domU using a xen-tools configuration file
    xenalive:~# cat /etc/xen-tools/xen-tools-lenny.conf 
    dir = /opt/Xen/
    
    # Méthode d'installation
    #########################
    install-method = debootstrap
    # Prendre un mirroir assez proche
    mirror = http://ftp.fr.debian.org/debian/
    arch = i386
    
    # Configuration de la machine
    ###############################
    size   = 512Mb      # Disk image size.
    memory = 256Mb    # Memory size
    swap   = 128Mb    # Swap size
    fs     = ext3     # use the EXT3 filesystem for the disk image
    dist   = lenny     # Default distribution to install.
    image  = sparse   # Specify sparse vs. full disk images.
    kernel      = /boot/vmlinuz-`uname -r`
    initrd      = /boot/initrd.img-`uname -r`
    
    # Devices et compagnie
    ########################
    ext3_options   = noatime,nodiratime,errors=remount-ro
    ext2_options   = noatime,nodiratime,errors=remount-ro
    xfs_options    = defaults
    reiser_options = defaults
    serial_device = hvc0
    disk_device = xvda
    
    
    # Lors de l'installation, il faudra fournir un mot de passe
    passwd = 1
    
    # On recupere les users du dom0
    accounts = 1
    
    # Repertoire où sont stockés les fichiers de configuration
    output    = /etc/xen/machines 
    
    # Extension des fichiers
    extension = .cfg
    
    # Role necessaire pour installer ssh, notamment lors de la première connexion
    role = udev  
    

    Create the domU

    xenalive:~# xen-create-image --dhcp --hostname=domU-1-lenny --config=/etc/xen-tools/xen-tools-lenny.conf 
    
    General Information
    --------------------
    Hostname       :  domU-1-lenny
    Distribution   :  lenny
    Mirror         :  http://ftp.fr.debian.org/debian/
    Partitions     :  swap            128Mb (swap)
                      /               512Mb (ext3)
    Image type     :  sparse
    Memory size    :  256Mb
    Kernel path    :  /boot/vmlinuz-2.6.32.24
    Initrd path    :  /boot/initrd.img-2.6.32.24
    
    Networking Information
    ----------------------
    IP Address     : DHCP [MAC: 00:16:3E:EF:8C:45]
    
    WARNING
    -------
    Loopback module not loaded and you're using loopback images
    Run the following to load the module:
    
    modprobe loop max_loop=255
    
    
    Creating partition image: /opt/Xen//domains/domU-1-lenny/swap.img
    Done
    
    Creating swap on /opt/Xen//domains/domU-1-lenny/swap.img
    Done
    
    Creating partition image: /opt/Xen//domains/domU-1-lenny/disk.img
    Done
    
    Creating ext3 filesystem on /opt/Xen//domains/domU-1-lenny/disk.img
    Done
    Installation method: debootstrap
    Done
    
    Running hooks
    Done
    
    Role: udev
    	File: /etc/xen-tools/role.d/udev
    Role script completed.
    
    Creating Xen configuration file
    Done
    Setting up root password
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully
    All done
    
    
    Logfile produced at:
    	 /var/log/xen-tools/domU-1-lenny.log
    
    Installation Summary
    ---------------------
    Hostname        :  domU-1-lenny
    Distribution    :  lenny
    IP-Address(es)  :  dynamic
    RSA Fingerprint :  0f:5b:3d:95:dc:ea:84:ce:78:83:02:27:e1:f2:91:f9
    Root Password   :  N/A
    

Start the domU

xm create /etc/xen/machines/domU-1-lenny.cfg -c
... ....
.... ....
Starting OpenBSD Secure Shell server: sshd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 domU-1-lenny hvc0

domU-1-lenny login: root
Password: 
Press ([CRTL]+[5]) to go away from domU. Here is a example of disk when the domU has started
xenalive:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
aufs                  2.0G  414M  1.6G  22% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                   10M  7.6M  2.5M  76% /dev
tmpfs                 2.0G  4.0K  2.0G   1% /dev/shm
/dev/sr0              248M  248M     0 100% /live/image
tmpfs                 2.0G  414M  1.6G  22% /live/cow
tmpfs                 2.0G     0  2.0G   0% /live
tmpfs                 2.0G     0  2.0G   0% /tmp

Infos about the LiveCD

The CD was build with the following options
    • I've used the work done from LiveCD 2.0 (http://wiki.xensource.com/xenwiki/LiveCD) . I've had to modify the scripts from http://github.com/tmartinx/xenlivecd
    • by adding supports for aufs 2.2 and squashs 4.0
      ######### aufs ###########
      CONFIG_AUFS_FS=y
      CONFIG_AUFS_BRANCH_MAX_127=y
      CONFIG_AUFS_HNOTIFY=y
      CONFIG_AUFS_HFSNOTIFY=y
      CONFIG_AUFS_EXPORT=y
      CONFIG_AUFS_BR_RAMFS=y
      CONFIG_AUFS_BDEV_LOOP=y
      ######### squashfs ###########
      CONFIG_SQUASHFS=m
      CONFIG_SQUASHFS_EMBEDDED=y
      CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
      If you want support for aufs (needed for LiveCD), you have to do something like
       cd /linux-2.6-xen/
       git branch my/xen-2.6.32/aufs
       git checkout my/xen-2.6.32/aufs
       git remote add aufs2 http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-2.6.git
       git fetch aufs2
       git merge aufs2/aufs2-32
      
      then
      make menuconfig
    • I've added xen-tools 4.2