0:00:02.000,0:00:08.000
Hello everyone, welcome to my presentation.
0:00:08.000,0:00:17.000
I will introduce GNU/Screen to Debian Installer today.
0:00:19.000,0:00:24.000
I will show you its background.
0:00:24.000,0:00:26.000
What is Debian Installer,
0:00:26.000,0:00:30.000
What is GNU/Screen,
0:00:30.000,0:00:35.000
Why I want GNU/Screen in Debian Installer
0:00:35.000,0:00:40.000
and How to add GNU/Screen support in it.
0:00:42.000,0:00:47.000
First, The background.
0:00:47.000,0:00:51.000
I know that most of you know the Debian Installer.
0:00:51.000,0:00:55.000
It is just an installer.
0:00:55.000,0:01:01.000
But actually, It is a bootable Debian environment,
0:01:01.000,0:01:07.000
which is minimized in size.
0:01:08.000,0:01:15.000
That is to say, there is no document in the image.
0:01:15.000,0:01:34.000
There is no other non-replicated usually-useful information for normal people, which is usually putted in "/usr/share/doc".
0:01:34.000,0:01:37.000
But installer stage, we don't need them.
0:01:37.000,0:01:44.000
So, It contributes for minimizing environment.
0:01:44.000,0:01:50.000
Previously, we have a installer in one or two floppy disks.
0:01:50.000,0:01:53.000
It means that installer was very small.
0:01:53.000,0:01:55.000
Nowadays, it is not possible.
0:01:55.000,0:02:04.000
Because the kernel size is already over size of the floppy.
0:02:04.000,0:02:14.000
Second, there is a partitioner inside the installer.
0:02:14.000,0:02:24.000
So, you can do the partition and create a new disk image inside the installer.
0:02:24.000,0:02:36.000
After that, we can do the "debootstrap" to install Debian environment for you.
0:02:36.000,0:02:41.000
Finaly, the installer will install boot loader.
0:02:41.000,0:02:53.000
There is all kinds of boot loader, such as GRUB for PC or for ARM64.
0:02:53.000,0:03:07.000
For ARM platform, such as armel or armhf, we use flash-kernel as a boot loader.
0:03:12.000,0:03:15.000
What is GNU/Screen?
0:03:15.000,0:03:17.000
First, It is a terminal multiplexer.
0:03:17.000,0:03:28.000
It means that you can have multiple virtual terminal in real terminal.
0:03:28.000,0:03:42.000
And you can switch one virtual terminal to another virtual terminal by a shortcut.
0:03:42.000,0:03:47.000
In GNU/Screen, the shortcut is "Ctrl-A + 1", 2, 3, 4.
0:03:47.000,0:04:00.000
And Tmux (GNU/Screen alternatives)[br]use "Ctrl-B + 1", 2, 3, 4.
0:04:00.000,0:04:14.000
Then you must be thinking why we need GNU/Screen in Debian Installer.
0:04:14.000,0:04:19.000
What is the benefit?
0:04:19.000,0:04:22.000
Let me show you normal installer.
0:04:22.000,0:04:28.000
This is a normal installer.
0:04:28.000,0:04:30.000
We have UI.
0:04:30.000,0:04:42.000
And if we face some problem, such as partitioning or creating new disk image, we want to check the log.
0:04:42.000,0:04:49.000
We can press the key "Alt-F4"[br]to switch to the log console.
0:04:49.000,0:04:55.000
This is a case for normal PC.
0:04:55.000,0:05:03.000
If you want to switch back,[br]we can press the "Alt-F1".
0:05:03.000,0:05:06.000
I can show you the demo.
0:05:53.000,0:05:56.000
This is a normal Debian Installer screen.
0:05:56.000,0:06:00.000
I can enter "Alt-F2".
0:06:00.000,0:06:06.000
Command line appears.
0:06:06.000,0:06:09.000
I can see lots of stuff here.
0:06:09.000,0:06:17.000
By "Alt-F4", you can see the logs here.
0:06:19.000,0:06:22.000
If we want to turn back,[br]we can enter "Alt-F1".
0:06:22.000,0:06:26.000
Then we go back.
0:06:26.000,0:06:28.000
This is a case for normal PC.
0:06:28.000,0:06:36.000
But, there is no such convenient methods[br]in embedded.
0:06:55.000,0:06:58.720
For embedded device[br]such as armel or armhf
0:06:58.720,0:07:09.000
we usually install using the serial console[br]or the SSH over the network.
0:07:09.000,0:07:14.000
So, there is the only one real screen[br]for you.
0:07:14.000,0:07:17.150
There is no other screen.
0:07:17.150,0:07:19.000
Actually, there is a way.
0:07:19.000,0:07:21.000
You can see the previous page.
0:07:21.000,0:07:29.000
There is a "Go Back" option here.
0:07:29.000,0:07:34.000
We can go back and we can have this menu.
0:07:34.000,0:07:42.000
This is an advanced menu and you can enter a shell from here for embedded device.
0:07:42.000,0:07:46.000
After you enter a shell,[br]you can check the logs.
0:07:46.000,0:07:52.000
The log is in "/var/log/syslog".
0:07:52.000,0:07:54.000
It is there, you can check it.
0:07:54.000,0:07:58.000
But, if you want to do it,
0:07:58.000,0:08:03.000
every time you have to go back[br]and enter the shell.
0:08:03.000,0:08:05.000
You cannot do it all the time either.
0:08:05.000,0:08:10.000
Because sometimes the installer is running to install packages.
0:08:10.000,0:08:16.000
You cannot do it at anytime[br]like in a normal PC.
0:08:16.000,0:08:18.000
I was just thinking,
0:08:18.000,0:08:24.000
if we have GNU/Screen introduced[br]into the Debian Installer,
0:08:24.000,0:08:36.000
we can have it simple and convenient as a normal PC in the embedded area like armel.
0:08:42.000,0:08:47.000
So, I have started to work for it.
0:08:50.000,0:08:54.000
So, How to achieve it?
0:08:54.000,0:08:58.000
After some search, I found that
0:08:58.000,0:09:07.000
I need to support GNU/Screen binary package and its dependencies such as library to support udeb.
0:09:07.000,0:09:18.000
udeb is special format for Debian Installer[br]which minimize installer image.
0:09:18.000,0:09:22.000
That is to say,[br]it remove documents for example.
0:09:22.000,0:09:32.000
So, we have to support udeb[br]for GNU/Screen and its library.
0:09:33.000,0:09:40.000
And, we need to add those udebs[br]into the Debian Installer image.
0:09:42.000,0:09:52.000
The third one is that we need to write some script to start GNU/Screen in Debian Installer.
0:09:55.000,0:10:00.000
First, udeb support.
0:10:05.000,0:10:13.000
Normally, udeb is controlled by "debian/control".
0:10:15.000,0:10:19.000
it is like every binary packages[br]for the source packages.
0:10:19.000,0:10:28.000
So we just add additional section[br]for supporting a udeb (new binary).
0:10:28.000,0:10:38.000
After that, we just create a new "-udeb.install" file.
0:10:38.000,0:10:49.000
And it is almost identical to the original ".install" file, but entries for unnecessary file are removed.
0:10:49.000,0:10:53.000
After that we can create a patch.
0:10:53.000,0:11:05.000
Then submit it to package maintainer[br]to let him or her to incorporate my changes.
0:11:05.000,0:11:12.000
We add the new udeb package.
0:11:12.000,0:11:15.000
But, if the package is maintained by DM,
0:11:15.000,0:11:28.000
unfortunately DM need to ask DD[br]to sponsor the package to upload.
0:11:28.000,0:11:35.000
For the same reason, the package will stay[br]in NEW queue in ftp-master.
0:11:35.000,0:11:40.000
And we need to wait the ftp-master[br]to approve the upload.
0:11:40.000,0:11:49.000
So, it takes much longer time[br]than normal packages.
0:11:52.000,0:12:01.000
What I do is to add these udeb support[br]of GNU/Screen and it's dependencies.
0:12:01.000,0:12:10.000
I created four Bug reports,[br]actually these are four bugs with patches.
0:12:28.000,0:12:34.000
After that, we can have udeb package[br]that are ready to use.
0:12:34.000,0:12:40.000
But, we still need to include[br]in the Debian Installer image.
0:12:40.000,0:12:54.000
So, I patched to "debian-installer.git" repository[br]to support it.
0:12:56.000,0:13:08.000
And finally we need to start GNU/Screen command[br]after we started Debian Installer.
0:13:08.000,0:13:22.000
We also need GNU/Screen configuration to emulate Debian Installer environment like PC.
0:13:22.000,0:13:29.000
We actually have four virtual screen[br]in the Debian Installer.
0:13:29.000,0:13:37.000
First one is main screen, second is command[br]line console, and last is log console.
0:13:37.000,0:13:42.000
We want to emulate them.
0:13:49.000,0:13:54.000
I want to show you the demo.
0:14:01.000,0:14:06.000
Actually, I run the Debian Installer[br]on virtual machine.
0:14:29.000,0:14:34.000
This is the Debian Installer[br]with GNU/Screen support.
0:14:34.000,0:14:40.000
So, we have four virtual terminals here,[br]1, 2, 3, 4.
0:14:40.000,0:14:56.000
And I can switch terminal by a shortcut[br]such as "Ctrl-A + 2", "Ctrl-A + 3", and "Ctrl-A + 4".
0:14:56.000,0:15:01.000
It is a log.
0:15:06.000,0:15:12.000
As a PC side, as you see now,[br]it seems not much useful.
0:15:12.000,0:15:17.000
Because we can use "Alt-F1", "Alt-F2",[br]and "Alt-F3" to switch.
0:15:17.000,0:15:23.000
But for embedded side, It is much useful.
0:15:35.000,0:15:40.000
I have a progress update.
0:15:40.000,0:15:47.000
Actually these action items[br]are already done.
0:15:47.000,0:15:53.000
For example, first two packages are for library.
0:15:53.000,0:15:56.000
Actually, it was not needed at all.
0:15:56.000,0:16:05.000
Because, I learned that from Mr. Laurent,
0:16:05.000,0:16:09.000
GNU/Screen can be configured[br]to compile twice.
0:16:09.000,0:16:24.000
First time is for normal GNU/Screen and second time is for the one which does not use audit and pam library.
0:16:24.000,0:16:32.000
So, it can make GNU/Screen udeb binary minimized.
0:16:32.000,0:16:38.000
Actually, library which needs[br]to be really supported is ncurses.
0:16:38.000,0:16:49.000
ncurses has been uploaded to the ftp-master two weeks ago with the GNU/Screen binary package.
0:16:49.000,0:17:06.000
For Debian Installer image, I just pushed a commit after Debian Installer Stretch Alpha 7 was released this week.
0:17:06.000,0:17:10.000
Since I just pushed the commit[br]after the release,
0:17:10.000,0:17:21.000
you can now try GNU/Screen[br]in Debian Installer daily image.
0:17:29.000,0:17:32.000
Which device will benefit from it?
0:17:32.000,0:17:43.000
These are usual some ARM boards installed[br]by serial console or SSH network console
0:17:43.000,0:17:56.000
and some big machines[br]like SPARC64 or IBM s390/s390x.
0:17:56.000,0:18:01.000
Even some PC can benefit from it.
0:18:01.000,0:18:04.000
Because some PC are headless.
0:18:04.000,0:18:13.000
There is no HDMI or VGA ports[br]on that kinds of PC-server-like PC.
0:18:17.000,0:18:26.000
I would like to thank various people through early request-for-comment stage on my proposal
0:18:26.000,0:18:35.000
and the help during[br]my udeb package upload stage.
0:18:35.000,0:18:37.000
Thank you very much.
0:18:37.000,0:18:42.000
[Applause]
0:18:42.000,0:19:02.000
Are there any questions?
0:19:02.000,0:19:04.000
[chair]: OK, do it.
0:19:04.000,0:19:13.000
[questioner 00]: First of all, I use a SPARC embedded systems all the time.
0:19:13.000,0:19:15.000
[questioner 00]: So, absolutely this will be a great help.
0:19:15.000,0:19:19.000
[questioner 00]: Thank you very much for all your work.
0:19:19.000,0:19:21.000
[questioner 00]: I really appreciate this.
0:19:25.000,0:19:32.000
[question 00-00]: What was the one[br]thing that you found hardest with doing this?
0:19:32.000,0:19:39.000
[question 00-01]: What did make you surprised the most "How easy it was"?
0:19:39.000,0:19:44.000
Actually, most difficult part[br]is uploading the package.
0:19:44.000,0:19:50.000
Because one package is maintained by DM.
0:19:50.000,0:19:58.000
Usually DM can upload[br]without DD sponsorship.
0:19:58.000,0:20:01.000
But, since udeb is regarded as new package,
0:20:01.000,0:20:06.000
we need a DD to sponsor it.
0:20:06.000,0:20:19.000
I think it takes almost two month through the process.
0:20:21.000,0:20:24.000
[questioner 00]: And one thing you found very easy to do,
0:20:24.000,0:20:26.000
[questioner 00]: which you thought got to be hard?
0:20:26.000,0:20:29.000
mmm...
0:20:29.000,0:20:30.000
[questioner 00]: Nothing is not all hard?
0:20:30.000,0:20:31.000
[laughs]
0:20:31.000,0:20:34.000
From technical side, it was not hard.
0:20:34.000,0:20:37.000
Because everything is there.
0:20:37.000,0:20:42.000
I just write some simple patch[br]to add udeb support
0:20:42.000,0:20:48.000
and some script to start[br]GNU/Screen in Debian Installer.
0:20:48.000,0:20:52.000
So, from technical side, it is not so difficult.
0:20:52.000,0:20:54.000
[questioner 00]: Awesome.
0:20:54.000,0:20:55.000
Thank you.
0:20:55.000,0:21:00.000
[questioner 00]: Next question?
0:21:01.000,0:21:07.000
[questioner 01]: You said that it was already in Stretch Alpha 7...
0:21:07.000,0:21:13.000
No, I pushed my commit after Stretch Alpha 7.
0:21:13.000,0:21:15.000
[questioner 01]: OK, So is it gonna be after the freeze?
0:21:15.000,0:21:16.000
Yes.
0:21:16.000,0:21:17.000
[questioner 01]: OK.
0:21:17.000,0:21:25.000
[question 01-00]: Do you know if adding all these components related to GNU/Screen, how much the size of image will be increased in?
0:21:25.000,0:21:29.000
[questioner 01]: A lot or not much? Does it make any difference?
0:21:29.000,0:21:41.000
Yes, Debian Installer image size will be little bit larger than before.
0:21:41.000,0:21:49.000
For example, there are "QNAP" series which is armel architecture machine.
0:21:49.000,0:21:57.000
"QNAP" series are supported by Debian Installer.
0:21:57.000,0:22:00.000
But, "QNAP" series has size limitation.
0:22:00.000,0:22:07.000
Because we put the kernel and initrd image[br]in flash memory
0:22:07.000,0:22:16.000
and the flash memory size is about 2 MB for kernel and 4 MB for initrd.
0:22:18.390,0:22:21.100
So, the size is limited.
0:22:21.100,0:22:29.000
Whereas, the size of GNU/Screen udeb[br]package is about 500 KB.
0:22:29.000,0:22:38.000
So, it might be impossible incorporate with this new feature into that specific images.
0:22:38.000,0:22:43.000
For other images, I think it is OK.
0:22:43.000,0:22:48.000
There is no big size limitation concerned.
0:22:57.000,0:23:03.000
Currently, it is in Debian Installer daily build image.
0:23:03.000,0:23:08.000
So, you can just try it in daily build image.
0:23:08.000,0:23:22.000
And, URL is "https://d-i.debian.org/daily-images/".
0:23:22.000,0:23:25.000
There are many images in there.
0:23:25.000,0:23:41.000
Because there are images for all supported architectures such as amd64 and GNU Hurd etc.
0:23:42.000,0:23:49.000
So, you need to choose the right architecture and image.
0:23:54.000,0:23:56.000
This is my talk. Thank you very much.
0:23:56.000,0:24:00.000
[Applause]