You are not logged in.

#1 2007-03-18 12:27:59

ferdog
Member
Registered: 2007-03-18
Posts: 5

[SOLVED] Encryption Support In Fallback Image

I'm having some trouble adding encryption support into the fallback image for kernel26-2.6.20.3-2. Thinking I was doing the right thing I added encrypt before filesystems in /etc/mkinitcpio.d/kernel26-fallback.conf and then ran pacman -S kernel26 but I did not see Parsing hook [encrypt] as I did in the building of the default image. This is what I get:

==> Building image "fallback"
==> Running command: /sbin/mkinitcpio -k 2.6.20-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [ide]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usbinput]
:: Parsing hook [raid]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26-fallback.img'...SUCCESS
==> SUCCESS

So then I read http://wiki.archlinux.org/index.php/Mkinitcpio and it says I should be editing /boot/mkinitcpio-kernel26.conf which does not exist on my system. Where do I get this file? Should I copy /etc/mkinitcpio.d/kernel26-fallback.conf to /boot/mkinitcpio-kernel26.conf and reinstall the kernel?

What is the proper way to add encryption support to the fallback image?

Forgive me if this is a stupid question. This is my fourth day with Arch (previously with Gentoo) and I'm trying to learn as much as I can.

Last edited by ferdog (2007-03-18 20:48:51)

Offline

#2 2007-03-18 14:28:36

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: [SOLVED] Encryption Support In Fallback Image

Hi ferdog, and welcome aboard! smile

/etc/mkinitcpio.d/kernel26-fallback.conf is the right place for the configuration of the fallback image. You also can see that it is being used by mkinitcpio:

==> Running command: /sbin/mkinitcpio -k 2.6.20-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img

A few month ago I had the same problem and the solution was that /etc/mkinitcpio.d/kernel26-fallback.conf had been overwritten at some point (don't ask me why). IIRC that was with an Arch 0.7.2 installation CD. In the meantime I've setup 2 other computers with Arch and LUKS encryption with the Arch 0.8 beta intallation CD and haven't encountered this problem anymore.
Please look at /etc/mkinitcpio.d/kernel26-fallback.conf again if the encrypt option was removed from it, add it again if necessary, run pacman -S kernel26 again and, if the encrypt-hook isn't parsed, look at /etc/mkinitcpio.d/kernel26-fallback.conf again if the encrypt option was removed (again). If everything fails try to run

/sbin/mkinitcpio -k 2.6.20-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img

manually and see if the problem still occurs.


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#3 2007-03-18 16:34:09

ferdog
Member
Registered: 2007-03-18
Posts: 5

Re: [SOLVED] Encryption Support In Fallback Image

G_Syme, thanks for your reply...

It looks like /etc/mkinitcpio.d/kernel26-fallback.conf is being overwritten when I issue a pacman -S kernel26 (is that by-design or is it a bug?).

I took your advice and manually created the image with:

/sbin/mkinitcpio -k 2.6.20-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img

And that worked perfectly. I hope I can remember to do that after each new kernel install smile.

Thanks again.

Offline

#4 2007-03-18 19:45:17

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: [SOLVED] Encryption Support In Fallback Image

Glad that your fallback image works now, ferdog!

BTW did you install Arch with the 0.7.2 installation CD or with the 0.8 beta CD?
The 0.8 beta ISO isn't official yet and AFAIK you still need to search the forum to find an appropriate downloads link, but for e.g. LUKS encryption it has really improved because it already has the needed libraries and a few more modules (serpent, sha256, etc.) for more encryption algorithms and methods.

ferdog wrote:

It looks like /etc/mkinitcpio.d/kernel26-fallback.conf is being overwritten when I issue a pacman -S kernel26 (is that by-design or is it a bug?).

As I've mentioned before I've had the same problem with 0.7.2 but not with 0.8 installation CDs. So if you also used the 0.7.2 version then I'm almost certain that it was a bug which got fixed in the new version.

A moment ago I've looked into my /etc/pacman.conf and have found this lines and think I now know the cause:

#
# GENERAL OPTIONS
#
[options]

[...]

NoUpgrade   = etc/mkinitcpio.d/kernel26-fallback.conf

As you come from Gentoo (where many Archers including myself also come from wink ) you know that after each emerge you are asked to look at the config files which come with the updated packages if they are not the same as the ones already on your system. AFAIK pacman doesn't support such detailed merging of config files (yet) and so by default the old config files become overwritten except if there's a NoUpgrade   = <config file> in you /etc/pacman.conf. I think that the above option might be missing in your /etc/pacman.conf. Also interesting is to have a look at this:

$ pacman -Qo /etc/mkinitcpio.conf
/etc/mkinitcpio.conf is owned by mkinitcpio 0.5.13-1
$ pacman -Qo /etc/mkinitcpio.d/kernel26-fallback.conf
/etc/mkinitcpio.d/kernel26-fallback.conf is owned by kernel26 2.6.20.3-1

That would explain why only the fallback config of mkinitcpio is overwritten on kernel update but not the main mkinitcpio config.

So in the end adding the NoUpgrade option should solve your remaining problem entirely smile .
Also if everything works fine please add [SOLVED] or something like that in front of the topic headline (You can do that by editing your first post).

Hope it helps! smile


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#5 2007-03-18 20:48:13

ferdog
Member
Registered: 2007-03-18
Posts: 5

Re: [SOLVED] Encryption Support In Fallback Image

G_Syme wrote:

BTW did you install Arch with the 0.7.2 installation CD or with the 0.8 beta CD?

0.7.2 (burned a while back)

G_Syme wrote:

As you come from Gentoo (where many Archers including myself also come from wink ) you know that after each emerge you are asked to look at the config files which come with the updated packages if they are not the same as the ones already on your system. AFAIK pacman doesn't support such detailed merging of config files (yet) and so by default the old config files become overwritten except if there's a NoUpgrade   = <config file> in you /etc/pacman.conf. I think that the above option might be missing in your /etc/pacman.conf.

Yes it was. I just added it.... I guess I was a bit spoiled with etc-update on Gentoo smile.

G_Syme wrote:

Also interesting is to have a look at this:

$ pacman -Qo /etc/mkinitcpio.conf
/etc/mkinitcpio.conf is owned by mkinitcpio 0.5.13-1
$ pacman -Qo /etc/mkinitcpio.d/kernel26-fallback.conf
/etc/mkinitcpio.d/kernel26-fallback.conf is owned by kernel26 2.6.20.3-1

That would explain why only the fallback config of mkinitcpio is overwritten on kernel update but not the main mkinitcpio config.

Cool, I can stop scratching my head now smile.

G_Syme wrote:

So in the end adding the NoUpgrade option should solve your remaining problem entirely smile .

I believe it will.

Thanks for all your time and expertise G_Syme.

Offline

Board footer

Powered by FluxBB