Home » Fixes (Page 2)

Category Archives: Fixes

Host your website at All-inkl.com ALL-INKL.COM - Webhosting Server Hosting Domain Provider

Which section on error-blog.com do you like most?

View Results

Loading ... Loading ...

3ware 9500S-4LP – Raid 5 Degraded

screwdriver and micro chip

The Problem

I had a RAID 5 failure on an old Linux Server with special hardware connected. A RAID 5 as you probably know is a redundant disk array of hard disks. Disks are usually connected to a RAID Controller. The controller in my server is a 3ware 9500S-4LP. This controller is outdated but still available to buy at some web shops. Sometimes it is not possible to migrate outdated systems to new hardware like in this specific case.

On my server three disks were attached to the controller. I used the tw_cli which was available for downloading on the 3ware homepage in the past. Recently I found the binaries here:


I downloaded the tw_cli package, extracted it, executed it and then to get an overview I did:

//server> show 

Ctl	Model 		Ports	Drives	Units	NotOpt	RRate	VRate	BBU ------------------------------------------------------------------------ 
c8 	9500S-4LP 	4 	3 	1 	1 	4 	4 	-

I used the “show” command to get the basic controller information.

Then, the next command showed detailed information about the controller state.

//server> info c8 u0 
Unit 	UnitType Status 	%Cmpl 	Port 	Stripe 	Size(GB) Blocks 
u0 	RAID-5 	DEGRADED 	- 	- 	64K 	745.037 1562456064 
u0-0 	DISK 	DEGRADED 	- 	p3 	- 	372.519 781228032 
u0-1 	DISK 	OK 		- 	p2 	- 	372.519 781228032 
u0-2 	DISK 	OK 		- 	p0 	- 	372.519 781228032

I saw that it was degraded because of a failed disk.

The Fix

I had to stop all the processes which were executed on the RAID 5 volume. Then I had to umount the RAID 5 volume from the file system. The next step was to remove the degraded disk on the port 3 with this command:

//server>maint remove c8 p3

Then I shut the server down. I saw on the controller hardware on which SATA Port the p3 Disk was connected. I replaced the disk with a newer, bigger one. The cache of the new disk was bigger than on the old one. That is important!

//server>maint rescan c8

This was the next important step – “rescan” for the newly installed disk. And then to start recreation of the RAID I finally did:

//server>maint rebuild c8 u0 p3

After a few hours i got this:

//server> info c8 u0 
Unit 	UnitType 	Status 	%Cmpl 	Port 	Stripe 	Size(GB) Blocks ----------------------------------------------------------------------- 
u0 	RAID-5 		REBUILDING 42 	- 	64K 	745.037	1562456064 
u0-0 	DISK 		DEGRADED 	- p3 	- 	372.519	781228032 
u0-1 	DISK 		OK 		- p2 	- 	372.519	781228032
u0-2 	DISK 		OK 		- p0 	- 	372.519	781228032

The rebuild took only a few hours.

If the Rebuild doesn’t start and you get an error message, it could be a good alternative to start the rebuild inside the controller BIOS.

Finally the server was as good as it was before 🙂

Rootkit Scan with Ubuntu Live System

Black man with mobile computer

Basic Information

Sometimes it is the case that Linux, like other Operating Systems, shows odd behavior. And in some cases the cause of the odd behavior cannot be comprehended although log files are verified and the hardware is checked. I had this problem too often in the past years.

Then often I check the system for malicious software. On Linux are programs available which are scanning for a so called Rootkits. A Rootkit is a malicious software which grant administrative access to the attacker or hacker.

Well known detection software for Rootkits are programs like Rootkit Hunter, Unhide or Chkrootkit.

The difference between a Rootkit and a Virus is that the Virus doesn’t necessarily administrative access to the system.

The Problem

If the Rootkit scan is done on a System which is already infected, then the Rootkit is probably not found because the Rootkit is hidden. There are only hints which are only difficult to distinguish from false positives.

The Fix

Rootkit scans can then be done from a Linux Live system. Just follow the following steps:

1. Step

Download Ubuntu Live Iso file and install the Iso file to a USB stick.

2. Step

Boot the Ubuntu Live system and select “Try Ubuntu”.

3. Step

Install Chkrootkit:

apt-get update
apt-get install chkrootkit

4. Step

On my system the following partitions exist:

  • sda1 – swap space
  • sda2 – this is the root partition /
  • sda3 – this is my home partition /home
  • sda4 – this is the home directory of the root user /root

