Giter Site home page Giter Site logo

mkinitfs's Introduction

mkinitfs.sh - generate Linux initramfs for booting non-LUKS
cryptovolumes

I didn't find any initramfs generators to allow booting GNU/Linux
system from non-LUKS volume with custom cipher/keysize/hash parameters.
Hence I wrote my own one that:
 * installs sufficient set of kernel modules, statically-linked
   busybox, lvm and cryptsetup into initramfs archive
 * generates modules dependency files (modules.dep etc) and checks that
   there are no unresolved dependencies/symbols in the installed set of
   kernel modules
 * adds /init script that:
   * loads small set of kernel modules
   * takes names of encrypted volumes from kernel cmdline
   * takes custom cipher/keysize/hash parameters
   * decrypts encrypted volumes (in the exact order they are specified
     on the commandline)
   * patches i915 VBIOS using 915resolution if it's available and
     915resolution=<mode>:<W>x<H> option is passed on cmdline
   * searches for "hibernate resume" volume and attempts resuming
   * searches for root volume, mounts it, does switch_root and passes
     control to /sbin/init
   * optionally mounts /usr partition before passing control
     to /sbin/init

915resolution

mkinitfs uses 915resolution (http://915resolution.mango-lang.org/) to
patch i915 VBIOS _before_ initiating resuming from hibernate. If you
suspend with patched VBIOS and resume with unpatched, Xorg will crash:

[ 15330.043] (II) VESA(0): Setting up VESA Mode 0x15C (1024x600)
[ 15330.044] (II) VESA(0): VBESetVBEMode failed
[ 15330.049] (EE) 
Fatal server error:
[ 15330.049] (EE) EnterVT failed for screen 0
[ 15330.049] (EE) 
[ 15330.049] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[ 15330.049] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 15330.050] (EE) 
[ 15330.198] (EE) Server terminated with error (1). Closing log file.

mkinitfs's People

Contributors

xrgtn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.