Archive for April 2011

# alsa force-reload

Sometimes you stop a service but it is not enough to definetly stop it after rebooting. In that case you need to execute:

# update-rc.d -f apache2 remove

Other times you need to start a service all times that the Operating System booting, in that case you need to execute:

# update-rc.d apache2 defaults

1. If you don’t want to use the classical app as Network Manager, Wicd to set up the wireless interface, you can set up this on:
/etc/network/interfaces (on Debian)

iface wlan0 inet static
wireless-essid essid_net_name
wireless-key text_passwd

2. Up the wireless interface.. enjoy!

ifup wlan0

* 1 hard disk completely installed as I like it.
* 1 hard disk without format.
* 1 extern disk with just format.
* VERY IMPORTANT: All hard disks must be to same size.

To copy the hard disk, which is completely installed as I like it, to an extern empty disk, first boot with a rescue cd then run:

root@buzz:~# dd if=/dev/sda of=/dev/sdb bs=2G 2> dd.errors

Notice that dd.errors is a file where all errors will be redirected.
if means “input file”, in that case is the hard disk that is completely installed as I like it.
of means “output file”, in that case is the extern disk.
bs means count of blocks at a time. In that case are blocks of 2G. It shouldn’t be more than the size ram.

Now, you should ran dd one more time, from extern disk to the disk without format. So boot with a recue cd again in order to access to disk without format.

root@buzz:~# dd if=/dev/sdb of=/dev/sda bs=2G 2> dd.errors

Reboot it, without rescue cd! aaaand enjoy!!

Sometimes you have a computer with all necessary packages installed, then you have to install another one but it is tricky to pass by command line all packages!! so the old dpkg provides you a method to do that without effort. Enjoy it!

To make a local copy of the package selection states

root@buzz:~# dpkg --get-selections > packages_list_to_install

packages-list-to-install is a file with a complete list of all packages installed on the computer where you ran.

You might transfer this file to another computer, and install it there with:

root@squeeze:~# dpkg --clear-selections
root@squeeze:~# dpkg --set-selections < packages_list_to_install

To actually download and install the requested packages

root@squeeze:~# apt-get dselect-upgrade

  • analialorenzatto: Buzz is just a host name for this example, it doesn't have any relation to the topic. Instead of being "Buzz", could be whatever name.
  • fridelain: >buzz What's the story behind this host name? Actully running buzz, once running buzz and upgraded many times since, or unrelated to debian naming
  • Pratik: Nice, but I would change it to include more directories. Like my .mozilla and .kde4 by using .{config,mozilla,kde4} instead of just .config .