Wednesday, May 26, 2010

Mounting former LUKS partition

To mount existing LUKS partitions in your disk:

#---
REAL_DEVICE="/dev/<like sda5>"
MOUNTING_POINT="<Where in the disk, like /home>"
FSTYPE="<someting like ext4>"
UUID=`cryptsetup luksUUID ${REAL_DEVICE}`
LUKS_DEVICE="luks-${UUID}"
cryptsetup luksOpen ${REAL DEVICE} ${LUKS_DEVICE}
mount /dev/mapper/${LUKS_DEVICE} ${MOUNTING_POINT}
echo "/dev/mapper/${LUKS_DEVICE} ${MOUNTING_POINT} defaults 1 3" >> /etc/fstab
#---

[updated] My Fedora 13 road map

- If you have had problems with automatically mounting LUKS partition, see my post addressing the issue here

- Add repositories:
-- RPM Fusion (free)
#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#---

-- RPM Fusion (non-free)
#---
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
#---
-- Adobe (flash plugin)
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
#---


-- Adobe Flash for 64bits:
1. go to http://labs.adobe.com/downloads/flashplayer10.html
2. download the latest version for linux (a tar.gz file)
2.1. for me it was: http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_1_rc6_linux_052510.tar.gz
3. install it:
#---
tar -vxzf <file.tar.gz> -C /usr/lib64/mozilla/plugins/
#---

4. restart browser
5. check if it is working: about:plugins

-- JPackage:

#---
wget http://www.jpackage.org/jpackage17.repo -O /etc/yum.repos.d/jpackage.repo
#---


-- Chromium:

#---
wget http://repos.fedorapeople.org/repos/spot/chromium/fedora-chromium.repo -O /etc/yum.repos.d/fedora-chromium.repo
#---


--- Edit the /etc/yum.repos.d/jpackage.repo file:

