Tag Archives: grub

Arch: encrypted partition above lvm

1. Create two partitions:
sda1 — for /boot
sda2 — for lvm

2. Create lvm partitions:
/
/home
swap

3. Encrypt partitions with «cryptosetup luksFormat»

4. Example of /boot/grub/menu.lst:
title Arch Linux Crypto
root (hd0,0)
kernel /vmlinuz26-lts cryptdevice=/dev/local/root:root root=/dev/mapper/root ro
initrd /kernel26-lts.img

5. Setup crypttab:
home            /dev/local/home         /etc/cryptfs.key
swap            /dev/local/swap         /etc/cryptfs.key

6. Setup fstab:
add there devices names of unencrypted devices like «/dev/mapper/root», example:
tmpfs /tmp tmpfs nodev,nosuid 0 0
LABEL=localboot /boot ext2 defaults 0 1
/dev/mapper/root / ext4 defaults 0 1
/dev/mapper/home /home ext4 defaults 0 0
/dev/mapper/swap swap swap defaults 0 0

7. Edit /etc/mkinitcpio.conf
HOOKS="base udev autodetect pata scsi sata lvm2 encrypt filesystems usbinput"

8. Regenerate initrd:
mkinitcpio -p kernel26-lts

(ge|fu) ntoo: grub 1.97

emerge -q grub
edit /etc/boot.conf:
boot {
generate grub
default “Funtoo Linux”
timeout 3
}
“Funtoo Linux” {
kernel bzImage[-v]
params += video=uvesafb:1440×900-8,mtrr=2
params += GRUB_CMDLINE_LINUX_DEFAULT=”acpi_enforce_resources=lax reboot=p”
}
“Funtoo Linux without parametrs” {
kernel bzImage[-v]
}
“Funtoo Linux Stable kernel 2.6.34″ {
kernel bzImage.stable[-v]
}

boot-update
reboot

Asus K40IN + (K) ubuntu

My notebook Asus K40IN refused to restart.

For the first upgrade, well, you never know, suddenly, the developers have already solved the troubles:

sudo aptitude update -y
sudo aptitude upgrade -y

if grub2:

nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT = «acpi_enforce_resources=lax reboot=p»

if grub:

nano /boot/grun/menu.lst

linux /vmlinuz-2.6.30-084 root=/dev/sda3 ro GRUB_CMDLINE_LINUX= reboot=p

sudo update-grub

sudo reboot