Friday, December 14, 2012
Analyze the boot process with the blame command ARCH linux
Install graphics tools in ARCH
pacman -S eog dot2tex
Script
#-------------------------------
#!/bin/bash
systemd-analyze
systemd-analyze blame
systemd-analyze plot > /tmp/graph.svg
systemd-analyze dot | dot -Tsvg > /tmp/dot-graph.svg
echo "Show graph
eog /tmp/graph.svg
eog /tmp/dot-graph.svg
"
#-------------------------------
Plot svg graph example
Plot svg dot-graph example
Monday, November 26, 2012
Problem with SMART probing sata disk on some chipsets/sata controllers results system is freeze (ata exception frozen).
Very annoying linux / hardware bug triggered by SMART ata check it only manifests in some cases of SATA controllers and hard disks. In my case:
On M3A32-MVP DELUXE controller
Marvell Technology Group Ltd. 88SE6121 SATA II / PATA Controller
Error in /ver/log/messages looks like this:
[ 115.670018] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 115.670027] ata5.00: failed command: SMART
[ 115.670036] ata5.00: cmd b0/d0:01:00:4f:c2/00:00:00:00:00/00 tag 0 pio 512 in
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 115.670039] ata5.00: status: { DRDY }
[ 115.670047] ata5: hard resetting link
[ 115.989123] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 116.088351] ata5.00: configured for UDMA/133
[ 116.088380] ata5: EH complete
[ 7300.699855] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 7300.699863] ata5.00: failed command: IDENTIFY DEVICE
[ 7300.699872] ata5.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 0 pio 512 in
res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 7300.699876] ata5.00: status: { DRDY }
[ 7300.699883] ata5: hard resetting link
[ 7301.019187] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 7301.131523] ata5.00: configured for UDMA/133
[ 7301.131557] ata5: EH complete
Bug reports
Solution - testing
Gentoo udev rules are located in /usr/lib/udev/rules.d
Locate 80-udisks.rules and remove following line:
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"
Rrepeat every time after update of udev.
Monday, August 13, 2012
SElinux problems running custom build Apache
#Install SELinux trubleshoot
yum install setroubleshoot-doc.x86_64 setroubleshoot-plugins.noarch setroubleshoot.x86_64 setroubleshoot-server.x86_64
#This clears whole audit.log use with cotion
#echo ""> /var/log/audit/audit.log
#Run sealert -a to see the problem recomandation
sealert -a /var/log/audit/audit.log
#Run this to what should be done grep by blocked aplication
grep httpd /var/log/audit/audit.log | audit2allow
#Create exceptin module
grep httpd /var/log/audit/audit.log | audit2allow -M apache
#Install custom module to permit exception
semodule -i apache-unlink.pp
#Remove module if its is not neded
semodule -r apache-unlink.pp
#SELinux Labeling file and dirs
semanage fcontext -a -t httpd_sys_content_t '/var/www(/.*)?'
#Apply new policy on files
restorecon -R -v /var/www
#Copy SELinux policy lable
chcon --reference=/usr/bin/test /usr/bin/test1
#Apply new policy on file
restorecon -v /usr/bin/test1
#Human readable events
cat /var/log/audit/audit.log | ausearch -i |less
#Human readable events realtime
tail -f /var/log/audit/audit.log | ausearch -i
yum install setroubleshoot-doc.x86_64 setroubleshoot-plugins.noarch setroubleshoot.x86_64 setroubleshoot-server.x86_64
#This clears whole audit.log use with cotion
#echo ""> /var/log/audit/audit.log
#Run sealert -a to see the problem recomandation
sealert -a /var/log/audit/audit.log
#Run this to what should be done grep by blocked aplication
grep httpd /var/log/audit/audit.log | audit2allow
#Create exceptin module
grep httpd /var/log/audit/audit.log | audit2allow -M apache
#Install custom module to permit exception
semodule -i apache-unlink.pp
#Remove module if its is not neded
semodule -r apache-unlink.pp
#SELinux Labeling file and dirs
semanage fcontext -a -t httpd_sys_content_t '/var/www(/.*)?'
#Apply new policy on files
restorecon -R -v /var/www
#Copy SELinux policy lable
chcon --reference=/usr/bin/test /usr/bin/test1
#Apply new policy on file
restorecon -v /usr/bin/test1
#Human readable events
cat /var/log/audit/audit.log | ausearch -i |less
#Human readable events realtime
tail -f /var/log/audit/audit.log | ausearch -i
Friday, January 27, 2012
OracleVM 3 PW drivers for Oracle Linux 5u7
So, to boot OL5U7, you pass xen_emul_unplug=never on the kernel boot line, which allows the machine to boot with the emulated devices, i.e. they are not unplugged.
Then, edit /etc/modprobe.conf to replace the emulated devices with xen-netfront and xen-blkfront:
Fiel /etc/modprobe.conf should look like this:
alias eth0 xen-netfront
alias scsi_hostadapter xen-blkfront
Then, rebuild initrd:
mkinitrd -f -v --builtin=ehci-hcd --builtin=ohci-hcd --builtin=uhci-hcd /boot/initrd-`uname -r`.img `uname -r`
And reboot. You may get kudzu renaming ifcfg-eth0 to ifcfg-eth0.bak on reboot, because it detects "new" hardware. If so, just rename it back and it should be fine.
Then, edit /etc/modprobe.conf to replace the emulated devices with xen-netfront and xen-blkfront:
Fiel /etc/modprobe.conf should look like this:
alias eth0 xen-netfront
alias scsi_hostadapter xen-blkfront
Then, rebuild initrd:
mkinitrd -f -v --builtin=ehci-hcd --builtin=ohci-hcd --builtin=uhci-hcd /boot/initrd-`uname -r`.img `uname -r`
And reboot. You may get kudzu renaming ifcfg-eth0 to ifcfg-eth0.bak on reboot, because it detects "new" hardware. If so, just rename it back and it should be fine.
Nepomuk reindexing everything after restart
Nepomuk reindexing everything after restart
In your ~/.kde[4]/share/config/nepomukstrigirc file is the the the "first run=" option false?
In your ~/.kde[4]/share/config/nepomukstrigirc file is the the the "first run=" option false?
Tuesday, January 17, 2012
PV-HWM drivers OracleVM 3.0.2 - 3.0.3
In file /etc/modprobe.conf this should be present
#alias eth0 8139cp
#alias scsi_hostadapter ata_piix
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
alias sym53c8xx off
alias scsi_hostadapter xen-vbd
alias eth0 xen_vnif
and initrd shut be regenerated
mv /boot/initrd-2.6.18-274.el5.img /boot/initrd-2.6.18-274.el5.img.old ;
mkinitrd -v /boot/initrd-2.6.18-274.el5.img 2.6.18-274.el5 --with=xen-vbd --with=xen-vnif --preload=xen-balloon --preload=xen-platform-pci
#alias eth0 8139cp
#alias scsi_hostadapter ata_piix
alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
alias sym53c8xx off
alias scsi_hostadapter xen-vbd
alias eth0 xen_vnif
and initrd shut be regenerated
mv /boot/initrd-2.6.18-274.el5.img /boot/initrd-2.6.18-274.el5.img.old ;
mkinitrd -v /boot/initrd-2.6.18-274.el5.img 2.6.18-274.el5 --with=xen-vbd --with=xen-vnif --preload=xen-balloon --preload=xen-platform-pci
LVM filter update
After LVM filter update LVM cache has to be removed
# By default we accept every block device:
#filter = [ "a/.*/" ] default
filter = [ "a|/dev/mpath/notblacklisteddevice|", "r|.*|" ]
rm /etc/lvm/cache/.cache
vgscan
# By default we accept every block device:
#filter = [ "a/.*/" ] default
filter = [ "a|/dev/mpath/notblacklisteddevice|", "r|.*|" ]
rm /etc/lvm/cache/.cache
vgscan
Subscribe to:
Posts (Atom)