Feeds:
Articles
Commentaires

For some reason fdisk -l as root doesn’t show my Samsung Galaxy Ace anymore…
[Android 2.3.6 and Kernel 2.6.35.7 with Linux debian 3.12-1-686-pae #1 SMP Debian 3.12.6-2 (2013-12-29) i686 GNU/Linux]
Usually I have to go through this step in order to mount the device once back in user mode…
But now I must run fdisk -l /dev/sdb in order to show :
/dev/sdb1 8192 7954431 3973120 b W95 FAT32
Then, and only then, can I exit root and mount the device as user with a simple mount /media/vfat/

Publicités

Before using rsync I used the following :
tar czvf "/media/extHD/BACKUPS/$(date +%Y%m%d)_HOME_DATAS.tgz" ~/ --exclude=~/.thumbnails/ /datas/ --exclude=/datas/PHOTOS/

This created a zipped archive to the present date into my external hard drive.
It backs up my home directory and /datas/ excluding files or directories as shown.
Of course I excluded more than just these two but for the purpose of this article I simplified the command line.

I was happy with this a long time but some clusters on the hard drive became defective so I am worried a whole enormous file like these backups would get corrupted as well… and lose everything.
So the only other way, using the exclude option, was rsync…

So here goes :
#!/bin/bash
rsync -av --exclude-from exclude-list.txt . ../media/extHD/BACKUPS /"$(date +%Y%m%d)_HOME_DATAS/"

I put this in a file and used chmod u+x as user to execute it when necessary.
You’ve got to write your exclude list in a file called exclude-list.txt as follows :

PHOTOS
.qt
.dbus
Downloads
.esd_auth
.texmf-var
.thumbnails

Again, this is a short list but you can make it as long as you wish. No need for exact paths, just key-words will do. Don’t forget to add everything you don’t want !
In my example the backup will start from / so if you don’t want /etc, /bin, /share etc… in your archive write them down in your exclude file.
It’s easy, just copy and paste ‘ls’ and edit a little… Make sure both files ‘exclude-list.txt’ and your script are in the same running directory /.

Edit 06/01/2015 :
Now I do this : rsync -zivar --exclude-from exclude-list.txt --delete --progress /home/dir1 /media/ext3/dir1

If looking too long at your screen is tiresome for your eyes and you think it’s linked to its brightness then you can lower it this way :

In order to know what’s the output device, first type :

xrandr --current --verbose

I get the following :
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
DVI-0 connected 1280×1024+0+0 (normal left inverted right x axis y axis) 380mm x 305mm

And further down :
Brightness: 1

Test what brightness you consider best for your eyes :

xrandr --output DVI-0 --brightness 0.88

When you are ready, you can add the line to your ~/.xinitrc. In doing so the right brightness will be loaded with your startx and you won’t have to repeat the operation each time.

The following is a little « grub hack » in order to reinstall on an old debian.

A friend gave me back a laptop with a 3+ years debian installed on it. I just couldn’t get apt-get update and dist-upgrade running… I tried a long time before giving up… Its BIOS doesn’t allow the boot from usb (key/cdrom) and the cdrom drive is out of order…

I finally stumbled upon this link and found a way out…

I downloaded linux and initrd.gz files from debian’s netboot/debian-installer pages into the /boot/grub directory and modified a pre-existant grub menu.list as follows :

  • title newinstall
  • root(hd0,0)
  • kernel /boot/grub/linux
  • initrd /boot/grub/initrd.gz

When rebooting, the grub prompt lets you select newinstall in its menu… The rest is easy if you are used to installing debian. Of course you will have to format the partition where your /boot/grub actually is ! But this doesn’t matter anymore, since what you need to proceed is loaded in the ram memory…

But think twice before doing all of this, since it’s a one shot situation !!

Another thing… unplug all your usb cables/drives when doing this operation. There can be a little confusion between hda/hdb -> sda/sdb and you risk the kernel panic while rebooting !! I’ll get back to this part in a few days…

Une fois n’est pas coutume, cet article sera en français… Un peu obligé puisqu’il s’agit de réaliser un livecd debian "francisé".

Je cherchais depuis longtemps un livecd GNU/Linux qui utilise mon window manager préféré Window Maker. C’est facile d’utiliser un livecd léger et d’apt-get install wmaker… Le livecd Debian de base fait ça… mais c’est plus difficile d’être en français… L’idéal serait de pouvoir faire les deux.

Je découvre donc récemment le live-build web-frontend of the Debian Live Project que l’on peut trouver ICI… Quel bijou… On regrettera que la documentation ne soit pas encore tout à fait au point… Il n’y a aucune explication sur comment créer un livecd en français…

En parcourant l’Internet et en bidouillant un peu, j’ai réussi à obtenir un livecd qui me convient. Voici les options retenues pour sa confection :

LB_DISTRIBUTION="squeeze"

LB_PACKAGES_LISTS="standard"

LB_PACKAGES="abiword alsa-base alsa-utils aspell-fr geeqie gedit dselect gkrellm gnumeric htop inkscape unifont ntpdate rox-filer rxvt-unicode screen vim xpdf wmaker wmakerconf menu xserver-xorg xserver-xorg-input-all xserver-xorg-video-all xutils xbase-clients locales"

LB_MIRROR_BINARY="http://ftp.fr.debian.org/debian/"

LB_BOOTAPPEND_LIVE="locale=fr_FR.UTF-8 keyb=fr"

Je ne vous propose pas l’image iso obtenue (madebian-live_v1.0.iso – 388Mo)… Elle sera probablement désuète lorsque vous lirez ces lignes… Rien ne vous empêche de réaliser la vôtre avec vos paquets indispensables et en français !

Le système n’est malgré tout pas encore en français après le boot… Je copie d’une clé usb les éléments de mon /home/user personnel, avec mes fichiers de configuration, et je relance X. À ce moment-là, j’ai tout ce qu’il me faut pour travailler "comme à la maison" en français dans le texte…
La liste des paquets souhaités est malheureusement limitée en nombre… Il faudra ensuite rajouter les paquets manquants par apt-get install.
Par exemple l’indispensable ifrench-gut pour la vérification orthographique d’abiword et de gedit. Pour installer un paquet il faut passer root : sudo passwd root (vous devinez la suite)
Enfin, les dépendances entre les paquets sont bien sûr assurées…

À noter qu’il existe un paquet live-build mais j’y ai passé une soirée infructueuse… Qu’importe, j’ai un livecd sur mesure qui me convient. Dans quelques mois/années, la documentation et l’outil Live-Build seront incontournables dans le monde du livecd GNU/Linux…

Extracting audio from a video can be troublesome…
For me it seems easier to first convert into wav, as follows :

mplayer -ao pcm:fast:file=audio_out.wav -vo null -vc null video.avi

Then amplify, if needed, using Audacity before encoding into mp3 or ogg :

oggenc -q8 audio_out.wav

Did you get one of these messages ?

Error opening terminal: rxvt-256color.
Cannot find terminfo entry for ‘rxvt-256color’.

Not to worry… All you have to do is make a ~/terminfo directory and paste the rxvt-256color file into it.

mkdir ~/.terminfo
cp /usr/share/terminfo/r/rxvt-256color ~/.terminfo/r/rxvt-256color

If you don’t have the rxvt-256color file at this address (/usr/share/terminfo/r/rxvt-256color) on your remote system, you’ll have to upload it from home and then ssh freely.