On Sun, Nov 17, 2013 at 6:57 AM, Tanstaafl <tansta...@libertytrek.org> wrote:
> On 2013-11-12 5:50 PM, Canek Peláez Valdés <can...@gmail.com> wrote:
>>
>> You*MUST*  add the necessary modules/tools to mount root and/or /usr.
>>
>> So if you have an XFS partition on a LVM volume on top of an mdraid,
>> and the partition is encrypted, then you need the kernel modules for
>> xfs, lvm, mdraid and crypt, and the corresponding userspace tools,
>> including fsck.xfs.
>
>
> Ok, re-reading these messages, this explanation is probably the most
> significant - thanks Canek - but I still have a few questions...
>
> Maybe part of my confusion stems from use of the word 'modules' above?
> Remember, the system I am talking about has always had kernel module support
> completely disabled (everything is built into the kernel).

In dracut, you can add kernel modules ("drivers" in dracut
terminology, which you don't require since you compile everything
in-kernel), and dracut modules. I was talking about the firsts kind.

If you have the modules compiled in the kernel, you only need the
corresponding userspace tools.

> So, my /usr is reiserfs (built into the kernel - and please no filesystem
> flame-war comments, it is what it is) on LVM (built into the kernel) on
> hardware RAID (driver built into the kernel), with no encryption involved.

I've never used a hardware raid. I don't know if it needs mdraid; if
it does, you need the *dracut* module for mdraid, otherwise you are
good. In either case, you need the *dracut* module for LVM: the kernel
alone is not able to mount LVM volumes, AFAIU; you need the userspace
tools.

> So, am I correct that I don't need ANY 'modules' (never have, and don't want
> them), leaving only the userspace tools for lvm and reiserfsck?

You need the *dracut* module for LVM, you don't need any kernel
module. Or better stated: you already have the kernel modules, inside
your kernel. What dracut does when you specify "drivers" (kernel
modules), is only to include them in the initramfs. So even if you
specify them in your dracut config file, since they are not available,
dracut will print a warning about the driver not being avaible, and it
will continue without it.

> If so then the only other question is, how to build an initramfs with just
> these...
>
>
>> I strongly recommend dracut; the modules listed in DRACUT_MODULES are
>> usually self explanatory, and it Just Works™.
>
>
> Ok, well, emerge -pvuDN dracut gives:
>
>> [ebuild  N    ~] sys-kernel/dracut-034-r1  USE="-debug -device-mapper -net
>> (-selinux)" DRACUT_MODULES="-biosdevname -bootchart -btrfs -caps -cifs
>> -crypt -crypt-gpg -crypt-loop -dash -dmraid -dmsquash-live -gensplash -iscsi
>> -livenet -lvm -mdraid -multipath -nbd -nfs -plymouth -ssh-client -syslog
>> -systemd" 272 kB
>
>
> First question: I don't see reference to reiserfs there anywhere, so how do
> I get reiserfsck (and is that all I need?) support into the initrams?

Filesystems are inferred from fstab and the fscks key in dracut.conf.
If you use the -H (host) option, you don't even need to touch fscks,
the information will be parsed from fstab.

> Second question: I guess I'd need to enable the device-mapper USE flag for
> dracut, but, since I do not use ANY kernel modules, can I ignore all of the
> 'DRACUT_MODULES'? Or do 'DRACUT_MODULES' have nothing to do with kernel
> modules?

DRACUT_MODULES have nothing to do with kernel modules (those are
called "drivers" inside dracut). The dracut modules are little scripts
which copy stuff inside the initramfs.

By the way, if you install dracut, it will do nothing in your system;
it's only for populate an initramfs. You can install it and it will
not affect your system in any way.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply via email to