Tag Archives: ubuntu

nut upsd usbhid-ups segfault error 4 in libc-2.23.so APC Back-UPS RS 500 ubuntu 16.04


Following error when I tried to start upsd

kernel: [588428.295337] usbhid-ups[15008]: segfault at 0 ip 00007f7fcad3f7d4 sp 00007ffd824c5178 error 4 in libc-2.23.so[7f7fcabf0000+1bf000]

The driver seems to start fine with (with root privileges):

upsdrvctl -u root start

I’ve not further investigated. Just edit the Initscript:

vim /etc/init.d/nut-server

UPSD_OPTIONS="-u root"

line 79

! $upsdrvctl -u root start >/dev/null 2>&1 && \

Have fun!

Ubuntu 16.04 EFI Boot Software Raid


I tried to setup the “EFI System” partition at install time with software RAID1 array. I tried to avoid installing the bootloader to every disk. (I had an RAID1 with spare)

The ubuntu installer allows to set as partition type “EFI System” on the software RAID array. So I thought it would work.

After successful installation the BIOS of the Supermicro mainboard has not found any EFI-Boot partition.

So I destroyed the software RAID of the “EFI System” and installed the bootloader in chroot from a Debian-Live system. I had not to change the partition flag. It was already setup right to “EFI System”

mdadm -S /dev/mdX
mdadm --zero-superblock /dev/sda1
mdadm --zero-superblock /dev/sdb1
mdadm --zero-superblock /dev/sdc1

mkfs.vfat /dev/sda1
mkfs.vfat /dev/sdb1
mkfs.vfat /dev/sdc1

mount /dev/md[RootFileSystemWithBoot] /mnt
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc

chroot /mnt

Now we remove the RAID array from config file

vim /etc/mdadm.conf

Edit your fstab

blkid /dev/sda1
vim /etc/fstab

And last but not least install grub

mount /dev/sda1 /boot/efi
grub-install /dev/sda1
umount /boot/efi

mount /dev/sdb1 /boot/efi
grub-install /dev/sdb1
umount /boot/efi

mount /dev/sdc1 /boot/efi
grub-install /dev/sdc1


Hint: You have to use a install media or live system which is EFI Boot capable and force BIOS to boot from EFI. (You could use my USB Stick). Otherwise EFI support in Linux is disabled.

Have fun!

awstats static html apache ubuntu howto


here some nice howto to get awstats with static html output working under ubuntu

apt-get install awstats libgeo-ipfree-perl libnet-ip-perl

disable the ubuntu cronjob ( comment out everything)

vim /etc/cron.d/awstats

now we setup our /etc/awstats/awstats.domain.tld.conf (cp awstats.conf awstats.domain.tld.conf)


I’ve disabled DNSLookup due to performance issues

create a shell script witch executes awstats


DOMS="domain.tld domain1.tld domain2.tld domain3.tld"

for DOM in $DOMS
/usr/lib/cgi-bin/awstats.pl -config=$DOM -update -LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/apache2/"$DOM"-access.log.1 /var/log/apache2/"$DOM"-access.log |"
/usr/share/awstats/tools/awstats_buildstaticpages.pl -update -config=$DOM -dir=/srv/www/vhosts/host1/$DOM/htdocs/awstats -awstatsprog=/usr/lib/cgi-bin/awstats.pl

Have fun!

make Ubuntu server powerloss proof


Sometimes, after powerloss Ubuntu hangs on boot or asking to fix filesystem errors.
To avoid this problems simply edit following files:

Edit the file:


After that you have to rebuild grub configuration:


Edit the file:


Have fun!