Wednesday, May 17, 2017

Failed to load modules during boot

Failed to load modules during boot
https://bugzilla.redhat.com/show_bug.cgi?id=1400041

 systemctl status systemd-modules-load.service

Resolved with: dracut --regenerate-all --force

Monday, November 14, 2016

Kernel error after update centos 7 3.10.0-327.36.3.el7

Kernel error after update centos 7 3.10.0-327.36.3.el7

For installed system:
  - boot with the initcall_blacklist=clocksource_done_booting kernel parameter added  (or reboot on previous kernel)
  - once booted, add the same parameter at the end of the GRUB_CMDLINE_LINUX=" .." line , in the  file /etc/default/grub - as root, run "grub2-mkconfig -o /etc/grub2.conf" 

For a system you want to install:
  - start the kernel/boot media with the initcall_blacklist=clocksource_done_booting kernel
 parameter added
  - when you reboot, add the solution above (for installed system) if not already applied to
 the default grub config

Thursday, October 13, 2016

Gimp 2.8 antialiasing error

Gimp 2.8 antialiasing error (fedora 24 and other linux distributions).

echo "<fontconfig>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>none</const>
    </edit>
  </match>
</fontconfig>" > /etc/gimp/2\.0/fonts.conf
 
Ref.
https://bbs.archlinux.org/viewtopic.php?pid=1486825#p1486825 

Thursday, October 6, 2016

Editing scantofile

I'm editing the scantofile for my new Brother DCP Scanner.  Hard Work searching the information.

----------
#! /bin/sh
set +o noclobber
#
#   $1 = scanner device
#   $2 = friendly name
#

#  
#       100,200,300,400,600
#
resolution=200
device=$1
BASE=$HOME/Documents/BrScan
mkdir -p $BASE
if [ "`which usleep  2>/dev/null `" != '' ];then
    usleep 1000000
else
    sleep  0.01
fi
output_tmp=$BASE/$(date +"%Y-%m-%d_%Hh%M")

echo "scan from $2($device)"
scanimage --device-name "$device" --resolution $resolution --batch="$output_tmp"_%04d.tiff  --format=tiff -x 210 -y 297

for tifffile in $(ls "$output_tmp"*)
do
   tiffcp -c lzw "$tifffile" "$tifffile".lzw.tiff
   tiff2pdf "$tifffile".lzw.tiff > "$tifffile".pdf
   rm -f "$tifffile"
   rm -f "$tifffile".lzw.tiff
done

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile="$output_tmp".pdf $output_tmp*.pdf

rm -f "$output_tmp"*tiff*
----------

Ref.
http://www.jduck.net/blog/2008/01/05/ocr-scanning/
https://gist.github.com/sunix/3263040
http://stackoverflow.com/questions/2507766/merge-convert-multiple-pdf-files-into-one-pdf

Tuesday, July 21, 2015

Samba Migration to a New Server

#OLD SERVER
 mkdir /root/move


# Stop samba services
 service smb stop
 service nmb stop
 ckconfig smb off
 chkconfig nmb off

# RHEL/CentOS/Fedora: Default is 500 and upper limit is 65534 (/etc/libuser.conf).
# Debian/Ubuntu: Default is 1000 and upper limit is 29999 (/etc/adduser.conf).
 export UGIDLIMIT=500
 awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/passwd > /root/move/passwd.mig
 awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534)' /etc/group > /root/move/group.mig
 awk -v LIMIT=$UGIDLIMIT -F: '($3>=LIMIT) && ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow > /root/move/shadow.mig

SERVER=IPADDRESS-HERE
 rsync -av /home/ $SERVER:/home/ --delete
 rsync -av /root/move $SERVER:/root/
 rsync -av /root/bin $SERVER:/root/ --delete
 rsync -av /etc/samba $SERVER:/etc/ --delete
 rsync -av /var/lib/samba $SERVER:/var/lib/ --delete

#NEW SERVER
 cd /root/move
 cat passwd.mig >> /etc/passwd
 cat group.mig >> /etc/group
 cat shadow.mig >> /etc/shadow

#IF smbpasswd convert to tdbsam

 pdbedit -i smbpasswd -e tdbsam

mv  /etc/samba/passdb.tdb /var/lib/samba/private
mv /etc/samba/secrets.tdb /var/lib/samba/private

#Start Samba services
 service smb start
 service nmb start
 chkconfig smb on
 chkconfig nmb on

Ref:

http://amar-linux.blogspot.com/2012/03/migrating-samba-server-and-users-in.html
http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/

Thursday, June 18, 2015

Fedora 22, error with Nvidia propietary drivers and clutter

Temporary solution to error opening cheese, gnome maps, and others.

ADD:

     export CLUTTER_BACKEND=x11

to /etc/environment and restart.

References:
https://bbs.archlinux.org/viewtopic.php?id=196029

Tuesday, May 26, 2015

How to make GRE tunnel iptables port redirect on Linux

1. Load the ip_nat_pptp and ip_conntrack_pptp kernel module
modprobe ip_nat_pptp
modprobe ip_conntrack_pptp

vi /etc/sysconfig/iptables-config
IPTABLES_MODULES="ip_nat_pptp"

http://www.pc-freak.net/blog/how-to-make-gre-tunnel-iptables-port-redirect-on-linux/
http://download.parallels.com/doc/pcs/html/Parallels_Cloud_Server_Users_Guide/30254.htm