Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Deutsches Forum (German) Deutsche Dokumentation
  • Search

[Init-Script]Partitionsverschlüsselung LUKS&verschl.Keyfile

Dokumentation, Tipps und Tricks.
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
Author
Message
manuels
Advocate
Advocate
User avatar
Posts: 2146
Joined: Sat Nov 22, 2003 5:50 pm
Location: Europe

[Init-Script]Partitionsverschlüsselung LUKS&verschl.Key

  • Quote

Post by manuels » Wed Aug 30, 2006 12:38 pm

Hi,

ich habe meine Home-Partition verschlüsselt. Hierzu habe ich einen 256-Bit Keyfile mit GPG verschlüsselt und auf einen Dongle gepackt.
(Hab mir das ganze nach den Anleitungen partition verschlüsseln mit dmcrypt und DM-Crypt zusammengebastelt.)

Dazu habe ich dann ein Init-Script geschrieben. Mit RC_PARALLEL_STARTUP="no" in der /etc/conf.d/rc läuft es sehr gut.
Verbesserungsvorschläge willkommen.

File: /etc/init.d/cryptoluks

Code: Select all

#!/sbin/runscript

# Vars
mapdevice=decrypt-home;
lvmdevice=/dev/vg/crypto-home;
mountpath=/home

keyfile=/mnt/usb/home-key.gpg
keymount=/mnt/usb

depend() {
        need checkroot
        need modules
        use lvm
        before localmount
        before xdm
        before *
}


start() {
        ebegin "Mounting LUKS loopback device ...";

        einfo "Please insert key file medium and stand by while trying to mount...";
        false;
        while test $? -ne 0; do
          mount $keymount > /dev/null 2>&1
        done

        false;
        while test $? -ne 0; do
          gpg --quiet -d $keyfile | cryptsetup -y luksOpen $lvmdevice $mapdevice;
        done

        umount -l $keymount > /dev/null 2>&1;

        mount $mountpath;

        eend $?;
}
stop() {
        ebegin "Unmounting LUKS loopback device...";

        umount $mountpath;
        /bin/cryptsetup luksClose $mapdevice;

        eend $?;
}
Build your own live cd with catalyst 2.0!
Top
Moorenkopf
Apprentice
Apprentice
Posts: 189
Joined: Sun Apr 18, 2004 12:44 pm
Location: NRW

  • Quote

Post by Moorenkopf » Wed Aug 30, 2006 6:55 pm

Ich hab' da einen Querverweis anzubieten: http://forums.gentoo.org/viewtopic-t-45 ... ight-.html
</my 2 cents>;)
Top
manuels
Advocate
Advocate
User avatar
Posts: 2146
Joined: Sat Nov 22, 2003 5:50 pm
Location: Europe

  • Quote

Post by manuels » Thu Aug 31, 2006 11:19 am

jo, aber das ist eben ohne verschlüsseltem Keyfile.
Build your own live cd with catalyst 2.0!
Top
Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Deutsche Dokumentation”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic