Re: loop-AES on a root RAID1 device; it only sort of works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 01 Jul 2009 17:30:39 +0300
Jari Ruusu <jariruusu@xxxxxxxxxxxxxxxxxxxxx> wrote:

> Fog_Watch wrote:
> > (I think this is the correct question)  How do I create a ram-disk
> > in which there is an assembled /dev/md1 from which to boot?
> 
> Kernel config:
>   CONFIG_MD_AUTODETECT=y
> 
> build-initrd.sh config:
>   BOOTDEV=/dev/md1
>   CRYPTROOT=/dev/md2
> 
> lilo bootloader config:
>   boot=/dev/md1
>   raid-extra-boot=/dev/hda,/dev/hdd
> 
> Then use fdisk (or equivalent disk partitioning program) to set
> partition type of /dev/hda2 /dev/hdd1 /dev/hda6 and /dev/hdd2 to
> partition type FD. That way when linux kernel boots, it autodetects
> those partitions as MD components and assembles MD RAID arrays during
> kernel boot. Easiest way is let kernel autodetect and assemble all MD
> RAID arrays.
> 
> # fdisk -l /dev/hda | grep "hda[12]"
> /dev/hda1   *           1           7       56196   fd  Linux raid
> autodetect /dev/hda2               8         645     5124735   fd
> Linux raid autodetect # fdisk -l /dev/hdc | grep "hdc[12]"
> /dev/hdc1   *           1           7       56196   fd  Linux raid
> autodetect /dev/hdc2               8         645     5124735   fd
> Linux raid autodetect # cat /proc/mdstat | head -n 7
> Personalities : [linear] [raid0] [raid1] [raid5] 
> read_ahead 1024 sectors
> md1 : active raid1 hdc1[1] hda1[0]
>       56128 blocks [2/2] [UU]
>       
> md2 : active raid1 hdc2[1] hda2[0]
>       5124608 blocks [2/2] [UU]
> 
Excellent, all working and good.

Thanks again

Fog_Watch.


For the record:
I did have some problems when using old boot-CD mdadm and grub.

The successful files are as follows:
grub.conf:
root (hd0,1) #the machine has Windose on it.
kernel /boot/kernel-2.6.29-gentoo-r5 root=100 rootfstype=minix
	init=/linuxrc splash=silent,fadein,theme:natural_gentoo
	console=tty1 video=uvesafb:1024x768-32@60,mtrr:3,ywrap 5
initrd /boot/initrd.gz

build-initrd.conf:
USEDEVFS=0
USEPIVOT=1
BOOTDEV=/dev/md1
BOOTTYPE=ext2
CRYPTROOT=/dev/md2
ROOTTYPE=reiserfs
CIPHERTYPE=AES128
LOINIT="-I 0"
USEGPGKEY=1
GPGKEYFILE=gpg.key
EXTERNALGPGFILES=0
EXTERNALGPGDEV=/dev/fd0
EXTERNALGPGTYPE=ext2
USEMODULE=1
INITRDONLY=0
SOURCEROOT=
DESTINATIONROOT=
DESTINATIONPREFIX=/boot
INITRDGZNAME=initrd.gz
ROOTLOOPINDEX=5
TEMPLOOPINDEX=7
LOOPMODPARAMS=""
UTF8KEYBMODE=0
LOADNATIONALKEYB=0
INITIALDELAY=0
MOUNTDELAY=0
TOOLSPROMPT=0
USEROOTSETUP=0
USEDIETLIBC=1
GCC=gcc

/boot/rootsetup not used.

-- 
Lose wait.  Get Gentoo.

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux