Flux
Articles
Commentaires

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.

(Re) Encoding Audio Files

This small script below is a work in progress, still very useful in its present form… It rips from Audio CDs in wav format. If you start from other formats like flac, this will convert them easily to wav.
Then a basic way to encode in mp3 but most important to ogg with a decent information tag.
Finally, my way to remove special characters from file names.
The comment option in oggenc doesn’t work properly (unless you use "=" in the text)… If you want to add a comment, use easytag to do so… This will help creating a playlist.m3u as well.

#!/bin/sh
# from Audio CD :
# cdparanoia -B
#
# APE/FLAC/AMR/other to WAV :
# for i in *.flac ; do mplayer "$i" -ao pcm:file="${i%.flac}.wav" ; done
#
# Encode to MP3 :
# for i in *.wav; do lame -b 192 "$i" "${i%.wav}.mp3" ; done
#
# Encode to OGG :
oggenc -q8 –name-remove " (‘;:,!?+)" –name-replace "_-_–" –names "%n_%t.ogg" \
–artist "HILDEGARD VON BINGEN (1098-1179)" \
–genre "Classical" \
–date "1983" \
–album "A feather on the breath of God" \
–tracknum "01" –title "Columba aspexit" *01*.wav \
–tracknum "02" –title "Ave, generosa" *02*.wav \
–tracknum "03" –title "O ignis spiritus" *03*.wav \
–tracknum "04" –title "O Ierusalem" *04*.wav \
–tracknum "05" –title "O Euchari" *05*.wav \
–tracknum "06" –title "O viridissima virga" *06*.wav \
–tracknum "07" –title "O presul vere civitas" *07*.wav \
–tracknum "08" –title "O Ecclesia" *08*.wav
#
# Remove special characters :
for i in *.ogg ;
do mv $i `echo $i | sed ‘s/_-_/-/g ; s/_-/-/g ; s/-_/-/g ; \
s/É\|È\|Ê\|Ë/E/g ; s/é\|è\|ê\|ë/e/g ; \
s/Ú\|Ù\|Û\|Ü/U/g ; s/ú\|ù\|û\|ü/u/g ; \
s/Í\|Ì\|Î\|Ï/I/g ; s/í\|ì\|î\|ï/i/g ; \
s/Á\|À\|Â\|Ä\|Å\|Ã/A/g ; s/á\|à\|â\|ä\|å\|ã/a/g ; \
s/Ó\|Ò\|Ô\|Ö\|Ø\|Õ/O/g ; s/ó\|ò\|ô\|ö\|ø\|õ/o/g ; \
s/Ç/c/g ; s/ç/c/g ; \
s/Ñ/N/g ; s/ñ/n/g ; \
s/Ÿ/Y/g ; s/ÿ/y/g’` ;
done

my /etc/lilo.conf

If you get this message when running lilo : Warning: LBA32 addressing assumed, maybe you need to have a look at your config file and add lba32.
Oh yes… I’m a LILO user and intend to stay that way… I couldn’t care less about grub’s menu-lst, grub2 or grub-pc… Never saw the progress in using grub…

Here’s my /etc/lilo.conf :

large-memory
lba32
boot=/dev/sda
root=/dev/sda2
map=/boot/map
delay=20
vga=normal
read-only
default=Linux
image=/vmlinuz
label=Linux
initrd=/initrd.img
image=/vmlinuz.old
label=LinuxOLD
initrd=/initrd.img.old
optional
other=/dev/sda1
label=Windows

Random Playing in Mplayer

I was looking for a way to play random music on my computer using mplayer and needed to shuffle recursively throughout many mp3/ogg files and directories in order to do so.

mplayer -shuffle `find . -name "*.mp3" -o -name "*.ogg"` does the trick.

Because of the result of my `getconf ARG_MAX`, I can only random through 2097152 files… but it’ll be alright I think…

Of course you can also make an alias out of it, as follows :
alias randomize=’mplayer -shuffle `find . -name "*.mp3" -o -name "*.ogg"`’

And one more thing : no gaps in the file paths. Use underscores "_".

Thank you again mirmo, christophe971 and kik…

WindowMaker Icon Free

It’s been quite some time since I wanted to do this… I cannot use any other window manager than WindowMaker but with the mini I badly need space on the desktop… I never use the application icons nor the WMClip/WMDock ones… Here is how it all goes away :

First the application icons :


Just right click on the titlebar of your application and launch the specs (attributs in french)… Choose not to have the application icon… Do this again with every application commonly used and you’re ready for the next step…

The WMClip/WMDock icons :


This image speaks for itself… Just open the wmaker preferences and add 2 big red crosses… Restart your wmaker after saving your session…


Now live happily ever after, using alt-1 alt-2… to switch in between desktops…

00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC’97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC’97 Modem Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] (rev 02)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5705M Gigabit Ethernet (rev 01)
02:01.0 CardBus bridge: O2 Micro, Inc. OZ711EC1 SmartCardBus Controller (rev 20)
02:01.1 CardBus bridge: O2 Micro, Inc. OZ711EC1 SmartCardBus Controller (rev 20)
02:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)

If by any chance your video card is ATI then you may have come across this message in mplayer :

[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run ‘xvinfo’ to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See ‘mplayer -vo help’ for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.
Error opening/initializing the selected video_out (-vo) device.

You need to reboot after the following :
apt-get install firmware-linux firmware-linux-nonfree

It seems the kernel 2.6.32-5 and xorg 1:7.5+6 require the ATI/radeon firmware to work the xv video output right…

Articles Précédents »

Suivre

Get every new post delivered to your Inbox.