Archive for March, 2005

Mapping grub device names with Linux device names

Thursday, March 24th, 2005

To map grub device names to linux device names in case of system containing IDE and SCSI storage devices. You can use device.map file with following format to let grub know the boot sequence:

(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdb
(hd2) /dev/hdc
(hd3) /dev/hdd
(hd4) /dev/cciss/c0d0
(hd5) /dev/ida/c1d1

# grub –device-map=/boot/grub/device.map
grub> root (hd0,0)

grub> setup (hd0)

Basic tar usage (GNU tar)

Thursday, March 24th, 2005

As you probably know tar is designed to store and extract files from an archive file (a tarfile). Here I’ll show you some basic usage of this tool…

Here we go!

Archive a set of files:

tar -cvf tarfile.tar /var/log/syslog /var/log/messages

Archive and compress (gzip) a set of files:

tar -cvzf file.tar.gz /var/log/syslog /var/log/messages

Archive and compress (bzip2) a set of files:

tar -cvjf file.tar.bz2 /var/log/syslog /var/log/messages

Extract a tar file:

tar -xvf file.tar
tar -xvzf file.tar.gz
tar -xvjf file.tar.bz2

Display the content of a tar file:

tar -tvf file.tar
tar -tvzf file.tar.gz
tar -tvjf file.tar.bz2

Replace a file in an existing tar file:

tar -rvf tarfile.tar filetoreplace

Update a file in an existing tar file:

tar -uvf tarfile.tar newfile

Copy all files in one directory to another directory on local host:

cd /etc; tar cf – . | (cd /etc.bak; tar xvpf -)

Copy a directory from one host to another and preserve ownership and permissions:

tar -cf – /var/amavisd | ssh user@otherhost tar -xf -

apt-get for Solaris

Thursday, March 24th, 2005

Recently I’ve discovered what could be the equivalent of apt-get for Solaris: pkg-get. This tool can help you to download and install freeware software. It also can download dependecies if the package have such a thing.

More information…

Announcing Planet Gentoo

Sunday, March 13th, 2005

From Gentoo’s web site:

The user relations project is pleased to announce the launch of Planet Gentoo, a resource intended to improve communication between the user and development communities, as well as internally between developers. Planet Gentoo aggregates articles written by currently over 50 contributing developers and presents them in an easily readable news-like format.