Log in

28 January 2018 @ 06:49 am
Это специальный журнал для того чтобы постить разный tech-related shit и добавлять его в делишс.
Разрешаем вход руту по паролю (чтобы, например, потом загнать шефа бутстрапом)

Read more...Collapse )

but it doesn't help, let's use:
Read more...Collapse )

для пущей индексации пускай будет на английском.
While switching (to be honest - trying to switch, things not going smooth at all, like, while i'm writing this Ubuntu experienced internal error somewhere in kernel related to pulsadio, I guess this is echo of disabling audio on virtual machine properties of VirtualBox, but who knows ;) i've found that:

  1. openvpn plugin for Network Manager usually works (though requiring several time to click on connection) I can connect to vpn, but can't disconnect.

  2. after switching from Unity to LXDE (both are not God blessed if u care) connection icon in system tray (or how linuxoids name it) doesn't show anything related to openvpn.

  3. using openvpn under Network Manager/Unity I was forced to switch default route via remote gateway, while that gateway didn't insist on such configuration.

So I decided to try to start it inside tmux session - works like a charm [for now]. The only thing which occasionally has become broken [who said "what did u expect from Linups on desktop?!"] was the dns servers driven by remote gateway - as it wasn't managed by NetworkManager, openvpn wasn't propogating recieved dns list into my system, surprise, surprise.
To help eliminate this shitty shit, one can use cli interface to dnsmasq via dbus, which still looks and feels weird, but at least works for static connections (i.e. when u know dns servers and them not gonna change). So my snippet is below:

echo "changing dns for internal zones"
dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager.dnsmasq /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:'/localsuffix/',"",""

/localsuffix/ - is zonename/dns_server_ip_for_that_zone , so you can specify that requests for say, srv01.mycompany.localsuffix will go through that server.
"","" - the rest, catch all dns servers, like nearest to you, office ones.

the whole vpn startup script looks like:
cd /home/coolcold && tmux new-session -A -s ovpn 'sudo openvpn --route-up /home/coolcold/changedsnvpn.sh --script-security 2 --config user.ovpn'

Happy Ubunting!
Realtek drivers on linux boxes are not perfect - were leading servers to occasional hangs, especially when working in gigabit network. Hetzner's has special Wiki page for it - "The Linux r8169 driver for the Realtek network chips does not always work correctly, even in the newest kernel versions." . So, I was forced to build module from Realtek's sources and load it before/instead of r8169. That shouldn't be hard, even that wiki article has all needed steps. But article suggests to disable r8169 module via blacklisting, but I wanted to provide fallback mode - i.e. imagine you installed new kernel/upgraded old one and server be booted without network as custom module is not compiled for it and new one is blacklisted.
So, I've googled around and found that modprobe.conf(5) with help of modprobe(8), can be set to execute particular command on module load request (install). 
coolcold@server1:~$ cat /etc/modprobe.d/forceinstall.conf
#using forced install for module override:
install r8169 /sbin/modprobe r8168 || /sbin/modprobe -v -i r8169

This conf line tells modprobe what to do on request of loading module r8169 - it will try to load r8168 module, if this fails, tries to load 8169 modules with "-i" switch, which instructs modprobe to ignore install sections within this invocation (so it won't cycle). Therefore, even if module r8168 is missing in system, 8169 will be loaded, and there is not need for blacklisting!

P.S. Hint - don't forget to update-initramfs after editing modprobe related configs.

03 August 2011 @ 03:23 pm
 let's assume we wanna change terminal type, here is short putty.bat file:

@echo off
set CMD=reg query HKCU\Software\SimonTatham\PuTTY\Sessions

for /f %%i in ('%CMD%') do (
rem echo %%i
reg add %%i /v TerminalType /t REG_SZ /d "xterm-256color"
rem "TerminalType"="xterm-256color"
30 May 2011 @ 07:21 pm
To keep filesystem acls on repository metadata when using mercurial, one should clone repo with:
hg clone --pull /home/user/reponame /projects/repos/hg/reponame
Tags: ,
After successful creation of own repository with Debian packages, one may face the problem of apt blaming that repo like:

W: GPG error: http://repo.coolcold.org lenny-coolcold Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 25102036038088B3

WARNING: The following packages cannot be authenticated!

Puppet gonna be sad too and will complain it can't install packages.
Read more...Collapse )
26 January 2011 @ 01:24 pm
If you have packet loss & timeouts even when pinging your WRT610N v2 router and you are on Hyper-v host with virtual network, don't blame router at once, first check tcp offloading settings . If this doesn't help, then blame router & try to play with SPI setting :)
24 January 2011 @ 05:48 pm
Entry update was issued by Mark Callaghan tests.

XFS file system is known to provide parallelism in operations. There is question-answer text from IRC below, stealing secret knowledge & explanations. Short summary is:
  • metadata operations, like modifying ctime, are not concurrent (for the same object)
  • direct-io data operations are concurrent (you can do several writes in to the same file in one time)
  • for buffered I/O there can be either one writer, or multiple readers
  • extN & co allow readers in parallel to writers which actually is against the fine print in posix

Read more...Collapse )
23 December 2010 @ 03:36 pm
For successfull compiling & booting openvz kernel 2.6.18 ( 028stab079.2 ) on debian lenny it should be compiled with 
1) gawk installed instead of default mawk
2) gcc-4.1 instead of default gcc-4.3
3) command line should look like MAKEFLAGS="CC=gcc-4.1" CONCURRENCY_LEVEL=5 make-kpkg --initrd --append-to-version '-mykernel-gcc4.1' kernel_image kernel_headers

history of debugging - output in hyper-v & debugging kernel & awk problems