< Return to Video

GNUscreen_comes_to_Debian_Installer.webm

  • 0:02 - 0:08
    Hello everyone, welcome to my presentation.
  • 0:08 - 0:17
    I will introduce GNU/Screen to Debian Installer today.
  • 0:19 - 0:24
    I will show you its background.
  • 0:24 - 0:26
    What is Debian Installer,
  • 0:26 - 0:30
    What is GNU/Screen,
  • 0:30 - 0:35
    Why I want GNU/Screen in Debian Installer
  • 0:35 - 0:40
    and How to add GNU/Screen support in it.
  • 0:42 - 0:47
    First, The background.
  • 0:47 - 0:51
    I know that most of you know the Debian Installer.
  • 0:51 - 0:55
    It is just an installer.
  • 0:55 - 1:01
    But actually, It is a bootable Debian environment,
  • 1:01 - 1:07
    which is minimized in size.
  • 1:08 - 1:15
    That is to say, there is no document in the image.
  • 1:15 - 1:34
    There is no other non-replicated usually-useful information for normal people, which is usually putted in "/usr/share/doc".
  • 1:34 - 1:37
    But installer stage, we don't need them.
  • 1:37 - 1:44
    So, It contributes for minimizing environment.
  • 1:44 - 1:50
    Previously, we have a installer in one or two floppy disks.
  • 1:50 - 1:53
    It means that installer was very small.
  • 1:53 - 1:55
    Nowadays, it is not possible.
  • 1:55 - 2:04
    Because the kernel size is already over size of the floppy.
  • 2:04 - 2:14
    Second, there is a partitioner inside the installer.
  • 2:14 - 2:24
    So, you can do the partition and create a new disk image inside the installer.
  • 2:24 - 2:36
    After that, we can do the "debootstrap" to install Debian environment for you.
  • 2:36 - 2:41
    Finaly, the installer will install boot loader.
  • 2:41 - 2:53
    There is all kinds of boot loader, such as GRUB for PC or for ARM???.
  • 2:53 - 3:07
    For ARM platform, such as armel or armhf, we use flash-kernel as a boot loader.
  • 3:12 - 3:15
    What is GNU/Screen?
  • 3:15 - 3:17
    First, It is a terminal multiplexer.
  • 3:17 - 3:28
    It means that you can have multiple virtual terminal in real terminal.
  • 3:28 - 3:42
    And you can switch one virtual terminal to another virtual terminal by short key.
  • 3:42 - 3:47
    In GNU/Screen, short key is "Ctrl-A (digit)".
  • 3:47 - 4:00
    And Tmux (GNU/Screen altanetives) use "Ctrl-B (digit)".
  • 4:00 - 4:14
    Then you must be thinking why we need GNU/Screen in Debian Installer.
  • 4:14 - 4:19
    What is the benefit?
  • 4:19 - 4:22
    Let me show you normal installer.
  • 4:22 - 4:28
    This is a normal installer.
  • 4:28 - 4:30
    We have UI.
  • 4:30 - 4:42
    And if we face some problem, such as partitioning or creating new disk image, we want to check the log.
  • 4:42 - 4:49
    We can press the key "Alt-F4" to switch to the log console.
  • 4:49 - 4:55
    This is a case for normal PC.
  • 4:55 - 5:03
    If you want to switch back, we can press the "Alt-F1".
  • 5:03 - 5:06
    I can show you the demo.
  • 5:53 - 5:56
    This is a normal Debian Installer screen.
  • 5:56 - 6:00
    I can enter "Alt-F2".
  • 6:00 - 6:06
    Command line appears.
  • 6:06 - 6:09
    I can see many staffs here.
  • 6:09 - 6:17
    By "Alt-F4", you can see the logs here.
  • 6:19 - 6:22
    If we want to turn back, we can enter "Alt-F1".
  • 6:22 - 6:26
    Then we go back.
  • 6:26 - 6:28
    This is a case for normal PC.
  • 6:28 - 6:36
    But, there is no such convenient methods in embedded.
  • 6:55 - 7:09
    For embedded device such as armel or armhf, we usually install by the serial console or the SSH over the network.
  • 7:09 - 7:14
    So, there is the only one real screen for you.
  • 7:14 - 7:18
    There is no other screen.
  • 7:18 - 7:19
    Actually, there is a way.
  • 7:19 - 7:21
    You can see the previous page.
  • 7:21 - 7:29
    There is a "Go Back" option here.
  • 7:29 - 7:34
    We can go back and we can have this menu.
  • 7:34 - 7:42
    This is an advanced menu and you can enter a shell from here for embedded device.
  • 7:42 - 7:46
    After you enter a shell, you can check the log.
  • 7:46 - 7:52
    The log is in "/var/log/syslog".
  • 7:52 - 7:54
    It is there, you can check it.
  • 7:54 - 7:58
    But, if you want to do it,
  • 7:58 - 8:03
    every time you have to go back and enter the shell.
  • 8:03 - 8:05
    You cannot do it anytime.
  • 8:05 - 8:10
    Because sometimes the installer is running to install packages.
  • 8:10 - 8:16
    You cannot do it anytime like common PC.
  • 8:16 - 8:18
    I was just thinking,
  • 8:18 - 8:24
    if we have GNU/Screen introduced into the Debian Installer,
  • 8:24 - 8:36
    we can have it simple and convenient as a common PC in the embedded area like armel.
  • 8:42 - 8:47
    So, I have started to work for it.
  • 8:50 - 8:54
    So, How to achieve it?
  • 8:54 - 8:58
    After some search, I found that
  • 8:58 - 9:07
    I need to support GNU/Screen binary package and its dependencies such as library to support udeb.
  • 9:07 - 9:18
    udeb is special format for Debian Installer which minimize installer image.
  • 9:18 - 9:22
    That is to say, it remove documents for example.
  • 9:22 - 9:32
    So, we have to support udeb for GNU/Screen and its library.
  • 9:33 - 9:40
    And, we need to add those udebs into the Debian Installer image.
  • 9:42 - 9:52
    The third one is that we need to write some script to start GNU/Screen in Debian Installer.
  • 9:55 - 10:00
    First, udeb support.
  • 10:05 - 10:13
    Normally, udeb is controlled by "debian/control".
  • 10:15 - 10:19
    it is like every binary packages for the source packages.
  • 10:19 - 10:28
    So we just add additional section for supporting a udeb (new binary).
  • 10:28 - 10:38
    After that, we just create a new "-udeb.install" file.
  • 10:38 - 10:49
    And it is almost identical to the original ".install" file, but entries for unnecessary file are removed.
  • 10:49 - 10:53
    After that we can create a patch.
  • 10:53 - 11:05
    Then submit it to package maintainer to let him or her to incorporate my changes.
  • 11:05 - 11:12
    We add the new udeb package.
  • 11:12 - 11:15
    But, if the package is maintained by DM,
  • 11:15 - 11:28
    unfortunately DM need to ask DD to sponsor the package to upload.
  • 11:28 - 11:35
    For the same reason, the package will stay in NEW queue in ftp-master.
  • 11:35 - 11:40
    And we need to wait the ftp-master to approve the upload.
  • 11:40 - 11:49
    So, it takes much longer time than common packages.
  • 11:52 - 12:01
    What I do is to add these udeb support of GNU/Screen and it's dependencies.
  • 12:01 - 12:10
    I created four Bug reports, actually it is with patch.
  • 12:28 - 12:34
    After that, we can have udeb package which is ready for use.
  • 12:34 - 12:40
    But, we still need to include in the Debian Installer image.
  • 12:40 - 12:54
    So, I patched to "debian-installer.git" repository for supporting it.
  • 12:56 - 13:08
    And finally we need to start GNU/Screen after we started Debian Installer.
  • 13:08 - 13:22
    We also need GNU/Screen configuration to emulate Debian Installer environment like PC.
  • 13:22 - 13:29
    We actually have four virtual screen in the Debian Installer.
  • 13:29 - 13:37
    First one is main screen, second is command line console, and last is log console.
  • 13:37 - 13:42
    We want to emulate them.
  • 13:49 - 13:54
    I want to show you the demo.
  • 14:01 - 14:06
    Actually, I run the Debian Installer on virtual machine.
  • 14:29 - 14:34
    This is the Debian Installer with GNU/Screen support.
  • 14:34 - 14:40
    So, we have four virtual terminal here, 1, 2, 3, 4.
  • 14:40 - 14:56
    And I can switch terminal by short key such as "Ctrl-A 2", "Ctrl-A 3", and "Ctrl-A 4".
  • 14:56 - 15:01
    It is a log.
  • 15:06 - 15:12
    As a PC side, as you see now, it seems not much useful.
  • 15:12 - 15:17
    Because we can use "Alt-F1", "Alt-F2", and "Alt-F3" to switch.
  • 15:17 - 15:23
    But for embedded side, It is much useful.
  • 15:35 - 15:40
    I have a progress update.
  • 15:40 - 15:47
    Actually these action items are already done.
  • 15:47 - 15:53
    For example, first two packages are for library.
  • 15:53 - 15:56
    Actually, it was not needed at all.
  • 15:56 - 16:05
    Because, I learned that from Mr. Laurent,
  • 16:05 - 16:09
    GNU/Screen can be configured to compile twice.
  • 16:09 - 16:24
    First time is for normal GNU/Screen and second time is for the one which does not use audit and pam library.
  • 16:24 - 16:32
    It can make GNU/Screen udeb binary minimized.
  • 16:32 - 16:38
    Actually, library which needs to be really supported is ncurses.
  • 16:38 - 16:49
    ncurses has been uploaded to the ftp-master two weeks ago with the GNU/Screen binary package.
  • 16:49 - 17:06
    For Debian Installer image, I just pushed a commit after Debian Installer Stretch Alpha 7 was released this week.
  • 17:06 - 17:10
    Since I just pushed the commit after the release,
  • 17:10 - 17:21
    you can now try GNU/Screen in Debian Installer daily image.
  • 17:29 - 17:32
    Which device will be benefited?
  • 17:32 - 17:43
    These are usual some ARM boards installed by serial console or SSH network console
  • 17:43 - 17:56
    and some big machines like SPARC64 or IBM s390/s390x.
  • 17:56 - 18:01
    Even some PC can be benefited.
  • 18:01 - 18:04
    Because some PC are headless.
  • 18:04 - 18:13
    There is no HDMI or VGA ports on that kinds of PC-server-like PC.
  • 18:17 - 18:26
    I would like to thank various people through early request-for-comment stage on my proposal.
  • 18:26 - 18:35
    And, there is help during my udeb package upload stage.
  • 18:35 - 18:37
    Thank you very much.
  • 18:37 - 18:42
    [Applause]
  • 18:42 - 19:02
    Are there any questions?
  • 19:02 - 19:04
    [chair]: OK, do it.
  • 19:04 - 19:13
    [questioner 00]: First of all, I use a SPARC embedded systems all the time.
  • 19:13 - 19:15
    [questioner 00]: So, absolutely this will be a great help.
  • 19:15 - 19:19
    [questioner 00]: Thank you very much for all your work.
  • 19:19 - 19:21
    [questioner 00]: I really appreciate this.
  • 19:25 - 19:32
    [question 00-00]: What was the one thing that you found hardest with doing this?
  • 19:32 - 19:39
    [question 00-01]: What did make you surprised the most "How easy it was"?
  • 19:39 - 19:44
    Actually, most difficult part is uploading the package.
  • 19:44 - 19:50
    Because one package is maintained by DM.
  • 19:50 - 19:58
    Usually DM can upload without DD sponsorship.
  • 19:58 - 20:01
    But, since udeb is regarded as new package,
  • 20:01 - 20:06
    we need a DD to sponsor it.
  • 20:06 - 20:19
    I think it takes almost two month through the process.
  • 20:21 - 20:24
    [questioner 00]: And one thing you found very easy to do,
  • 20:24 - 20:26
    [questioner 00]: which you thought got to be hard?
  • 20:26 - 20:29
    mmm...
  • 20:29 - 20:30
    [questioner 00]: Nothing is not all hard?
  • 20:30 - 20:31
    [laughs]
  • 20:31 - 20:34
    From technical side, it was not hard.
  • 20:34 - 20:37
    Because everything is there.
  • 20:37 - 20:42
    I just write some simple patch to add udeb support
  • 20:42 - 20:48
    and some script to start GNU/Screen in Debian Installer.
  • 20:48 - 20:52
    So, from technical side, it is not so difficult.
  • 20:52 - 20:54
    [questioner 00]: Awesome.
  • 20:54 - 20:55
    Thank you.
  • 20:55 - 21:00
    [questioner 00]: Next question?
  • 21:01 - 21:07
    [questioner 01]: You said that it was already in Stretch Alpha 7...
  • 21:07 - 21:13
    No, I pushed my commit after Stretch Alpha 7.
  • 21:13 - 21:15
    [questioner 01]: OK, So is it gonna be after the freeze?
  • 21:15 - 21:16
    Yes.
  • 21:16 - 21:17
    [questioner 01]: OK.
  • 21:17 - 21:25
    [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?
  • 21:25 - 21:29
    [questioner 01]: A lot or not much? Does it make any difference?
  • 21:29 - 21:41
    Yes, Debian Installer image size will be little bit larger than before.
  • 21:41 - 21:49
    For example, there are "QNAP" series which is armel architecture machine.
  • 21:49 - 21:57
    "QNAP" series are supported by Debian Installer.
  • 21:57 - 22:00
    But, "QNAP" series has size limitation.
  • 22:00 - 22:07
    Because we put kernel and initrd image in flash memory
  • 22:07 - 22:16
    and the flash memory size is about 2 MB for kernel and 4 MB for initrd.
  • 22:16 - 21:21
    So, the size is limited.
  • 22:21 - 22:29
    Whereas, the size of GNU/Screen udeb package is about 500 KB.
  • 22:29 - 22:38
    So, it might be impossible incorporate with this new feature into that specific images.
  • 22:38 - 22:43
    For other images, I think it is OK.
  • 22:43 - 22:48
    There is no big size limitation being concerned.
  • 22:57 - 23:03
    Currently, it is in Debian Installer daily build image.
  • 23:03 - 23:08
    So, you can just try it in daily build image.
  • 23:08 - 23:22
    And, URL is "https://d-i.debian.org/daily-images/".
  • 23:22 - 23:25
    There are many images in here.
  • 23:25 - 23:41
    Because there are images for all suppored architectures such as amd64 and GNU Hurd etc.
  • 23:42 - 23:49
    So, you need to choose the right architecture and image.
  • 23:54 - 23:56
    This is my talk. Thank you very much.
  • 23:56 - 24:00
    [Applause]
Title:
GNUscreen_comes_to_Debian_Installer.webm
Video Language:
English
Team:
Debconf
Project:
2016_debconf16

English subtitles

Revisions Compare revisions