Archive for September, 2004

Basic control of the tape device

Sunday, September 26th, 2004

The mt command, magnetic tape control allows you to send commands to a magnetic tape. Next you’ll find some basic usage of this utility.

Print status information:

mt -f /dev/rmt/0n status

Rewind the tape:

mt -f /dev/rmt/0n rewind

Erase the entire tape. Be careful with this.

mt -f /dev/rmt/0n erase

Now suppose you want to back a directory called /var/backup:

tar -cvf /dev/rmt/0n /var/backup

And type the following to see its content:

tar tvf /dev/rmt/0n

Now dump a disk slice:

ufsdump 0cvf /dev/rmt/0 /dev/rdsk/c0t0d0s0

or a directory…

ufsdump 0cvf /dev/rmt/0 /var/backup

Now restore a dump:

ufsrestore rvf /dev/rmt/0

References:

Ports used by trojans and viruses

Thursday, September 23rd, 2004

Here goes a list of useful links to ports used by trojans and viruses…

If you are aware of new links, post a comment please.

grub: how to save current menu entry as default

Friday, September 3rd, 2004

If you have many grub menu options, grub can boot the previously booted option

default saved
timeout 15

title Gentoo(2.4)
root(hd0,0)
kernel /boot/bzImage-2.4 root=/dev/hda5
savedefault

title Gentoo(2.6) Qos
root(hd0,0)
kernel /boot/bzImage-2.4 root=/dev/hda5
savedefault

title Gentoo(2.6)
root(hd0,0)
kernel /boot/bzImage-2.6 root=/dev/hda5

Hiding boot time messages

Thursday, September 2nd, 2004

If you want to hide linux boot time messages or store them to a specific location then you could edit the /etc/inittab file and change it as follows:

rc::bootwait:/sbin/rc boot > /dev/null
l0:0:wait:/sbin/rc shutdown > /dev/null
l1:S1:wait:/sbin/rc single > /dev/null
l2:2:wait:/sbin/rc nonetwork > /dev/null
l3:3:wait:/sbin/rc default > /var/log/rl3
…..

Note that this example is taken from Gentoo Linux.