č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 "{}" \;

pátek 24. října 2008

rkhunter

Je třeba občas systém prověřit na škodlivé prográmky, které by se mohli do systému dostat nějakou skulinou v instalovaných programech.

cd /usr/ports/

make search name=rkhunter

cd /usr/ports/security/rkhunter

make install clean

joe /etc/periodic.conf

daily_rkhunter_update_enable="YES"

daily_rkhunter_check_enable="YES"


Přidáme post install doporučeni updatovat a spouštět rkhunter periodicky.

čtvrtek 16. října 2008

FreeBSD Default UFS2 partiiton

Při instalaci FreeBSD se disky formátují s defaultními volbami.

newfs -U -O2 /dev/ad1s1d

Tak to vytvořený filesystém si alokuje 8% velikosti disku jako rezervu.

[root~]# dumpfs -m /dev/ad0s1e

newfs -O 2 -U -a 8 -b 16384 -d 16384 -e 2048 -f 2048 -g 16384 -h 64 -m 8 -o time -s 241058560 /dev/ad0s1e

Lze disk naformatovat s -m 1%

newfs -U -O2 -m 1% /dev/ad1s1d

neděle 12. října 2008

Městský park


Městský park, originally uploaded by smejdil.

Podzim ve Dvoře Králové se umí vybarvit. Procházka parkem s polu s Blonďákama byla fajn.