5. Step

mkdir /mnt/disk – creates a directory
mount /dev/sda2 /mnt/disk – provides access to the filesystem and the files on the system which I want to scan
mount /dev/sda4 /mnt/disk/root – this location will be also scanned, so it is important to grant access to it

6. Step

Do the Scan with the following command:

chkrootkit -r /mnt/disk/

Normally the output should say things like “nothing found” or “not infected”.


If there is a detected Rootkit do another scan with Rkhunter. It could still be a false positive.
Rkhunter needs to be installed and updated.
If there is a Rootkit installed you should reinstall the Operating System.

Get DOS Game Ascendancy running in DOSBOX

man playes pc game, lights in  the background

Basic Information

Today I wanted to run an old DOS game called Ascendancy which was released 1995 by the “Logic Factory”. The game is about conquering the whole universe, doing research and war or diplomacy.

It’s basically a strategy game.

I am using Dosbox for old DOS games on Linux. Dosbox creates an old DOS like environment and the old .exe files can be started in this environment. Tutorials on how to install and to use Dosbox can be found in the internet.

The Problem and the Fix

In the Dosbox the game doesn’t run because the 3 major files of the game need to be found by the binaries. A configuration file contains the path to the 3 files and this configuration file needs to be adjusted. The files are “ascend00.cob”, “ascend01.cob” and “ascend03.cob”.

The configuration file is in the main directory of the game and is called “COB.CFG”. Open this file with an editor and adjust the path to the 3 files above.


It’s not rocket science this time in my post but hopefully someone is helped with this information.

Start the game and have fun 😉

OPNsense NAT Port Forward not working

many blue cables in plugs

Basic Information

OPNsense is a FreeBSD based Firewall Software. Port Forwarding is the way to publish a service in the network which is protected by the Firewall to the Internet. Forwarded could be any service like Http, SSH, RDP and so on. I tried to publish a SSH Server to the internet in a lab environment. The Port Forwarding in OPNsense is done by a NAT rule and a firewall rule.

My test network consists in a single subnet with an private IP address space and a OPNsense has a single public WAN IP address assigned.

The Problem

The official way to publish the SSH Server to the internet like it is described in the OPNsense documentation failed. Normally, if an NAT rule is created, an associated Firewall rule is created as well.

In my case, the automatically created Firewall rule didn’t allow access to the SSH service. It seems that there is a bug in the current version of OPNsense.

The Fix

Basically the work around was to just set a NAT rule and not to do “Add associated filter rule”. I use SSH (port 22) as target port. Here are the details:

Interface: WAN 
TCP/IP Version: IPv4
Protocol: TCP
Destination: WAN address
Port Range: 22
Redirection target IP: private IP address of SSH server
Redirection target Port: 22

Most important:

Filter rule association: Pass


Please keep in mind that I did this procedure in a test environment with limited security side effects. It could be the case that in future releases the “Add associated filter rule” will be working again. But at the time of writing this blog post, no other option worked than to do the work around with “Pass” option as described above.

ZFS and ZPool – Migrate a Stripe Set to a Mirror (RAID 0 to RAID 1)


Basic Information

ZFS is a modern file system with a lot of cool features, like encryption, handling very big volumes, providing data integrity (bit rot prevention) and high performance. Originally ZFS was developed by Sun Microsystems.

Host your website in Germany at All-inkl.com
ALL-INKL.COM - Webhosting Server Hosting Domain Provider

The Problem

Recently I had the problem to migrate a ZFS RAID 0 (Stripe Set) consisting in two disks to a ZFS RAID 1 (Mirror). The aim was to avoid data loss and downtime of my system. I was searching in the internet but no solution was found by me.

Before I tried to fix the problem on the production system, I created a lab environment with two USB sticks and tested the procedure. The following steps were done with two USB Sticks on a Ubuntu PC.

The USB sticks are show on my Ubuntu PC as the devices /dev/sdb and /dev/sdc.

Step 1 – Creating the ZFS ZPool

First I created a single disk ZPool with the following command:

zpool create tank /dev/sdc 

The name of the ZPool is “tank” and the first USB stick I added was the one which appeared as /dev/sdc.

Step 2 – Creating the ZFS Stripe Set

Then I added a second disk to the ZPool. The following command created a Stipe Set consisting in /dev/sdc and /dev/sdb:

zpool add tank /dev/sdb

Now I had the same situation on my Ubuntu PC like on my production system: Just a Strip Set.

