[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] screen/tmux support for network-console



Roger Shimizu <rogershimizu@gmail.com> writes:

> On Tue, Mar 1, 2016 at 2:41 AM, Martin Michlmayr <tbm@cyrius.com> wrote:
>>> > You can put local udebs in build/localudebs
>>
>> Just copy the .udeb into the directory.  daily-build will update it.
>
> Thanks for your guidance!
>
> I put screen-udeb to build/localudebs, with a few screen's dependency
> library, which is currently .deb pull from regular apt repo.
> Yes, network-console target build well (qnap failed due to size
> problem), and boot well on my linkstation.
>
> After that, I tried to find how to hook "screen" into d-i/ssh session.
> Now I know, the project is rootskel [0], /etc/passwd shows the shell
> is "/bin/network-console", so it's the entry point when ssh shell is
> invoked.
> Then "/bin/network-console" will call the following scripts:
>   /sbin/debian-installer /bin/network-console-menu
>     /lib/debian-installer.d/S20speakup
>     /lib/debian-installer.d/S30term
>     /lib/debian-installer.d/S35framebuffer-linux
>     /lib/debian-installer.d/S40term-linux
>     /lib/debian-installer.d/S60frontend
>     /lib/debian-installer.d/S65theme
>     /lib/debian-installer.d/S69keep-translations
>     /lib/debian-installer.d/S70menu
>       /lib/debian-installer/menu
>
> I changed script /bin/network-console [1], to let it call "screen
> /bin/sh" rather than "/sbin/debian-installer
> /bin/network-console-menu".
> Put the modified network-console udeb into build/localudeb/ folder and
> build d-i image again.
> In this way “ssh installer@<IP>” end up a shell within screen.
>
> I confirm the screen works well, I can easily create another shell by
> "Ctrl-a Ctrl-c".
> So the screen is basically working.
> But calling the original "/sbin/debian-installer
> /bin/network-console-menu" command fails, and show the error message:
>
> *** Error in `debconf': munmap_chunk(): invalid pointer: 0x01146cac ***
>                                                                        Aborted
>
> I traced, and found the issue occurred in the final line of script
> "/lib/debian-installer/menu":
>   exec debconf -o d-i $MENU
>
> I guess debconf just crashed.
> Of course, it only crashes in screen shell. In normal shell it runs fine.
> So, how to solve it? Currently I have no clue yet.

It seems possible that it's upset by the TERM that screen is setting, or
perhaps something related like COLUMNS.  You could perhaps try setting
that by hand to set the same TERM in screen as is set in the normal
shell, just to see if that fixes it.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY

Attachment: signature.asc
Description: PGP signature


Reply to: