1 |
On Thursday, September 15, 2011 08:31:51 PM Robin H. Johnson wrote: |
2 |
> On Thu, Sep 15, 2011 at 10:03:53PM +0200, Joost Roeleveld wrote: |
3 |
> > On Thursday, September 15, 2011 09:27:06 AM Zac Medico wrote: |
4 |
> > > On 09/15/2011 09:04 AM, Joost Roeleveld wrote: |
5 |
> > > > Thank you for your response, however, I do have a few questions |
6 |
> > > > about |
7 |
> > > > this. Where will this default initramfs actually need to be |
8 |
> > > > placed? |
9 |
> > > |
10 |
> > > It should be similar to how sys-apps/v86d is used for uvesafb |
11 |
> > > support. |
12 |
> > > It installs /usr/share/v86d/initramfs and when you configure your |
13 |
> > > kernel, you set CONFIG_INITRAMFS_SOURCE="/usr/share/v86d/initramfs" |
14 |
> > > in |
15 |
> > > order to have in included in your kernel image. |
16 |
> > |
17 |
> > Will this be set somewhere globally to the initramfs automatically? |
18 |
> > And doesn't this mean that a new kernel will need to be build just to |
19 |
> > satisfy this? |
20 |
> > |
21 |
> > I'm trying to think of how best to avoid users who are not aware to get |
22 |
> > caught with non-booting systems. |
23 |
> > |
24 |
> > Wouldn't automatic inclusion into grub.conf be a better approach? Not |
25 |
> > sure if grub.conf can handle a "global" setting for initramfs. |
26 |
> |
27 |
> Grub doesn't support a global initramfs setting, but you can build a |
28 |
> static initramfs for v86d if needed. |
29 |
|
30 |
Ok, was afraid there wasn't. If there was, it would make things easier. |
31 |
|
32 |
> > > > Also, how will |
33 |
> > > > we be able to deal with situations where this script fails? |
34 |
> > > |
35 |
> > > It should drop you to a minimal shell. |
36 |
> > |
37 |
> > But, with udev then failing, will there be the /dev-entries to mount the |
38 |
> > different partitions to fix the environment? |
39 |
> |
40 |
> Yes, /dev is provided by devtmpfs already, and that is populated by the |
41 |
> kernel. |
42 |
|
43 |
If /dev is already populated by devtmpfs with the stuff for mounting what can |
44 |
currently already be mounted without an initramfs. Won't that be sufficient to |
45 |
have udev started *after* localmount? |
46 |
|
47 |
Eg. the following configuration: |
48 |
Kernel has the "devtmpfs" option |
49 |
localmount mounts the local filesystems using the devtmpfs /dev-tree |
50 |
udev is configured to start after localmount |
51 |
|
52 |
> > > > If Gentoo does decide to follow the initramfs-route, why not |
53 |
> > > > simply |
54 |
> > > > implement /etc/init.d/localmount in the initramfs? |
55 |
> > > |
56 |
> > > I think that's pretty close to what we have planned, since the plan |
57 |
> > > is |
58 |
> > > to have the initramfs mount configuration stored on the root |
59 |
> > > filesystem.> |
60 |
> > But still require a seperate configuration file for this? |
61 |
> |
62 |
> The configuration file isn't actually required, but it's there in case |
63 |
> you want to specify MORE filesystems to mount before switching to the |
64 |
> rootfs init. |
65 |
> |
66 |
> There are two files to load from the rootfs: |
67 |
> 1. /etc/fstab |
68 |
> 2. /etc/minimal-filesystems.cfg [exact name undecided] |
69 |
> |
70 |
> The list is in the second file, just one mountpoint per line. |
71 |
> Defaults to /usr, /var |
72 |
> If the file is not available, the default is also /usr, /var. |
73 |
> |
74 |
> For each filesystem for the minimal list, use the line from fstab to |
75 |
> mount it. This covers getting the device, mountpoint and mount options. |
76 |
|
77 |
Why not try to mount all the filesystems in /etc/fstab in the minimal script |
78 |
automatically unless there is a list (not commented out) in /etc/minimal- |
79 |
filesystems.cfg ? |
80 |
|
81 |
> There is a catch to this: |
82 |
> If those non-root filesystems live on LVM or something complex, you're |
83 |
> going to need to use a more advanced initramfs, |
84 |
> genkernel/dracut/roll-your-own. |
85 |
|
86 |
This means that on a system where I currently don't need an initramfs, I |
87 |
suddenly need a full-grown initramfs. |
88 |
|
89 |
> > On my desktop, that would mean the following list: |
90 |
> > /usr/ |
91 |
> > /var/ |
92 |
> |
93 |
> Only these two should be needed to early-boot the system successfully. |
94 |
> |
95 |
> > True, but I don't have any scripts configured for udev on my desktop. |
96 |
> > My server has some scripts related to Xen, and those are all under |
97 |
> > /etc/xen/... |
98 |
> > |
99 |
> > In this case, would it still be necessary to use an initramfs? |
100 |
> |
101 |
> Where is /usr, and do you have any udev rules that need /var? |
102 |
|
103 |
I followed the following guide: |
104 |
http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml |
105 |
|
106 |
I have /usr on LVM which is on top of mdadm-raid1 on the server. |
107 |
My desktop has the same, except for the raid1-part. |
108 |
|
109 |
I don't have any udev-rules needing anything outside of /. |
110 |
Eg. they don't need /usr or anything else that is not part of the root- |
111 |
filesystem. |
112 |
The xen-scripts might, but those devices only appear when starting the PV- |
113 |
domains. And those don't start until well after everything else. |
114 |
|
115 |
-- |
116 |
Joost |