Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Sunday, 25 July 2010

Resume from encrypted swap in Fedora 13 (solved)

Problem: Install Fedora 13 with / and swap on encrypted partitions. Hibernate appears to work, but resume does not: it asks for password and then carries on with normal boot.

Fix: the kernel boot parameters need to include
  • resume=UUID=(uuid of file system device supporting the encrypted swap)
Although Fedora's installer easily and nicely sets up the encrypted partitions, and adds lvm- and luks-related activation parameters to the kernel stanza in grub, it does not add the resume= parameter.

Initially I tried
  • resume=/dev/mapper/swap0
which seemed reasonable, since root=/dev/mapper/luks-whatever is automatically added by anaconda.
However, that doesn't work: the resume boot fails, with a message like "Could not open root filesystem", and it sleeps forever.

Here is an example from a working /boot/grub/menu.lst:

# names and UUIDs
#
#root luks luks-fe45fa34-fbcc-4b0e-e556-3cb453e454f5

#root lv vg_lex/LogVol01
#root /dev/mapper/luks-
fe45fa34-fbcc-4b0e-e556-3cb453e454f5

#swap luks luks-23d23dea-8732-42d2-c319-4568973a74373
#swap lv vg_main/LogVol00
#swap /dev/mapper/swap0
#swap Filesystem 34deffd5-2328-4702-45e5-4532a1fd45e2

# failed:
# resume=/dev/mapper/swap0
# ok:
# resume=UUID=
34deffd5-2328-4702-45e5-4532a1fd45e2

title Fedora (2.6.33.6-147.fc13.i686.PAE)
root (hd0,5)
kernel /vmlinuz-2.6.33.6-147.fc13.i686.PAE ro root=/dev/mapper/
luks-fe45fa34-fbcc-4b0e-e556-3cb453e454f5 rd_LUKS_UUID=luks-fe45fa34-fbcc-4b0e-e556-3cb453e454f5 rd_LVM_LV=vg_main/LogVol01 rd_LUKS_UUID=luks-23d23dea-8732-42d2-c319-4568973a74373 rd_LVM_LV=vg_main/LogVol00 rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk rhgb resume=UUID=34deffd5-2328-4702-45e5-4532a1fd45e2 quiet
initrd /initramfs-2.6.33.6-147.fc13.i686.PAE.img


Thursday, 16 April 2009

OpenOffice opens fullscreen without window controls

Running OpenOffice 3.0.1 - OOO300m15 (Build:9379)

Windows appear with no X-window borders or controls, kinda full-screen.
Just noticed it recently.

Fix: rm $HOME/.openoffice.org*

Reference

Mount USB stick with mixed case

Scenario: USB stick formatted with as FAT32 for wind0ze compatibility, but when you mount it on linux any file or directory created with an entirely uppercase name appears as lowercase. Or maybe everything appears as lowercase.

Here's some magic for /etc/fstab to mount a volume labelled FOO on /mnt/foo with mixed-case support.
- enter this all on one line, the "\ " are just for (in)convenience here.

LABEL=FOO /mnt/foo vfat \
nodev,exec,noauto,user,users,umask=000,gid=1000,uid=1000,\
shortname=win95,codepage=850,iocharset=iso8859-1 0 0

This isn't specific to USB sticks, but that's where I commonly hit the problem.

Install Unixmail reader in Thunderbird

As delivered recently, (200904) Thunderbird does not offer the option of setting up an account to read local (unix) mail.

This is due to the absence of a configuration file "movemail.rdf". Possibly due to madness in the Mac (the way the change is described smacks of developer arrogance) but you can find a description and clues to fixing it on the Mac (here)

To fix on linux, grab the rdf file from Thunderbird sources or from here and copy it into the installed thunderbird lib directory.

On Archlinux, that is /usr/lib/thunderbird-2/isp/.

Wednesday, 15 April 2009

Login to Desktop or Console Prompt

1. Boot to console prompt: manual login, then startx ...
OR
2. Boot to Desktop (auto-login as USERNAME) ...

(on Archlinux)

1. vi /etc/inittab

id:3:initdefault:
# Boot to X11
#id:5:initdefault:

2. vi /etc/inittab

#id:3:initdefault:
# Boot to X11
id:5:initdefault:
#
# .... other stuff
#
# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
x:5:once:/bin/su USERNAME -l -c "/bin/bash --login -c startx >/dev/null 2>&1"
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >& /dev/null



References

Arch Boot Process, Auto Login, Login Manager, Start X at boot

Java misbehaving in Awesome window manager

Some Java apps just don't want to play with Awesome wm.

Basically, recent Java vm is stuffed; presuming that re-parenting window manager is the norm.
Ref: openjdk bug report

Fix for Sun java - set this in the env before launching the app

export AWT_TOOLKIT=MToolkit

openjdk may have a different fix. See this Debian bug report