Kategori Linux

Festplatten mit Passwort

Donnerstag, Januar 16th, 2014

Nach dem ich 3 neu Platten dem 3ware 9500-12 Controller hinzugefügt habe und sie dann noch in einen andren Server verbauen musste, habe bekam ich folgende Fehlermeldung:

ata1.00: configured for UDMA/133
sd 0:0:0:0: [sda]
Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 0:0:0:0: [sda]
Sense Key : Aborted Command [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
00 00 00 80
sd 0:0:0:0: [sda]
Add. Sense: No additional sense information
sd 0:0:0:0: [sda] CDB:
Read(10): 28 00 00 00 00 80 00 00 08 00
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000001
ata1.00: failed command: READ DMA
ata1.00: cmd c8/00:08:40:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
res 51/04:08:40:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
ata1.00: status: { DRDY ERR }
ata1.00: error: { ABRT }

Das Problem das die Festplatten vom 3ware Controller mit einem Password versehen werden, war mir bekannt. Dennoch testet ich dies auch noch mal mit einer Windows Installation und bekam währende der Partitionierung folgende Fehlermeldung:

Das Erstellen einer neuen Partition auf dem ausgewählten freien Speicherplatz ist fehlgeschlagen. [Fehler: 0x8007045d].

Das Erstellen einer neuen Partition auf dem ausgewählten freien Speicherplatz ist fehlgeschlagen. [Fehler: 0x8007045d].

Mittels hdparm -I /dev/sda kann man den Status abfragen ob die „security feachers enabled“ sind:

Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        260min for SECURITY ERASE UNIT. 260min for ENHANCED SECURITY ERASE UNIT.

Wenn man das Password kennt, ist es eigentlich ganz einfach.

hdparm --security-unlock "password" /dev/sda
hdparm --security-disable "password" /dev/sda
hdparm --security-set-pass NULL /dev/sda

Wenn man das User Password nicht mehr besitzt kann man die Platte mittels. In der Letzten Zeile von Security Block in der Ausgabe von hdparm -I kann man sehen wie lange dieser Vorgang dauert (260min).

Achtung! Alle Daten auf der Platte werden während des Vorganges unwiderruflich gelöscht.

hdparm --security-erase /dev/sda
hdparm --security-erase-enhanced /dev/sda

pidgin und cacert.org

Donnerstag, Januar 9th, 2014

Pidgin hat das Problem das die in libpurple standardmäßig eingebaute libnns nicht die Zertifikatskette von cacert.org überprüfen kann. Wenn man pidgin mit gnutls baut sind alle Probleme behoben. Dann habe ich den Bug bestätigt 15486#comment:8:

I can confirm this bug using the XMPP server at 5222.de. The server certificate is signed by CACert and is accepted as valid by ‚openssl verify‘ ‚vfychain‘ (libnss3-tools).
I have connected to the server using the XMPP client psi, and the certificate is readily accepted.
For testing, I rebuilt pidgin with gnutls instead of libnss. This testing version does not show any certificate error anymore.

dpkg: man-db debconf error

Donnerstag, Dezember 19th, 2013

Heute habe ich fehler auf einem Kunden System gehabt, das das Debian Paket man-db nicht richtig installiert werden konnte.
# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
Setting up man-db (2.6.2-1) ...
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error processing man-db (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
man-db
E: Sub-process /usr/bin/dpkg returned an error code (1)

Schnell war gefunden das der debconf Ortner fehlte:
mkdir /var/cache/debconf
apt-get install -f

ubuntu uefi und gpt mounten

Mittwoch, November 27th, 2013

Bei dem altbekannten Tool fdisk bekommt man die Warnung „fdisk doesn’t support GPT“
root@ubuntu:~# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 31.7 GB, 31658606592 bytes
255 heads, 63 sectors/track, 3848 cylinders, total 61833216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 61833215 30916607+ ee GPT

mit parted kann man diese dann komplett auslesen:
root@ubuntu:~# parted -l
Model: ATA ATP IG mSATA (scsi)
Disk /dev/sda: 31.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 99.6MB 98.6MB fat32 boot
2 99.6MB 30.9GB 30.8GB ext4
3 30.9GB 31.7GB 779MB linux-swap(v1)

Dann weiß man auch welche Partition man mounten kann.
mount /dev/sda2 /mnt/

mtu ermittlung

Dienstag, November 19th, 2013

Hier habe ich mir mal ein Script geschrieben das die MTU ermittelt anhand der große von ICMP Typ 8 Nachrichten.

#!/bin/bash

mtu=0
for i in {8..15}; do
	t=$(($i*100))
	ping -M do -c 1 -s $t blog.chr.istoph.de >/dev/null || continue
	mtu=$t
	echo $mtu 
done

mt=$mtu
for i in {1..10}; do
	t=$(($i*10))	
	ping -M do -c 1 -s $(($t+$mt)) blog.chr.istoph.de >/dev/null || continue
	mtu=$(($t+$mt))
	echo $mtu
done

mt=$mtu
for t in {1..10}; do
	ping -M do -c 1 -s $(($t+$mt)) blog.chr.istoph.de >/dev/null || continue
	mtu=$(($t+$mt))
	echo $mtu
done

echo "MTU: $mtu"