Lines Matching +full:i +full:- +full:cache +full:- +full:block +full:- +full:size
1 .. SPDX-License-Identifier: GPL-2.0
12 --------------
15 mechanisms (the page cache and dentry cache) as a dynamically resizable
16 RAM-based filesystem.
19 backing store (usually the block device the filesystem is mounted on) are kept
24 memory. A similar mechanism (the dentry cache) greatly speeds up access to
28 dentries and page cache as usual, but there's nowhere to write them to.
34 you're mounting the disk cache as a filesystem. Because of this, ramfs is not
39 ------------------
41 The older "ram disk" mechanism created a synthetic block device out of
42 an area of RAM and used it as backing store for a filesystem. This block
43 device was of fixed size, so the filesystem mounted on it was of fixed
44 size. Using a ram disk also required unnecessarily copying memory from the
45 fake block device into the page cache (and copying changes back out), as well
57 Another reason ramdisks are semi-obsolete is that the introduction of
59 synthetic block devices, now from files instead of from chunks of memory.
63 ----------------
71 A ramfs derivative called tmpfs was created to add size limits, and the ability
76 ---------------
92 ------------------
106 - The old initrd was always a separate file, while the initramfs archive is
107 linked into the linux kernel image. (The directory ``linux-*/usr`` is
110 - The old initrd file was a gzipped filesystem image (in some file format,
113 see cpio(1) and Documentation/driver-api/early-userspace/buffer-format.rst).
117 - The program run by the old initrd (which was called /initrd, not /init) did
123 - When switching another root device, initrd would pivot_root and then
126 free up the space (find -xdev / -exec rm '{}' ';'), overmount rootfs
127 with the new root (cd /newmount; mount --move . /; chroot .), attach
136 ---------------------
166 a directory called "initramfs", under the linux-2.6.* directory. See
167 Documentation/driver-api/early-userspace/early_userspace_support.rst for more details.)
174 from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is
175 entirely self-contained, and the kernel's boot-time extractor is also
176 (obviously) self-contained.
185 cpio -i -d -H newc -F initramfs_data.cpio --no-absolute-filenames
195 if [ $# -ne 2 ]
201 if [ -d "$1" ]
204 (cd "$1"; find . | cpio -o -H newc | gzip) > "$2"
214 of filenames is with the find command; you should give find the -depth
223 --------------------------
230 This has the memory efficiency advantages of initramfs (no ramdisk block
232 non-GPL code you'd like to run from initramfs, without conflating it with
235 It can also be used to supplement the kernel's built-in initramfs image. The
237 the built-in initramfs archive. Some distributors also prefer to customize
238 a single kernel image with task-specific initramfs images, without recompiling.
241 ----------------------
243 An initramfs archive is a complete self-contained root filesystem for Linux.
248 - https://www.tldp.org/HOWTO/Bootdisk-HOWTO/
249 - https://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html
250 - http://www.linuxfromscratch.org/lfs/view/stable/
256 I use uClibc (https://www.uclibc.org) and busybox (https://www.busybox.net)
257 myself. These are LGPL and GPL, respectively. (A self-contained initramfs
279 gcc -static hello.c -o init
280 echo init | cpio -o -H newc | gzip > test.cpio.gz
282 qemu -kernel /boot/vmlinuz -initrd test.cpio.gz /dev/zero
289 -------------------------
318 explained in buffer-format.txt, created in usr/gen_init_cpio.c, and
320 total of human-readable text.
338 - http://www.uwsg.iu.edu/hypermail/linux/kernel/0112.2/1550.html
339 - http://www.uwsg.iu.edu/hypermail/linux/kernel/0112.2/1638.html
344 ------------------
350 "early userspace" (I.E. initramfs).
358 compressed, encrypted, copy-on-write, loopback mounted, strangely partitioned,
365 The klibc package has now been accepted into Andrew Morton's 2.6.17-mm tree.