[Novalug] Initramfs memory

shawn wilson ag4ve.us@gmail.com
Tue May 28 14:36:15 EDT 2013


What was the point of this message. (it's rhetorical)

On May 28, 2013 10:45 AM, "James Ewing" <jecottrell3@comcast.net> wrote:
>

>
> My question to you is "Why do you care?". What are you actually trying to
DO?

I care because I created a 17meg grip / 11meg xz initramfs by copying
essentials and my init script and copying all of the libraries ldd
reported. Now, I highly doubt the compression schema is giving me any
benefit here and I would be looking at the actual disk size for memory use.
But, I'll look at statically linking things and other compiler options (and
cherry pick /lib/modules /stuff vs copying the whole tree for the current
version).

>
> You might also pick something less challenging to work on and save this
for later.
>

First, the doing Isn't the problem but doing well so that someone doesn't
come in some months or years and say "what in the hell was this idiot
thinking" is. Also, I love the attitude, if I don't know how to do
something I shouldn't even try. Good thing you're the only person who feels
this way.

Also, if you'll notice I asked how to tell that the device was cleanly
unmounted? Well, that would allow me to do as you suggest and take whatever
distro, see how much memory they lock up as the initial boot process and
then take apart their boot image and see what they do. And then it would
allow me to make sure I'm doing things correctly (I might also need a
failing test, but that's probably pretty easy to create).

> ----- Original Message -----
> From: "shawn wilson" <ag4ve.us@gmail.com>
> To: "Don E. Groves, Jr." <dgrovesjr@gmail.com>, "Novalug" <
novalug@calypso.tux.org>
> Sent: Monday, May 27, 2013 11:10:38 PM
> Subject: Re: [Novalug] Initramfs memory
>
> Blah, this went off list with my first reply, bringing it back on list
> (sorry - didn't notice)
>
> On Sun, May 26, 2013 at 9:52 AM, Don E. Groves, Jr. <dgrovesjr@gmail.com>
wrote:
> > the possible release happens durning the running of 'run-init' (the last
> > command in the init script).
> >
> > If the directory /initrd  doesn't exist  then the device '/dev/ram0' is
> > unmounted else it's mounted to that directory (sometimes this later
doesn't
> > happen anyway at least for me).  The memory used by the 'ram0' device is
> > released when NO references to any files within it exists anymore. (ie
> > locked lib's or other such odd things).
>
> Ok, so I should make sure not to use anything that uses shared
> libraries for the mounting process (ie, pivot_root, losetup or
> cryptsetup)? Will libraries in bash keep the fh open vs using busybox?
> I see that some people use udev in initramfs (and I like the idea of
> doing this since I know nothing about mdev and like either over mknod
> a bunch of devices) - should this be compiled statically? IDK whether
> the shell and udev would be different than anything else since you're
> technically still in a script that is pointed to with an fh from a
> device mounted and managed with udevd when pivot_root is called.
>
> Also, after this, I suppose the response can be TIAS:
>        2. With  the  current kernel, if directory /initrd does not
> exist, then /dev/ram0 will not be fully unmounted if /dev/ram0 is
>           used by any process or has any file-system mounted on it.
> If /dev/ram0 is not fully unmounted, then /dev/ram0 will remain
>           in memory.
> So how do I tell if the device was cleanly unmounted?
>
> >
> > See  man 4 initrd   for more information on the subject.
> > Also feel free to ask if you have further questions.
> >
> >
> >
> > On Sun, May 26, 2013 at 9:12 AM, shawn wilson <ag4ve.us@gmail.com>
wrote:
> >>
> >> Is that on pivot root and the exec call of /sbin/init or do you mean on
> >> the release of all file handles and a shutdown or reboot?
> >>
> >> What I was trying to say is that I didn't understand anything I had
read
> >> so I'd like someone to spell out what parts of an initramfs can effect
a
> >> running system?
> >>
> >> On May 26, 2013 9:00 AM, "Don E. Groves, Jr." <dgrovesjr@gmail.com>
wrote:
> >>>
> >>> Yes you will have slightly less useable system memory until the
initramfs
> >>> (device) is released.
> >>>
> >>>
> >>> On Sat, May 25, 2013 at 11:10 PM, shawn wilson <ag4ve.us@gmail.com>
> >>> wrote:
> >>>>
> >>>> Does initramfs still lock up memory on a running system? Ie, if I
use a
> >>>> 20 meg initramfs will I have slightly less memory for a running
system than
> >>>> if I boot with a 1 meg initramfs?
> >>>>
> >>>> What I read seemed to indicate this was the case with ramfs but not
with
> >>>> initramfs. Is this correct?
> >>>
> >>> --
> >>> --
> >>> Don E. Groves, Jr.
> >>>
> >>> Tag it's your turn now... ... ....
> >
> >
> >
> >
> > --
> > --
> > Don E. Groves, Jr.
> >
> > Tag it's your turn now... ... ....
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20130528/0ac06f51/attachment.htm>


More information about the Novalug mailing list