Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 61076 Details for
Bug 95798
suspend2+encrypted swap+encrypted root
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
initrd linuxrc
linuxrc (text/plain), 3.11 KB, created by
Alon Bar-Lev (RETIRED)
on 2005-06-11 12:40:24 UTC
(
hide
)
Description:
initrd linuxrc
Filename:
MIME Type:
Creator:
Alon Bar-Lev (RETIRED)
Created:
2005-06-11 12:40:24 UTC
Size:
3.11 KB
patch
obsolete
>#!/bin/sh ># ># History ># ----------------- ># 2005.06.07 - Alon Bar-Lev ># Writeen. ># > ># ># make ramdisk read/write ># >mount -o remount,rw / > ># ># create devices missing ># from /dev ># I don't use udev here ># >mknod /dev/hda1 b 3 1 >mknod /dev/hda2 b 3 2 >mknod /dev/hda3 b 3 3 >mknod /dev/hda4 b 3 4 >mknod /dev/hdb1 b 3 65 >mknod /dev/hdb2 b 3 66 >mknod /dev/hdb3 b 3 67 >mknod /dev/hdb4 b 3 68 >mknod /dev/hdc1 b 22 1 >mknod /dev/hdc2 b 22 2 >mknod /dev/hdc3 b 22 3 >mknod /dev/hdc4 b 22 4 >mknod /dev/hdd1 b 22 65 >mknod /dev/hdd2 b 22 66 >mknod /dev/hdd3 b 22 67 >mknod /dev/hdd4 b 22 68 ># these required for splash >mknod /dev/fbsplash c 10 62 >mknod /dev/fb0 c 29 0 >mkdir /dev/vc >mknod /dev/vc/0 c 4 0 > ># ># mount proc ># >mount -t proc none /proc > ># ># set kernel ># >kernel=`uname -r` > ># ># parse command line ># >CMDLINE=`cat /proc/cmdline` >for x in ${CMDLINE}; do > case "${x}" in > initrd_util=*) > myutil=${x#initrd_util=} > ;; > initrd_loops=*) > myloops=${x#initrd_loops=} > ;; > initrd_loopstart=*) > myloopstart=${x#initrd_loopstart=} > ;; > initrd_shell=*) > myshell=${x#initrd_shell=} > ;; > splash=*) > theme=${x#*:} > ;; > root=*) > root=${x#*=} > ;; > esac >done > >if [ "$myloopstart" = "" ]; then > myloopstart=0 >fi > >if [ "$myshell" = "1" ]; then > /bin/sh > exit >fi > ># ># mount boot file system ># >if [ "$myutil" = "" ]; then > echo Please specify myutil kernel parameter at next reboot. > /bin/sh > exit >fi > >if [ ! -d /mnt ]; then > mkdir /mnt >fi >mount -t ext2 -o ro $myutil /mnt > ># ># set new path ># >oldpath=$PATH >export PATH=$PATH:/mnt/boot-util/${kernel}/bin > ># ># setup file environment ># gpg MUST be in /bin/gpg (not searched in path) ># >ln /bin/busybox /bin/stty >mkdir -p /lib/modules/${kernel}/block >cp -a /mnt/boot-util/${kernel}/lib/modules/${kernel}/block/loop.* /lib/modules/${kernel}/block >ln -s /mnt/boot-util/${kernel}/bin/gpg.static /bin/gpg >ln -s /mnt/boot-util/${kernel}/etc-/splash /etc/splash > >if [ "$myshell" = "2" ]; then > /bin/sh > exit >fi > ># ># load loop-aes ># >modprobe loop > ># ># suspend splash ># >if [ "$theme" != "" ]; then > splash_util -c setmode -m v >fi > ># ># setup loop devices ># >if [ "$myloops" != "" ]; then > while ! losetup.q /dev/loop$myloopstart > /dev/null 2>&1; do > # prompt for password > stty -echo > echo -n "Password: " > read -r pin > stty echo > # for new line... > echo > > # > # map loop devices > # > index=$myloopstart > for x in `echo $myloops | sed "s/,/ /g"`; do > echo "$pin" | losetup.q -p 0 -e AES256 -K /mnt/keyfile.gpg -G / /dev/loop$index $x > index=$(($index+1)) > done > done >fi > ># ># resume splash ># >if [ "$theme" != "" ]; then > splash_util -c setmode -m s;splash_util -c repaint -m s --theme=$theme >fi > ># ># clear variables ># not sure if it works... ># but worth a try... ># >pin=***************** >unset pin >export PATH=$oldpath >unset oldpath > ># ># unmount file systems ># >umount /mnt >mount -o remount,ro / > >if [ "$myshell" = "3" ]; then > /bin/sh > exit >fi > ># ># try to resume ># >echo > /proc/software_suspend/do_resume > ># ># tell kernel to boot from ># a loop device ># >if [ "${root#/dev/loop}" != "${root}" ]; then > loop=${root#/dev/loop} > echo 0x70$loop > /proc/sys/kernel/real-root-dev >fi > ># ># unmount file systems ># >umount /proc > ># ># pass control to root >#
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 95798
:
61075
| 61076