If you want to work with J2EE, JBoss, and such change it to the following:
[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1


-- Setting up a not-so-restricting SELinux: here

[update: remove before installing, thanks to a reader comment]
-- Remove things I do NOT like (do not remove xine if you prefer KDE):

--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine \
gxine* \
totem*
#---


--- This is REALLY annoying, it prevents mplayerplug-in from working properly:
#---
yum -y erase \
mozplugger
#---


-- Update your system:
#---
yum -y upgrade
#---


- Install additional software:

-- Chromium:
#---
yum -y install \
chromium
#---


-- Multimedia:
#---
yum -y install \
alsa-tools \
alsamixergui \
mplayer \
mencoder \
live555 \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
flash-plugin \
k3b \
k3b-extras-nonfree
#---


Because Adobe Reader is usually very slow to download, I keep it separated and leave it to be last installed.
#---
yum -y install \
AdobeReader_enu
#---


-- Spell-checking
--- Additional languages: German (de), Spanish (es), and Portuguese from Brazil (br)
#---
yum -y install \
hunspell-de \
hunspell-es \
hunspell-pt
#---


-- Email with sylpheed-claws
#---
yum -y install \
claws-mail \
claws-mail-plugins
#---


--- Turn SpamAssassin on (if you use it to filter your emails):
#---
chkconfig --level 345 spamassassin on
#---


-- XMMS with its most precious plug-ins
#---
yum -y install \
xmms \
xmms-libs \
xmms-skins.noarch \
xmms-mp3 \
xmms-faad2 \
xmms-flac \
xmms-arts \
xmms-esd \
xmms-musepack \
xmms-acme \
xmms2 \
xmms2-avcodec \
xmms2-faad \
xmms2-freeworld \
xmms2-mp4 \
xmms2-nonfree
#---


-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
pidgin-gfire \
pidgin-musictracker \
purple-plugin_pack-pidgin \
purple-plugin_pack-pidgin-xmms \
purple-facebookchat \
purple-microblog \
purple-msn-pecan
#---


--- If you use LaTeX you may find this plugin appealing:
#---
yum -y install \
pidgin-latex
#---


-- For kernel modules
#---
yum -y install \
kernel-PAE-devel \
kernel-headers
#---


--- For 64bit or old processors (non-PAE)
#---
yum -y install \
kernel-devel \
kernel-headers
#---


-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---


-- Misc

--- Backups with Back In Time:
#---
yum -y install \
backintime-common \
backintime-gnome
#---


--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
ImageMagick \
graphviz \
dia \
gv \
xfig \
xpdf \
gnuplot \
inkscape \
grace
#---


--- Editors and related
#---
yum -y install \
gvim \
ctags \
kile \
dictd \
diction
#---


--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---


--- Compression related programs
#---
yum -y install \
unrar \
p7zip
#---


--- Administration related programs
#---
yum -y install \
telnet \
lsof \
nmap \
nc \
traceroute \
mc \
tsclient \
AcetoneISO2 \
rdesktop
#---


--- Very nice "must-have" admin programs:
#---
yum -y install \
keepassx \
system-config-display \
gnome-password-generator
#---


--- For WLAN Cracking
#---
yum -y install \
aircrack-ng \
airsnort
#---


--- NVIDA
#---
yum -y install \
akmod-nvidia \
kmod-nvidia-PAE \
xorg-x11-drv-nvidia
#---


-- Note about the driver:
It messes the font resolution up (IMHO). So to keep the same aspect between the normal driver and the NVIDIA driver you need to edit the file: [/etc/X11/xorg.conf] and add the following line in the section Device:

Option "DPI" "90 x 90"

My section device looks like this:

Section "Device"
Identifier "Videocard0"
#Driver "nouveau"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
Option "DPI" "90 x 90"
EndSection


-- Development
--- Some helper programs
#---
yum -y install \
ant
#---


--- My beloved debugging program
#---
yum -y install \
ddd
#---


--- Debug related programs
#---
yum -y install \
gdb \
gcc \
strace \
ltrace
#---


--- Java support:
#---
yum -y install \
gcc-java \
java-1.6.0-openjdk \
java-1.6.0-openjdk-plugin \
java-1.6.0-openjdk-javadoc \
java-1.6.0-openjdk-src \
java-1.5.0-gcj \
java-1.5.0-gcj-devel \
java-1.5.0-gcj-javadoc \
java-1.5.0-gcj-src
#---


--- JBoss support:
#---
yum -y install \
jbossas
#---


--- NetBeans:
#---
yum -y install \
netbeans
#---


--- Eclipse for Java:
#---
yum -y install \
eclipse-platform \
eclipse-ecj \
eclipse-jdt \
eclipse-cvs-client \
#---


--- For SVN support:
#---
yum -y install \
rapidsvn
#---


--- For GIT support:
#---
yum -y install \
git-all
#---


#---
yum -y install \
eclipse-subclipse \
eclipse-subclipse-book
#---


--- For C++ development:
#---
yum -y install \
eclipse-cdt
#---


--- Mylyn plugin:
#---
yum -y install \
eclipse-mylyn \
eclipse-mylyn-ide \
eclipse-mylyn-java \
eclipse-mylyn-bugzilla \
eclipse-mylyn-trac
#---


A note on the docs, you will find them in:

/usr/share/javadoc/java-1.5.0-gcj/
/usr/share/javadoc/java-1.6.0-openjdk/


-- Update your system:
#---
yum -y upgrade
#---


- Install and setup third-part programs
-- VirtualBox/VMware
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
-- NetBeans

- For a better experience when installing third-part software from Danger Mouse:
#---
rpm -Uvh http://dnmouse.org/autoten-4.6-4.fc13.noarch.rpm
#---


- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---


- Some issues:
-- Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
-- Skype may need some extra configuration (see link for 64bits) and some SELinux relaxation (see link for SELinux).

#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---


Related posts:
- Installing Skype in 64bits (external link)
- Mounting former LUKS partition
- SELinux
- Road map for Fedora 12
- Making USB to work with VirtualBox (external link)
- Adding security to SSH
- Backups with Back In Time