Tag Archives: linux

Hard rebooting Linux

As usual, for future reference…

When shutdown and init fail, and everything else fails too, and we do not have keyboard access to press SysRq:

echo 1 >> /proc/sys/kernel/sysrq
echo b >> /proc/sysrq-trigger

OpenVAS and a problem creating accounts

For future reference…

When creating credentials (Configuration -> Credentials), this error may appear:

Internal error: create_lsc_credential_omp:4506 (GSA 6.0.1) An internal error occurred while creating a new credential. It is unclear whether the credential has been created or not. Diagnostics: Failure to receive response from manager daemon.

The solution is to run these commands:

openvasmd --create-credentials-encryption-key
mkdir /var/lib/openvas/gnupg

Copying the MBR…

A small tip. We want to copy the MBR from one disk to another disk with a different partition table.

Copying the MBR directly (only between identical disks!):

#dd if=/dev/sda of=/dev/sdb bs=512 count=1

This copies 512 bytes from disk sda to sdb, but it will work only with identical partition tables.

To copy between different disks:

Copy to a file:

# dd if=/dev/sda of=/tmp/mbrsda.bak bs=512 count=1

Restore to another disk:

# dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1

This way we preserve the partitioning scheme.