:: Re: [DNG] Giving Devuan sans-initra…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Rainer Weikusat
Date:  
À: Steve Litt
CC: dng
Sujet: Re: [DNG] Giving Devuan sans-initramfs capabilities
Steve Litt <slitt@???> writes:
> Rainer Weikusat <rainerweikusat@???> wrote:
>> Steve Litt <slitt@???> writes:
>
>> > Why does everyone think I was advocating the banishment of
>> > initramfs? Go back to my initial post and you'll see I was
>> > suggesting a way to give the owner/admin a *choice* to go without
>> > initramfs.
>>
>> You already have that choice, you just need to exercise it: Compile a
>> kernel which can mount 'your' root filesystem without the help of
>> additional userspace software, be it for loading modules or for
>> additional configuration, and use that: No initsomething needed.
>>
>> In fact, that's exactly the configuration I've been using 'since
>> ever'.
>
> Where can I find documentation on how to do this? The last time I
> compiled a kernel was probably in the 20th century, so I imagine things
> have changed.


Not much. Modules don't have to be compiled separately anymore but
that's about it.

> You mention that you recompile your kernel. What do you do every time
> apt-get upgrade brings you a new kernel?


There's a Debian package called kernel-package which is supposed to
enable 'easy' creation of kernel packages from a kernel source tree but
IMHO, that's rather contorted and I don't use it. I usually deinstall
the Debian kernel package (nothing depends on that) and then install
kernels based on a tar file created by this script:

---------
#!/bin/sh
#
set +e

#* parameters
#
DEST=install
SOURCE=$1

UTS_PATH=$SOURCE/include/generated
if test -e $UTS_PATH/utsrelease.h;
then
    UTS_FILE=$UTS_PATH/utsrelease.h
elif test -e $UTS_PATH/version.h;
then
    UTS_FILE=$UTS_PATH/version.h
else
    printf "Cannot find kernel version\n" >&2
    exit 1
fi


#* actions
#
rm -rf $DEST/*
mkdir $DEST/boot

VERSION=`grep UTS_RELEASE $UTS_FILE | cut -d' ' -f3 | tr -d '"'`

KSUFF=$VERSION-$1

cp $SOURCE/System.map $DEST/boot/System.map-$VERSION
cp $SOURCE/arch/x86_64/boot/bzImage $DEST/boot/vmlinuz-$VERSION
cd $SOURCE
INSTALL_MOD_PATH=../install make modules_install
cd -

fakeroot <<EOF
cd install
chown -R root.root *
find -type d | xargs chmod 0755
find -type f | xargs chmod 0644
tar -cf ../linux-$KSUFF.tar *
EOF
---------

This is supposed to be used in a directory containing a directory with a
'compiled' kernel tree (name passed as first argument) and a directory
named 'install' supposed to be used as staging area for creating the
tar-file.

[...]

> If so, do you have some sort of file containing all your choices so
> it's easy?


The configuration of a kernel is stored in the file .config in the
top-level kernel directory (after a configuration was created,
obviously).