All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Nigel Cunningham <ncunningham@linuxmail.org>
Cc: Pavel Machek <pavel@ucw.cz>,
	linux-kernel@vger.kernel.org, klibc@zytor.com
Subject: Re: [klibc 30/31] Remove in-kernel resume-from-disk invocation code
Date: Wed, 05 Jul 2006 20:11:02 -0700	[thread overview]
Message-ID: <44AC7F46.3050204@zytor.com> (raw)
In-Reply-To: <200607061218.39202.ncunningham@linuxmail.org>

Nigel Cunningham wrote:
> Hi again.
> 
> (Excuse me replying to myself, but this might help someone else).
> 
> On Thursday 06 July 2006 11:45, Nigel Cunningham wrote:
>> Is there a klibc howto somewhere? I tried googling for 'klibc howto',
>> reading the files in Documentation/ and browsing your klibc mailing list
>> archive before asking!
> 
>> What I'm wondering specifically is: Say a user needs to run some commands
>> to set up access to encrypted storage before they can resume. At the
>> moment, we'd tell them to put these commands and the echo > do_resume in
>> their linuxrc (or init) script prior to mounting their root filesystem.
>> Forgive me if I'm asking a stupid question but it's not immediately obvious
>> to me how they would now do that. I'd much rather follow a simple howto
>> than spend a good amount of time tracing function calls etc. I still see
>> init/initramfs.c, and it mentions both CONFIG_BLK_DEV_INITRD and
>> CONFIG_BLK_DEV_RAM. Would I be right in surmising that you can still have
>> an initrd or ramfs to do such things as the above, after klibc has done its
>> work? If not, is there some other way I'm ignorant of?
> 
> For the record, I've since discovered that what you really want is an 
> initramfs howto. I think I stuck with those old-fangled initrds for too long. 
> Better update my desktop from Mandrake 10 too :)... is there a pattern here?
> 

Okay, let's try to start from the beginning...

initramfs is, indeed, a replacement for initrd, but it's not a 1:1 map. 
  Instead, initramfs contents -- which can come from multiple sources! 
-- is simply extracted right into rootfs.

kinit is a replacement for the in-kernel root-handling code, as well as 
other related in-kernel code like resume from disk.  It is compiled as a 
monolithic binary for size reasons.

klibc is a very small C library which *can* be used to produce initramfs 
binaries; in particular, it's used to produce kinit, and is small enough 
that it can be realistically included with the kernel distribution.

