Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#39 rversed setup...

closed
nobody
None
5
2011-07-08
2011-05-14
Anonymous
No

Is there a way to edit (hope it the right one) build-initird.sh to mount encrypted system in this way:

first losetup partition on drive «eg. /dev/loop1» (the one which should hold whole system (except for boot) then mount voluume group on that loop and filnaly mount volumes from vg on right places in system (fstab should work).

but i'd like to get advice with build-initrd.sh on how to alter it to do first losetup and than vghange

followed this howto with changed steps for my cause http://en.gentoo-wiki.com/wiki/AES-encrypted_root_partition_using_LVM2

or is the solution in /boot/rootsetup?

thanks for reply in advance
S

Discussion

  • Jari Ruusu
    Jari Ruusu
    2011-05-17

    loop-AES-v3.6c/build-initrd.sh line 668 does a mount()
    of already set up loop device (the line that has
    following text)

    if(mount("/dev/loop${DEVFSSLASH1}${ROOTLOOPINDEX}",

    If you add C-language code to set up VG prior to that
    mount() system call, and change mount() device name to
    "/dev/mapper/vg-root" (or something like that), and
    handle error case VG shutdown, then it should work OK.

    Alternatively, you can do losetup + VG set up from
    /boot/rootsetup script, but you still have to change
    the device name that gets mounted by code created by
    build-initrd.sh script. That "/dev/loop?" name part is
    hardcoded there. Maybe that name could be config option
    instead of hardcoded.

     
  • Jari Ruusu
    Jari Ruusu
    2011-07-08

    • status: open --> closed