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]

 



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]

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

-
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