1 |
On Thu, Mar 15, 2012 at 6:56 AM, Tanstaafl <tanstaafl@×××××××××××.org> wrote: |
2 |
> On 2012-03-15 9:05 AM, Neil Bothwick <neil@××××××××××.uk> wrote: |
3 |
>> |
4 |
>> On Thu, 15 Mar 2012 08:41:38 -0400, Tanstaafl wrote: |
5 |
>> |
6 |
>>>> That's why I build the initramfs into the kernel and not as a separate |
7 |
>>>> file. If I do something to break the initramfs I just boot the |
8 |
>>>> previous kernel knowing it will still work. |
9 |
>>> |
10 |
>>> |
11 |
>>> Ok, time to show my ignorance... |
12 |
>>> |
13 |
>>> How would I know if I am using an initramfs, and if I was, whether it |
14 |
>>> was built into the kernel or not? |
15 |
> |
16 |
> |
17 |
>> Well, you built the kernel, so you should know. |
18 |
> |
19 |
> |
20 |
> Well, since I basically just used a kernel .config that someone else |
21 |
> originally set up, copying .config over and running make oldconfig when |
22 |
> upgrading over the years, stumbling through any changes that broke anything |
23 |
> (like when some changes to iptables broke my firewall back around 2.6.2x), I |
24 |
> really didn't know - but I just confirmed that it is indeed built into my |
25 |
> kernels, so, now, how do I know if I am *using* it or not? |
26 |
> |
27 |
> |
28 |
>> Technically, we are all using an initramfs as all 2.6/3 kernels mount an |
29 |
>> initramfs when they load. If does not contain an init script, they fall |
30 |
>> back to the legacy behaviour. |
31 |
> |
32 |
> |
33 |
> So, how do I know whether or not 'it contains an init script'? |
34 |
> |
35 |
> I know, my ignorance is confounding... |
36 |
> |
37 |
>> See /usr/src/linux/Documentation/filesystems/ramfs-rootfs-initramfs.txt |
38 |
> |
39 |
> |
40 |
> Read it, thanks, but it didn't help me answer the above... |
41 |
> |
42 |
|
43 |
I've only used an initramfs/initrd once so I can relate to the |
44 |
confusion. Assuming you have the config in /proc run: |
45 |
|
46 |
c2stable ~ # zcat /proc/config.gz | grep INITRAMFS |
47 |
CONFIG_INITRAMFS_SOURCE="" |
48 |
c2stable ~ # |
49 |
|
50 |
Also, if you didn't actually create the initramfs hierarchy and zip it |
51 |
up to be used by your kernel then you're not using one, other than |
52 |
what Neil said that we all use one that does nothing. |
53 |
|
54 |
HTH, |
55 |
Mark |