1 |
On Fri, Aug 5, 2011 at 10:37 PM, William Hubbs <williamh@g.o> wrote: |
2 |
> Hi Rich, |
3 |
> |
4 |
> On Fri, Aug 05, 2011 at 09:04:50PM -0400, Rich Freeman wrote: |
5 |
>> On Fri, Aug 5, 2011 at 8:42 PM, William Hubbs <williamh@g.o> wrote: |
6 |
>> > On Fri, Aug 05, 2011 at 10:06:48PM +0200, Sven Vermeulen wrote: |
7 |
>> >> How does the tool that creates an initramfs know which files to copy from |
8 |
>> >> /usr and /var anyhow? |
9 |
>> > |
10 |
>> > My understanding is that nothing gets copied from /usr and /var, and it |
11 |
>> > doesn't have to. |
12 |
>> > |
13 |
>> > Here is my basic understanding of how the boot sequence works: |
14 |
>> > |
15 |
>> > 1) rootfs is mounted on /. Rootfs contains the contents of the |
16 |
>> > initramfs. |
17 |
>> |
18 |
>> Ok, so the initfs is typically in /boot, though it need not be. It |
19 |
>> needs to be someplace the bootloader can find it, and with grub legacy |
20 |
>> that typically means on a bare hard drive partition, or one using md |
21 |
>> raid-1 with older metadata. The initramfs doesn't need to find itself |
22 |
>> - the bootloader loads it into ram and passes its address to the |
23 |
>> kernel when executing it. |
24 |
> |
25 |
> Not quite. It is actually inside the kernel binary. You are thinking of |
26 |
> an initrd. |
27 |
> |
28 |
> Look at these files: |
29 |
> |
30 |
> /usr/src/linux/Documentation/filesystems/ramfs-rootfs-initramfs.txt. |
31 |
> /usr/src/linux/Documentation/early-userspace/README |
32 |
> |
33 |
|
34 |
The initramfs cpio archive does not HAVE to be inside the kernel |
35 |
binary. It may be assembled as a separate file (perhaps in /boot), and |
36 |
passed to the kernel by the bootloader, just as Rich describes. |
37 |
|
38 |
See the section "External initramfs images" in ramfs-rootfs-initramfs.txt. |