You are not logged in.

#1 2012-02-23 22:20:21

silentsnake
Member
Registered: 2012-02-23
Posts: 57

Dialog within the initramfs

Hi there,

i would like to use a Dialog box (Dialog is an easy-to-use tool to create ncurses-based "windows" from bash) for password entry within the initramfs to encrypt the root device.

So I added /usr/bin/dialog to the BINARIES variable in the mkinitcpio.conf and modified /lib/initcpio/hooks/encrypt a bit (by adding a dialog box). In the comments of mkinitcpio.conf it is said that the binaries were parsed for dependent libraries so I didn't copy them manually.

ldd /usr/bin/dialog
	linux-vdso.so.1 =>  (0x00007fff92bc5000)
	libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007ffc0adc6000)
	libm.so.6 => /lib/libm.so.6 (0x00007ffc0aad2000)
	libc.so.6 => /lib/libc.so.6 (0x00007ffc0a733000)
	/lib/ld-linux-x86-64.so.2 (0x00007ffc0b023000)

When starting the following error occurs: "Error opening terminal: linux" I think something goes wrong with the output and Dialog assumes an full Linux system and not busybox, but I didn't find a solution.

Did anybody tried something similar and might have a guess whats wrong there?

One more question... Dialog output will be stored in a file (at least I didn't know a way how to pipe the output directly to cryptsetupt) and I am a bit curios if this is safe? But I think it is ok because the initramfs is stored on the RAM and not on the harddrive and if someone gets access to the RAM of the computer while it's running the system is compromised anyway or I am wrong in some point?

So thank your for any comments. smile

Last edited by silentsnake (2012-02-23 22:21:53)

Offline

#2 2012-02-23 22:55:59

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Dialog within the initramfs

Early boot uses /dev/console, which seems to be incapable of supporting the ioctls that ncurses relies on.

Offline

#3 2012-02-23 23:06:10

silentsnake
Member
Registered: 2012-02-23
Posts: 57

Re: Dialog within the initramfs

Ok thanks for the explanation. Then the usual cryptsetup password prompt will be enough ;-)

Offline

Board footer

Powered by FluxBB