Step 3 – Removing a Disk from the ZFS Strip Set

Now the interesting part started. Removing the device /dev/sdb from the Strip Set.

zpool remove tank /dev/sdb

The procedure took some time to complete. I just executed “zpool status” and observed the progress.

If there is enough space left on the remaining disk to keep all original data it should be just fine and the procedure should work.

Step 4 – Creating the ZFS Mirror

The goal was near – just added a disk to the single disk ZPool. With the “attach” option a mirror (RAID 1) is created out of the devices “/dev/sdb” and /dev/sdc”:

zpool attach -f tank  /dev/sdb /dev/sdc


Please keep in mind that this procedure works only if the Strip Set is not too full. The remaining disk in the Strip Set (Step 3) needs to have enough capacity to keep the original Strip Set data alone.

That’s it – have fun!


Recently I wanted to run an old DOS game called ZED (created by Bitmap Brothers, 1996) in a Dosbox on Ubuntu. Dosbox is an emulator which enables to run old DOS games and applications on a modern PC. ZED is a realtime strategy game.

After installing Dosbox on Ubuntu and putting the Software under the file system path “/home/MyUser/Desktop/Dos/Z”, I started the dosbox.

I executed the following commands in the dosbox:

mount c /home/MyUser/Desktop/Dos
cd z

The Problem

I could start the game but finally I ended up with this error message on starting the first level of the game:

Missing: MAIN.PAC

The Fix

It seems that an old times piracy protection prevented me to start Level 1 of the game. I had to emulate a CD Drive and start ZED again with this commands:

mount d /home/MyUser/Desktop/dos/z -t cdrom

Finally I could start and enjoy the game.

Cannot install Windows 11 on Samsung NVMe

Opened Harddisk drive

Basic Information

Recently I created with Ubuntu and the Linux dd Tool (Disk Dump) a bootable Windows 11 USB Stick. The aim was to install Windows 11 on a PC with a Samsung NVMe disk.

The Problem

As I started the Windows 11 installation procedure no disk was shown by the Windows installer and I was asked to provide an appropriate storage/disk driver. I basically could not install Windows on the NVMe disk, no matter which drivers I provided.

I also changes several BIOS settings without success. No matter if I changed setting like “Secure Boot”, operating system type, “fast boot” and so on, I was not able to install Windows 11. I tried also to install Windows 10 but failed too.

After a long search with Google I could finally fix the issue on my PC.

The Fix

I just created the USB Stick again, but not with dd (Disk Dump).

I installed the tool WoeUSB on my Ubuntu PC which is an Opensource tool and available for Linux. Then I installed the Windows ISO with WoeUSB on the USB Stick.

Please note that the step called “Installing GRUB bootloader for legacy PC booting support…” took me very long time – up to 25 minutes but the installation on the stick succeeded in my case.

That‘s it. After booting the Stick, the NVMe was recognized by the Windows installer and no driver was required. I could just modify the Partitions and Volumes and went on with the installation.

Not enough free Disk Space on /boot

notebook cd roms and floppy disks

Recently I tried to install updates with “apt-get upgrade” on a Ubuntu Desktop 20.04 LTS. The installation of the updates failed because of to less free space on the boot partition.

I got the following error message:

Not enough free disk space

The upgrade has aborted. The upgrade needs a total of 25.7 M free space on disk '/boot'. Please free at least an additional 25.7 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

The aim for me was just to free up some space on /boot so that I could install the newest kernel version.

So I just executed this command in the Linux terminal:

root@ubuntubox:/# dpkg -l |grep linux-image |grep -v extra

A lot of obsolete kernel versions where shown.

The next step for me was to remove one or more obsolete kernels:

root@ubuntubox:/boot# apt-get remove linux-image-4.15.0-169-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
Suggested packages:
  fdutils linux-doc-4.15.0 | linux-source-4.15.0 linux-tools
The following packages will be REMOVED:
  linux-image-4.15.0-169-generic linux-modules-extra-4.15.0-169-generic
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 2 to remove and 4 not upgraded.
Need to get 8.119 kB of archives.
After this operation, 181 MB disk space will be freed.
Do you want to continue? [Y/n] Y

I did this for several OLD kernels then there was enough free space on /boot again.

Host your website at All-inkl.com ALL-INKL.COM - Webhosting Server Hosting Domain Provider

Women makes 500$ with infolinks.com

consulting picture

WordPress Cookie Notice by Real Cookie Banner