1 |
Richard Fish wrote: |
2 |
|
3 |
> Is this an initrd or initramfs (aka, cpio.gz) image? |
4 |
> |
5 |
> If it is initrd, you should have a /linuxrc script to initialize the |
6 |
> system. For grub, you will need: |
7 |
> |
8 |
> kernel /vmlinuz root=/dev/ram0 init=/linuxrc |
9 |
> initrd=/rootfs.gz |
10 |
> |
11 |
> Then your linuxrc script must *not* exit. It will probably need to |
12 |
> call /sbin/init with something like: |
13 |
> |
14 |
> exec /sbin/init $@ |
15 |
> |
16 |
> In your case, /linuxrc probably doesn't need to do much of anything else. |
17 |
> |
18 |
> |
19 |
> If it is initrams, then you just need to create a /init script and |
20 |
> place the same "exec /sbin/init..." inside it. You do not need the |
21 |
> init= option for the kernel in the grub configuration. |
22 |
> |
23 |
> For some more info, take a look at |
24 |
> /usr/src/linux/Documentation/early-userspace/README |
25 |
> |
26 |
> HTH |
27 |
> |
28 |
> -Richard |
29 |
> |
30 |
> Ognjen Bezanov wrote: |
31 |
> |
32 |
>> Hi all, |
33 |
>> |
34 |
>> Im building an x86 embedded distro using gentoo. Now i have been rather |
35 |
>> successful. I have built the whole system and it works, while only |
36 |
>> taking up 9mb (when gzipped). |
37 |
>> |
38 |
>> Now my question is how to get linux to load the gzipped image file into |
39 |
>> a ramdisk and use it as a root filesystem. |
40 |
>> |
41 |
>> Running the system directly from the CF card works great, but when |
42 |
>> trying to get it to run it in ram it fails |
43 |
>> with "kernel panic: VFS: Unable to mount root fs on unknown-block(1,0)". |
44 |
>> |
45 |
>> My attempt at running the system from ram is as follows: |
46 |
>> |
47 |
>> (grub config file): |
48 |
>> |
49 |
>> kernel /vmlinuz initrd=/rootfs.gz root=/dev/ram0 |
50 |
>> |
51 |
>> the rootfs.gz file is ~10Mb, and when uncompressed is an 100mb image |
52 |
>> (most of the image is free space to |
53 |
>> allow for future additions, this is a test bed). |
54 |
>> |
55 |
>> |
56 |
>> Now I presume this is probably what is incorrect, in which case can |
57 |
>> anyone help me regarding how to use |
58 |
>> ramdisks as root devices. (googling about tells me that the initrd image |
59 |
>> is not the root image, but rather |
60 |
>> a pre-root mounting fs to prepare the system for booting). |
61 |
>> |
62 |
>> P.S Please CC me as this mailinglist doesnt play nice with my email |
63 |
>> account. thanks! |
64 |
>> |
65 |
>> |
66 |
>> |
67 |
> |
68 |
Thanks, that was helpful. Now the system finds the root fs and loads it. |
69 |
But the system still wont boot. It tells me "RAMDISK: Compressed image |
70 |
found at block 0" as a final kernel message, then just sits there (for |
71 |
ages). At lease its closer to functioning then before, but there are a |
72 |
few bugs to iron out. |
73 |
|
74 |
What could be wrong? |
75 |
|
76 |
Thanks in advance |
77 |
|
78 |
-- |
79 |
gentoo-user@g.o mailing list |