úterý 23. prosince 2008

PF 2009


PF 2009, originally uploaded by smejdil.

PF 2009

Příjemné prožití Vánočních svátků, a do nového roku 2009 pohodu a klid.

Přejí Simona, Vojta a Lukáš

čtvrtek 18. prosince 2008

Jak zjistit UUID u nového disku

Instaloval jsem server s / 5G parcelou pro systém. No a posléze jsem se rozhodl na ESX dané VM přidat disk s 512G jako /data. Klasika fdisk a mkfs.ext3 -m 1 /dev/sdb1. Na tom mení nic zváštního. Ale když chci pridat disk do fstabu, tak po staru je to jasne, ale po novu se disku přiděluje s UUID a to se v /dev/disk/by-uuid/ nějak neobjevilo. Kamarád googl poradil.

root@server:~# blkid
/dev/sda1: UUID="392822d3-208d-4e84-b015-a26509ce99e7" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="863f046c-8ee9-41fa-9184-4cf8eeef4d00"
/dev/sdb1: UUID="2847aa41-de17-4e42-ba06-207736d42269" TYPE="ext3"

no a do fstab přidáme toto:

# /dev/sdb1
UUID=2847aa41-de17-4e42-ba06-207736d42269 /data ext3 relatime

úterý 16. prosince 2008

Kamarád SED nahrazuje slova

http://www.brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html

sed -i 's/ugly/beautiful/g' /home/bruno/old-friends/sue.txt

nebo

find /home/bruno/old-friends -type f -exec sed -i 's/ugly/beautiful/g' {} \;

Též podnětné informce jsou zde:
http://student.northpark.edu/pemente/sed/sed1line.txt

Ale joe je taky dobrej kámoš

Byte Order Mark (BOM) FAQ

http://unicode.org/faq/utf_bom.html#BOM


EF BB BF UTF-8 # neviditelny znak

http://en.wikipedia.org/wiki/Byte-order_mark


Narazil jsem na to v souboru .cvsignore, kde neni UTF-8 posporovano!

PsiMedia Good :-)


PsiMedia, originally uploaded by smejdil.

Na podnět Negra Qbica

http://lists.affinix.com/pipermail/delta-affinix.com/2008-November/001406.html

Zkouším zprovoznit na Ubuntu-8.04.1

Potřebné balíky

gstreamer0.10-plugins-base, gstreamer0.10-plugins-good, gstreamer0.10-plugins-bad,gstreamer0.10-ffmpeg

Hlavičkové soubory pro kompilaci.
libgstreamer-plugins-base0.10-dev, gstreamer0.10-doc

Subversion:

svn checkout https://delta.affinix.com/svn/trunk/psimedia
cd psimedia
qmake
make
./demo/demo

:-)

Takže již zakrátko PSI bude umět audio a video.

čtvrtek 11. prosince 2008

Jak se dá taky kopirovat cely OS :-)

## remote shell na LiveCD SystemRescueCD
ssh root@192.168.0.42


## Vytvoreni parcely a fs

root@ubuntu:~# fdisk -l

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes

255 heads, 32 sectors/track, 35132 cylinders

Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System

/dev/cciss/c0d0p1 1 33132 135178544 83 Linux

/dev/cciss/c0d0p2 33133 35132 8160000 82 Linux swap / Solaris


## Format disk

mkfs.ext3 -m 1 /dev/cciss/c0d0p1

mke2fs 1.40-WIP (14-Nov-2006) # verze libext


mkdir /mnt/disk_os

mount -t ext3 /dev/cciss/c0d0p1 /mnt/disk_os

#export RSYNC_RSH='ssh -c arcfour'

rsync -avx -e "ssh -c arcfour" / root@192.168.0.42:/mnt/disk_os

building file list ...

...

wrote 79643564403 bytes read 11658020 bytes 7454515.22 bytes/sec

total size is 79497824257 speedup is 1.00


Dale lilo.conf nebo grub swap a jine drobnosti :-)

sobota 6. prosince 2008

Čerti ve Dvoře


Čerti, originally uploaded by smejdil.

