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 ARM???.
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 short key.
0:03:42.000,0:03:47.000
In GNU/Screen, short key is "Ctrl-A (digit)".
0:03:47.000,0:04:00.000
And Tmux (GNU/Screen altanetives) use "Ctrl-B (digit)".
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" 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, 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 many staffs 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, 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 in embedded.
0:06:55.000,0:07:09.000
For embedded device such as armel or armhf, we usually install by the serial console or the SSH over the network.
0:07:09.000,0:07:14.000
So, there is the only one real screen for you.
0:07:14.000,0:07:18.000
There is no other screen.
0:07:18.000,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, you can check the log.
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 and enter the shell.
0:08:03.000,0:08:05.000
You cannot do it anytime.
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 anytime like common 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 into the Debian Installer,
0:08:24.000,0:08:36.000
we can have it simple and convenient as a common 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 which minimize installer image.
0:09:18.000,0:09:22.000
That is to say, it remove documents for example.
0:09:22.000,0:09:32.000
So, we have to support udeb for GNU/Screen and its library.
0:09:33.000,0:09:40.000
And, we need to add those udebs 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 for the source packages.
0:10:19.000,0:10:28.000
So we just add additional section 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 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 to sponsor the package to upload.
0:11:28.000,0:11:35.000
For the same reason, the package will stay in NEW queue in ftp-master.
0:11:35.000,0:11:40.000
And we need to wait the ftp-master to approve the upload.
0:11:40.000,0:11:49.000
So, it takes much longer time than common packages.
0:11:52.000,0:12:01.000
What I do is to add these udeb support of GNU/Screen and it's dependencies.
0:12:01.000,0:12:10.000
I created four Bug reports, actually it is with patch.
0:12:28.000,0:12:34.000
After that, we can have udeb package which is ready for use.
0:12:34.000,0:12:40.000
But, we still need to include in the Debian Installer image.
0:12:40.000,0:12:54.000
So, I patched to "debian-installer.git" repository for supporting it.
0:12:56.000,0:13:08.000
And finally we need to start GNU/Screen 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 in the Debian Installer.
0:13:29.000,0:13:37.000
First one is main screen, second is command 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 on virtual machine.
0:14:29.000,0:14:34.000
This is the Debian Installer with GNU/Screen support.
0:14:34.000,0:14:40.000
So, we have four virtual terminal here, 1, 2, 3, 4.
0:14:40.000,0:14:56.000
And I can switch terminal by short key 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, it seems not much useful.
0:15:12.000,0:15:17.000
Because we can use "Alt-F1", "Alt-F2", 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 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 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
It can make GNU/Screen udeb binary minimized.
0:16:32.000,0:16:38.000
Actually, library which needs 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 after the release,
0:17:10.000,0:17:21.000
you can now try GNU/Screen in Debian Installer daily image.
0:17:29.000,0:17:32.000
Which device will be benefited?
0:17:32.000,0:17:43.000
These are usual some ARM boards installed by serial console or SSH network console
0:17:43.000,0:17:56.000
and some big machines like SPARC64 or IBM s390/s390x.
0:17:56.000,0:18:01.000
Even some PC can be benefited.
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 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, there is help during 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 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 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 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 to add udeb support
0:20:42.000,0:20:48.000
and some script to start 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 kernel and initrd image 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:16.000,0:21:21.000
So, the size is limited.
0:22:21.000,0:22:29.000
Whereas, the size of GNU/Screen udeb 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 being 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 here.
0:23:25.000,0:23:41.000
Because there are images for all suppored 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]