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

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



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.

Except for the crash in debconf, I have other a few questions:

- all libraries screen-udeb depends on need to be udeb? If I were DD,
there'll be some NMU. But I'm not, it seems I need to open plenty of
tickets to submit patches and RFS, etc..
- Currently I'm trying on Linkstation boxes, so need to build / copy
image to HDD / move HDD to Linkstation, etc. too overhead, so I'm
wondering whether there's quick way to test the network-console image.

Thank you!

[0] https://anonscm.debian.org/cgit/d-i/rootskel.git
[1] https://anonscm.debian.org/cgit/d-i/network-console.git

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 17B3ACB1


Reply to: