Disable file system check on boot
Sometimes you want to disable time-based automatic check on your filesystems on boot. To do so, you can use the tune2fs utility with the following command:
tune2fs -c0 -i0d /dev/mydev
Where /dev/mydev is your device.
See also:
Howto extract tracks from mkv and avi
This howto requires:
- mplayer
- mkvtoolnix
- your Linux box
Audio from Avi files (es. Xvid + MP3):
mplayer -dumpaudio "mymovie.avi" -dumpfile mymovie_audio_track.mp3
Tracks from Matroska MKV file:
List all tracks:
mkvmerge -i mymovie.mkv
File 'mymovie.mkv': container: Matroska
Track ID 1: video (V_MS/VFW/FOURCC, XVID)
Track ID 2: audio (A_VORBIS)
Track ID 3: audio (A_VORBIS)
Track ID 4: subtitles (S_TEXT/UTF8)
Track ID 5: subtitles (S_TEXT/UTF8)
mkvextract tracks *.mkv 3:mymovie_audio_track.ogg 4:mymovie_subtitle.srt
Creates two files, mymovie_audio_track.ogg (track 3) and mymovie_subtitle.srt (track 4).
Installing Plone on Debian
A little howto to quickly install and try Plone (a GPL’d CMS based on Zope) on your linux box. Well, the installer seems to do the job nicely.
Tested on Plone 3.* version, Debian “Lenny”.
- apt-get install g++
- Download latest version of Plone (Unified Installer)
- Execute:
tar zxvf Plone-YOURVERSION-UnifiedInstaller.tgz
cd Plone-YOURVERSION-UnifiedInstaller
./install.sh standalone
gedit /usr/local/Plone/zinstance/README.txt &
gedit /usr/local/Plone/zinstance/buildout.cfg &
/usr/local/Plone/zinstance/bin/plonectl start
less /usr/local/Plone/zinstance/adminPassword.txt - Add
/usr/local/Plone/zinstance/bin/plonectl startto /etc/rc.local before exit 0 (Red Hat) to run plone at any server restart or create a script on /etc/init.d/ (Debian) like.
README should be read to follow installation instructions, then you can modify Plone configuration on buildout.cfg, and then you can start Plone. On adminPassword.txt you’ll find your Plone passwords to use for administrative purpouses.
Now you can test this CMS based on Python (I’ve tested it 4 years ago, maybe it hardly can replace Drupal but you can give it a try
).
Mount NTFS partition on Debian
Once upon a time, writing to NTFS was a chimera. For years I tell to friends to use FAT32 when installing Windows XP. But now the NTFS support is fine, even on Debian. Just type on your shell:
sudo apt-get install ntfs-3g
sudo mkdir /media/win
And add to your /etc/fstab:
/dev/YOURDEVICE /media/win ntfs-3g umask=0,nls=utf8 0 0
Where YOURDEVICE is /dev/something you can found on Partition Editor for the your NTFS partition. Do a mount -a or reboot to apply changes, and then go to /media/win directory to start to read.
See also:
- Debian HOW-TO : Writing to NTFS instructions are taken from this pretty howto
PEAR install quick howto on Debian Lenny: Image_Graph
Tested on Debian Lenny.
Time elapsed before a working script < 10 minutes
Install PEAR installer:
# apt-get install php-pear
First, type:
pear -h
to get help.
On root shell type:
# pear install --alldeps Image_Graph
Install failed with error:
Failed to download pear/Image_Graph within preferred state “stable”, latest release is version 0.7.2, stability “alpha”, use “channel://pear.php.net/Image_Graph-0.7.2″ to install
Retype as:
# pear install --alldeps Image_Graph-0.7.2
Repeat for other alpha dependencies the same procedure, eg:
pear install --alldeps Numbers_Words-0.15.0
At last, you got:
Nothing to install
Now, you can find all installed packages on /usr/share/php.
ImageGraph is installed on /usr/share/php/Image/Graph.php.
You have to include it on your PHPs.
You can follow the Ian’s howto on:
http://www.phpbuilder.com/columns/ian_gilfillan20060503.php3
To start using PEAR Image_Graph.
Here the result using Ian’s code on my Linux box:
Additional info:
Hosting providers (eg. HostMonster) sometimes furnish simplified PEAR installation via CPanel. So, you can use local PEAR installation for developement, and online installation for production use.
Remember:
- To check differences between local and production versions
- To change include path! (say no to white screen!)
See also:
Change framebuffer resolution
While trying to update kernel in order to run Virtualbox, i got a weird resolution error. On OS boot, screen blanks with an error like “Resolution is beyond allowed limits”. Since this happens before GUI is loaded, Xorg is innocent. I’ve installed the 915resolution patch for a widescreen HP, but it’s innocent too.
Well, this is a framebuffer issue! To solve it I’ve followed these instructions on technobounce.
- apt-get install hwinfo
- hwinfo –framebuffer
- Then make a backup copy of your /boot/grub/menu.lst and add to your kernel line vga=0x035a where 0x035a is the wanted resolution mode.
Netgear WG111 on Debian Lenny with ndiswrapper
Tested on: Debian Etch, Lenny/Sid (Testing), kernel 2.6
- Plug WG111 and type lsusb to verify hardware is plugged. You should get something like:
Bus 003 Device 002: ID 0000:0000 NetGear, Inc. WG111 WiFi (v2)
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
- On root shell, type:
apt-get install module-assistant
m-a prepare
m-a a-i ndiswrapper
modprobe ndiswrapper
Now ndiswrapper module is loaded. (if you got a FATAL: Module ndiswrapper not found fatal error, repeat these steps) - If interface is successfully modprobed, then type
update-modules
To create ndiswrapper module config files. - Add
ndiswrapper
to /etc/modules to load this module on boot. Install some utilities to configure wireless interface.
apt-get install wlassistant ndisgtk ndiswrapper-utils
- Run ndisgtk (or type ndiswrapper -i /media/cdrom0/ndis5/netwg111.inf, where cdrom0 is Netgear driver disc)
- Select Netgear driver from CD-ROM (netwg111.inf): it’ll be copied automatically to /etc/ndiswrapper
- Copy other files under /media/cdrom0/ndis5 in /etc/ndiswrapper/netwg111/
- If interface is not detected, type ndiswrapper -m to write modprobe config files for it.
- Use
gksu network-adminorgksu wlassistantto configure your wireless connection.
Tip: If after system upgrading you cannot access to wireless network, repeat step (2).
See also:
VirtualBox OSE Debian install howto
Tested under:
- GNU/Linux distro: Debian lenny/sid
- Kernel: 2.6 (2.6.22-3-k7)
- Architecture: AMD K7 (Athlon XP 1900+)
Prerequisites: make sure you’ve selected both lenny and sid repositories. In your /etc/apt/sources.list you must read something like this:
## Debian Unstable (sid) deb http://ftp.it.debian.org/debian/ sid main contrib non-free deb-src http://ftp.it.debian.org/debian/ sid main contrib non-free ## Debian Testing (lenny) deb http://ftp.it.debian.org/debian/ lenny main contrib non-free deb-src http://ftp.it.debian.org/debian/ lenny main contrib non-free
You can also add the Virtual Box repository:
##VIRTUALBOX
deb http://www.virtualbox.org/debian etch non-free
deb http://download.virtualbox.org/virtualbox/debian lenny non-free
But achtung! It’s the Evil Proprietary Version.
In this howto, I install the VirtualBox OSE (Open Source Editon) available in Debian repositories.
# apt-get update(necessary if you changed /etc/apt/sources.list)# apt-get install virtualbox-ose virtualbox-ose-source virtualbox-ose-modules-2.6-k7 virtualbox-ose-guest-utils virtualbox-ose-guest-sourceNote: virtualbox Guest Additions should be installed only if you’re running a linux distro within a virtualbox (such a virtual machine is called “guest”)Change virtualbox-ose-modules-2.6-XXX with your architecture (486,686 ecc.). The 486 version is installed by default. This is a meta-package that download the latest version of virtualbox for 2.6 kernel on specified architecture.- After installation, in order to run VirtualBox, you have to plug a kernel module named vboxdrv specific for your kernel. To do this:
# apt-get install module-assistant# m-a prepare# m-a a-i virtualbox-oseIf you’ve installed the binary version from virtualbox.org, specify virtualbox instead virtualbox-ose# modprobe vboxdrv
During module-assistant auto-install (m-a a-i) of vboxdrv module, kernel headers of the running kernel are used to create the module. Then modprobe add plug vboxdrv to the running kernel. If something going wrong in this phase, follow the on screen instruction from the module assistant. Make sure you’ve downloaded the right kernel headers (module assistant should automatically do this, i.e. installing linux-headers-2.6.22-3-k7 for linux-image-2.6.22-3-k7), elsewhere module build cannot be completed.
- Now you can try to run
virtualbox-ose. After you’ve created and run a virtual machine, you can get a message asking you to check dmesg. Open a root shell and typedmesg | grep vbox. The error message ask you to add a kernel command line about NMI watchdog. If it’s your case, do this:- # gedit /boot/grub/menu.lst
- Find a line like
kopt=...and add, before all, the required command:nmi_watchdog=0and save. DO NOT uncomment the line, update-grub make the dirty job for you. # update-grub- Reboot
- Reading the dmesg, you find:
$ dmesg | grep vbox vboxdrv: Trying to deactivate the NMI watchdog permanently... vboxdrv: Successfully done.
This meant that NMI issue is solved.
- Now you can run successfully the virtual machine. Enjoy virtualization!
After installation:
- The vboxusers group
- If you want to allow your unprivileged user to use virtualbox, do:
# sudo adduser `whoami` vboxusersAdd to vboxusers group any other user you want to use this. - Install VirtualBox Guest Additions on Guest
- If you want to enable some advanced features, like mouse and screen resolution tweaks, you’ve to install VirtualBox Guest Additions in the guest virtual machine. If you run a Windows virtual machine, you can get the precompiled (.exe) installer from this dedicated Google Code projectAfter you reboot guest, VirtualBox enable the advanced functionalities, like seamless mode for mouse pointer and a wide range of resolution and colors for the emulated VM video card.
- Update: Well, you can also download Guest Additions from the dropdown menu (Devices) of a running guest. You’ll get a CD image to mount on virtual machine with all the packages you’ve to install.
Note: Virtualbox guest additions on the “host” (real) machine has no effect: if during boot you get the “Not in a virtual machine” error from guest additions, it simply means that your OS run on a host machine, not in a guest one.
See also:




Recent Comments