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