If you provide your own /init in an initramfs, it will override the 
default, which is /init -> /kinit.  You can then choose to invoke kinit 
if you want to; for example, you could try to resume from suspend2, and 
invoke kinit if that fails.

	-hpa

  reply	other threads:[~2006-07-06  3:11 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28  5:17 [klibc 00/31] klibc as a historyless patchset (updated and reorganized) H. Peter Anvin
2006-06-28  5:17 ` [klibc 01/31] Add klibc/kinit to MAINTAINERS file H. Peter Anvin
2006-06-28  5:17 ` [klibc 02/31] Main Makefile changes for klibc H. Peter Anvin
2006-06-28  5:17 ` [klibc 03/31] Core klibc code H. Peter Anvin
2006-06-28  5:17 ` [klibc 04/31] alpha support for klibc H. Peter Anvin
2006-06-28 15:43   ` Richard Henderson
2006-06-28 15:51     ` H. Peter Anvin
2006-06-28  5:17 ` [klibc 05/31] arm " H. Peter Anvin
2006-06-28  5:17 ` [klibc 06/31] cris " H. Peter Anvin
2006-06-28  5:17 ` [klibc 07/31] i386 " H. Peter Anvin
2006-06-28  7:37   ` Jan Engelhardt
2006-06-28 15:33     ` H. Peter Anvin
2006-06-28 16:44       ` H. Peter Anvin
2006-06-29  0:14       ` Roman Zippel
2006-06-29  0:45         ` H. Peter Anvin
2006-06-29 23:43           ` Roman Zippel
2006-06-29 23:54             ` H. Peter Anvin
2006-06-30  0:23               ` Roman Zippel
2006-06-30  1:28                 ` [klibc] " Aaron Griffin
2006-06-30 13:56                   ` Jan Engelhardt
2006-06-28  5:17 ` [klibc 08/31] ia64 " H. Peter Anvin
2006-06-28  5:17 ` [klibc 09/31] m32r " H. Peter Anvin
2006-06-28  5:17 ` [klibc 10/31] m68k " H. Peter Anvin
2006-06-28  5:17 ` [klibc 11/31] mips " H. Peter Anvin
2006-06-28  5:17 ` [klibc 12/31] mips64 " H. Peter Anvin
2006-06-28  5:17 ` [klibc 13/31] parisc " H. Peter Anvin
2006-06-28  5:17 ` [klibc 14/31] ppc " H. Peter Anvin
2006-06-28  5:17 ` [klibc 15/31] ppc64 " H. Peter Anvin
2006-06-28  5:17 ` [klibc 16/31] s390 " H. Peter Anvin
2006-06-28  5:17 ` [klibc 17/31] sh " H. Peter Anvin
2006-06-28  5:17 ` [klibc 18/31] sparc " H. Peter Anvin
2006-06-28  5:17 ` [klibc 19/31] sparc64 " H. Peter Anvin
2006-06-28  5:17 ` [klibc 20/31] x86_64 " H. Peter Anvin
2006-06-28  5:17 ` [klibc 21/31] Simple test suite " H. Peter Anvin
2006-06-28  5:17 ` [klibc 22/31] zlib " H. Peter Anvin
2006-06-28  5:17 ` [klibc 23/31] kinit: replacement for in-kernel do_mount, ipconfig, nfsroot H. Peter Anvin
2006-06-28  5:17 ` [klibc 24/31] klibc basic build infrastructure H. Peter Anvin
2006-06-28  5:17 ` [klibc 25/31] Miscellaneous utilities for klibc H. Peter Anvin
2006-06-28  5:17 ` [klibc 26/31] dash - a small POSIX shell " H. Peter Anvin
2006-06-28  5:17 ` [klibc 27/31] A port of gzip to klibc H. Peter Anvin
2006-06-28  5:17 ` [klibc 28/31] sparc64: transmit arch-specific options to kinit via /arch.cmd H. Peter Anvin
2006-06-28  5:17 ` [klibc 29/31] sparc32: transfer arch-specific options to /arch.cmd H. Peter Anvin
2006-06-28  5:17 ` [klibc 30/31] Remove in-kernel resume-from-disk invocation code H. Peter Anvin
2006-07-05 23:40   ` Nigel Cunningham
2006-07-05 23:58     ` Joshua Hudson
2006-07-06  0:11     ` H. Peter Anvin
2006-07-06  0:37       ` Nigel Cunningham
2006-07-06  0:54         ` H. Peter Anvin
2006-07-06  1:45           ` Nigel Cunningham
2006-07-06  2:18             ` Nigel Cunningham
2006-07-06  3:11               ` H. Peter Anvin [this message]
2006-07-06  3:28                 ` Nigel Cunningham
2006-07-06 10:26             ` Pavel Machek
     [not found]             ` <200607061028.k66AS8UB012207@smtp.micromuse.com>
2006-07-06 10:58               ` IBM spam Re: " Pavel Machek
2006-07-06 13:02                 ` Sean Young
2006-07-06  8:31       ` [klibc] " maximilian attems
2006-07-06  8:37         ` H. Peter Anvin
2006-06-28  5:17 ` [klibc 31/31] Remove in-kernel root-mounting code H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44AC7F46.3050204@zytor.com \
    --to=hpa@zytor.com \
    --cc=klibc@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncunningham@linuxmail.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.