Friday 27 March 2009

Access Linux Partitions (ext2/ext3) From Windows OS

Explore2fs: http://www.chrysocome.net/explore2fs
Ext2 Installable File System For Windows: http://www.fs-driver.org/index.html
DiskInternals Linux Reader: http://www.diskinternals.com/linux-reader

Thursday 26 March 2009

Fedoa 10 linux adding encrypted partition with cryptsetup luks

Install related package
# yum -y install cryptsetup-luks

Here my disk is /dev/hdd1. Encypt partition with luksFormat option. Do not forget your passphrase
# cryptsetup --verbose --verify-passphrase luksFormat /dev/sdd1

Create mapping for enctypted partition under /dev/mapper. Enter your passphrase here.
# cryptsetup luksOpen /dev/sdd1 /dev/mapper anynameyougive(udisk2 for me)

Now you can find your mapping in under the mapper directory
# ls /dev/mapper

Format the disk.
# /sbin/mkfs.ext3 -j -m 1 /dev/mapper/udisk2

Mount the disk
# mount /dev/mapper/udisk2 /path/to/decide

Now you can use your encrypted partition.

Wednesday 25 March 2009

Share ntfs partition with nfs

ntfs-3g module enable to read write access to ntfs partitions. Latest distributions support this module.
For exporting to read write access you have to use umask option, which enables everyone to write ntfs partition.
mount -o umask=000 /dev/sdb1 /media/disk

And entry for nfs /et/exports
/media/disk *(fsid=0,rw,sync,no_subtree_check)

Do not forget to restart nfs server.

Thursday 19 March 2009

Yum Ftp only repository

I need to update servers but do not want to permit server to access internet via http, I created repository below which requires only ftp access.
Only "mirror.fraunhofer.de" is permitting ftp access so I use this server. Probably you can find other distros under same server. I go for CentOS here.
you have to use this command to update and install packages
yum --disableplugin=fastestmirror --disablerepo=\* --enablerepo=alteredbase install yum-fastestmirror
yum --disableplugin=fastestmirror --disablerepo=\* --enablerepo=alteredupdates update


create file /etc/yum.repos.d/x.repo with content below
[alteredbase]
name=CentOS-$releasever - Base
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/os/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredupdates]
name=CentOS-$releasever - Updates
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/updates/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredaddons]
name=CentOS-$releasever - Addons
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/addons/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredextras]
name=CentOS-$releasever - Extras
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/extras/x86_64/
gpgcheck=1
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

[alteredcentosplus]
name=CentOS-$releasever - Plus
baseurl=ftp://mirror.fraunhofer.de/centos.org/5.2/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=ftp://mirror.fraunhofer.de/centos.org/RPM-GPG-KEY-CentOS-5

Yum cdrom dvd repository

Mount dvd under /media/cdrom

use command
yum --enablerepo=c5-media install pango-devel-1.14.9-3.el5.centos.x86_64.rpm