Když čerti, tak pořádně špinaví. I na 5. květnu se tyhle typani s Mikulášem vyskytovali. Jen by mě zajímalo jakej zloduch vykrádá auta a bere si baterky. Čerti to nebyli, ale nějakej KOKOT.

pátek 5. prosince 2008

Jak z CVS dostat starší projekt

cvs checkout -D 2008-08-21 www2007

Je to easy man cvs

Dále jak updatnou nový adresář

cvs -nq update -d # ukáže co je k updatnutí i s adresářema

cvs -d update sql_my


Flickr

This is a test post from flickr, a fancy photo sharing thing.

Jak archivavat TARem seznam souborů

Připravíme si seznam souborů např. programu screen


pkg_info -L screen-4.0.3_5 > file_list.txt

tar: Removing leading `/' from member names

joe file_list.txt

Odstraníme / na začátku souboru


cd /


tar cvzf /tmp/screen_tar.tgz `cat file_list.txt`


Důvodem této opičárny je neexistence balíčku screen.


[FreeBSD /usr/ports/sysutils/screen]# make package
===> screen-4.0.3_5 may not be packaged: Tends to loop using 100% CPU when used from package - perhaps it hard-codes information about the build host.


Zdravím RSA a pfSense

středa 3. prosince 2008

LTS Ubuntu = “Long Term Support”

https://wiki.ubuntu.com/LTS

LTS is an abbreviation for “Long Term Support”.

We issue a new desktop and server release every six months. That means you'll always have the latest and greatest applications that the open source world has to offer.

Ubuntu is designed with security in mind. You get free security updates for at least 18 months on the desktop and server.

With the Long Term Support (LTS) version you get three years support on the desktop, and five years on the server. There is no extra fee for the LTS version, we make our very best work available to everyone on the same free terms. Upgrades to new versions of Ubuntu are and always will be free of charge.

http://wiki.ubuntu.cz/LTS

Nutno založit danou stránku na českou wiki !!!

středa 26. listopadu 2008

GPRS with SE K790i via Blootooth on ubuntu by T-Mobile CZ

apt-get install gnome-ppp

hcitool scan # find mobile MAC address
sdptool search DUN
sudo rfcomm bind /dev/rfcomm0 00:1F:E4:04:D2:1C 1


modem is here :-) /dev/rfcomm0


.wvdial.conf
[Dialer Defaults]
Modem = /dev/rfcomm0
ISDN = off
Modem Type = Analog Modem
Baud = 230400
Init = ATZ
Init2 = AT+CGDCONT=1,"IP","internet.t-mobile.cz"
Init3 =
Init4 =
Init5 =
Init6 =
Init7 =
Init8 =
Init9 =
Phone = *99***1#
Phone1 =
Phone2 =
Phone3 =
Phone4 =
Dial Prefix =
Dial Attempts = 1
Dial Command = ATM1L3DT
Ask Password = off
Password = ubuntu
Username = ubuntu
Auto Reconnect = off
Abort on Busy = off
Carrier Check = on
Check Def Route = on
Abort on No Dialtone = off
Stupid Mode = off
Idle Seconds = 0
Auto DNS = on
;Minimize = on
;Dock = on
;Do NOT edit this file by hand!


GRUB Splash Images description

Návod na konverzi obrázků pro grub

http://linux.softpedia.com/get/System/Boot/GRUB-Splash-Images-15967.shtml

Úprava obrázku pro boot loader Grub pomoci ImageMagic.

convert -resize 640x480 -colors 14 image.png image.xpm && gzip image.xpm


pondělí 17. listopadu 2008

středa 5. listopadu 2008

Find a exec cmd

chmod -R 655 /dir aplikuje práva i na adresáře, což je nežádoucí. Je možno použít find a jím vykonávat chmod.

find /tmp/ -name "*.txt" -exec chmod 400 "{}" \;

find /tmp/ -type d -exec chmod 755 "{}" \;

find /tmp/ -type c -exec chmod 664 "{}" \;

find /tmp/ -type d | xargs -n 1 chmod 775

Dale poznamka jak mazat pomoci find?

find dir/ -name CVS -exec rm -rf "{}" \;