* How far has initramfs got ? @ 2002-04-28 14:00 Christian Koenig 2002-04-28 17:42 ` Jan Harkes 0 siblings, 1 reply; 4+ messages in thread From: Christian Koenig @ 2002-04-28 14:00 UTC (permalink / raw) To: linux-kernel Hi, I've got some spare time to look at my all day problems / questions. How far have the initramfs stuff got ? Is there any code yet ? I have implementet some very very simple cpio image extraction in init/do_mounts.c and want to know if this could be usefull to somebody. Should it be possible to use initramfs without the ramdisk driver compiled in? cu, Christian Koenig. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How far has initramfs got ? 2002-04-28 14:00 How far has initramfs got ? Christian Koenig @ 2002-04-28 17:42 ` Jan Harkes 2002-04-28 20:14 ` H. Peter Anvin 0 siblings, 1 reply; 4+ messages in thread From: Jan Harkes @ 2002-04-28 17:42 UTC (permalink / raw) To: linux-kernel On Sun, Apr 28, 2002 at 04:00:16PM +0200, Christian Koenig wrote: > How far have the initramfs stuff got ? Is there any code yet ? > I have implementet some very very simple cpio image extraction in > init/do_mounts.c and want to know if this could be usefull to somebody. > > Should it be possible to use initramfs without the ramdisk driver compiled in? I would like to add that perhaps using tmpfs instead of ramfs would be a nice touch. As the initial ramfs would get overmounted instead of unmounted, this allows the contents of the initial fs to get swapped out instead of either taking up memory indefinitely. Also isn't tmpfs already compiled into the kernel by default to support shared memory and such? Jan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How far has initramfs got ? 2002-04-28 17:42 ` Jan Harkes @ 2002-04-28 20:14 ` H. Peter Anvin 2002-04-29 10:33 ` Matthias Kilian 0 siblings, 1 reply; 4+ messages in thread From: H. Peter Anvin @ 2002-04-28 20:14 UTC (permalink / raw) To: linux-kernel Followup to: <20020428174230.GE18102@ravel.coda.cs.cmu.edu> By author: Jan Harkes <jaharkes@cs.cmu.edu> In newsgroup: linux.dev.kernel > > I would like to add that perhaps using tmpfs instead of ramfs would be > a nice touch. As the initial ramfs would get overmounted instead of > unmounted, this allows the contents of the initial fs to get swapped > out instead of either taking up memory indefinitely. > Baloney. You can't swap out what is actively in use, and something that's overmounted is actively used. You're supposed to clean up the contents before overmounting. I discussed with viro a scheme (using two ramfs's) which made that close to automatic, but I think he thought it was needless complexity. -hpa -- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How far has initramfs got ? 2002-04-28 20:14 ` H. Peter Anvin @ 2002-04-29 10:33 ` Matthias Kilian 0 siblings, 0 replies; 4+ messages in thread From: Matthias Kilian @ 2002-04-29 10:33 UTC (permalink / raw) To: linux-kernel On Sun, Apr 28, 2002 at 01:14:58PM -0700, H. Peter Anvin wrote: [Jan Harkes:] > > I would like to add that perhaps using tmpfs instead of ramfs would be > > a nice touch. I've written some code that allows using an initial tmpfs which gets it's contents from a tar file (optionally compressed). See http://www.escape.de/users/outback/linux/patch-2.4.17-inittar.gz (should also work for 2.4.18) and (for later kernels): http://www.escape.de/users/outback/linux/patch-2.4.19-pre3-inittar.gz [hpa, on tmpfs mounted over initramfs:] > Baloney. You can't swap out what is actively in use, and something > that's overmounted is actively used. You're supposed to clean up the > contents before overmounting. I discussed with viro a scheme (using > two ramfs's) which made that close to automatic, but I think he > thought it was needless complexity. But you don't have to swap anything. As I understand, the current concept is: - a very minimalistic initial fs that doesn't anything meaningful except allowing the creation of directories (mount points). - one or more other fs's on top of this, either overmounted or mounted on a mount point. For example, my patch for 2.4.19-preX just does a sys_mount("tmpfs", "/root", "tmpfs", ...); sys_chdir("/root"); Later, the tar image is extracted into this tmpfs. There's no need to swap or unmount any filesystems. If you want to mount another filesystem as root and throw away the tmpfs, just use chroot(8) and pivot_root(8). Correct me if I'm wrong. Ciao, Kili ps: please answer with cc: to my address, since I'm not subscribed to this mailinglist and may take longer to search the archives for answers. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-29 10:45 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-04-28 14:00 How far has initramfs got ? Christian Koenig 2002-04-28 17:42 ` Jan Harkes 2002-04-28 20:14 ` H. Peter Anvin 2002-04-29 10:33 ` Matthias Kilian
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox