We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

LinuxBoot and booting fast

00:00

Formale Metadaten

Titel
LinuxBoot and booting fast
Untertitel
Use Linux as the bootloader and start the system up fast.
Serientitel
Anzahl der Teile
50
Autor
Lizenz
CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
In contrast to most firmware, like UEFI based or the BIOS, Linux is free software, has drivers for everything and is well known to the administrator. So why not use it in the firmware too? Some work has to be done though to fit it into the flash ROM chip and make it fast. Due to increases in flash ROM chip sizes, it’s possible again to put the Linux kernel and an initrd there, and use Linux as a boot loader. In 2017 the LinuxBoot project joined the Linux Foundation, and several big companies backed it. This talk presents the project, the benefits and gives a short demonstration in conjunction with coreboot. To achieve the goal, the Linux kernel should be adapted for the board to make it as small as possible. So, it’s back to building your own Linux kernel. Additionally, the boot time should not suffer, so methods on how to profile and to improve start-up time are presented.
24
Vorschaubild
15:29
25
Vorschaubild
21:21
32
44
Minkowski-MetrikSystemprogrammierungIkosaederPlancksches WirkungsquantumGüte der AnpassungFirmwareMathematikerinFreewareSoftwareÄußere Algebra eines ModulsSystemstartLokales MinimumBesprechung/Interview
QuellcodeCOMCoxeter-GruppeFokalpunktSystemstartFirmwareModallogikPhysikalisches SystemDatenverwaltungATMDifferenteCodeFunktion <Mathematik>SystemprogrammierungBefehlsprozessorComputersicherheitFreewareSoftwareschwachstelleSystemverwaltungSoftwareBetriebssystemNichtlinearer OperatorCoxeter-GruppePhysikalisches SystemMultiplikationsoperatorFokalpunktDatenverarbeitungssystemATMDämon <Informatik>FirmwareProjektive EbeneProdukt <Mathematik>Endliche ModelltheorieKartesische KoordinatenKernel <Informatik>MenütechnikFlash-SpeicherSystemstartTouchscreenNeuroinformatikVererbungshierarchieMultimediaKontrast <Statistik>ARM <Computerarchitektur>Zusammenhängender GraphGamecontrollerHardwareZweiCoprozessorTreiber <Programm>DatensichtgerätTopologieImplementierungMereologieProgrammfehlerBootenInterface <Schaltung>SchlüsselverwaltungEreignishorizontRechter WinkelBildschirmfensterBridge <Kommunikationstechnik>FestplatteDatenverwaltungVirenscannerQuaderSpeicherabzugQuellcodeMalwareStrömungsrichtungComputeranimation
CodeHardwareSystemstartBootenMinkowski-MetrikKernel <Informatik>VerschlingungFirefox <Programm>Lokales MinimumSichtenkonzeptElektronische PublikationQuellcodeElektronischer FingerabdruckTopologiep-BlockSystemprogrammierungFirmwareImplementierungKlumpenstichprobeElektronischer DatenaustauschSchnelltasteVerschlingungRechter WinkelFirmwareEndliche ModelltheorieUnendlichkeitTreiber <Programm>BetriebssystemGeradeGamecontrollerFestplatteProtokoll <Datenverarbeitungssystem>BootenCodeFlash-SpeicherBildgebendes VerfahrenSoftwareStatistikFacebookPhysikalisches SystemKernel <Informatik>SystemstartSoftwareentwicklerBeweistheorieImplementierungGroße VereinheitlichungKeller <Informatik>Minkowski-MetrikFreewareCluster <Rechnernetz>GrenzschichtablösungCoxeter-GruppeMessage-PassingProgrammierungBildschirmfensterSystemverwaltungLokales MinimumVektorraumSoftwarewartungMetrisches SystemQuaderSystemaufrufHardwareComputeranimation
Leistung <Physik>Architektur <Informatik>FirmwareBootenInterface <Schaltung>SystemstartKernel <Informatik>SystemprogrammierungWurzel <Mathematik>Offene MengeDefaultDemo <Programm>Framework <Informatik>Treiber <Programm>FirmwareBitKernel <Informatik>Interface <Schaltung>SystemstartMinkowski-MetrikDreiPhysikalisches SystemKontrast <Statistik>Demo <Programm>QuellcodeSocketRechter WinkelBetriebssystemBootenMultiplikationsoperatorAbzählenPCI-ExpressBildgebendes VerfahrenPhasenumwandlungFlash-SpeicherSoftwareCoxeter-GruppeMaßerweiterungDistributionenraumRoutingZusammenhängender GraphFreewareProgrammierumgebungSystemplattformCASE <Informatik>MAPWeb SiteProjektive EbeneSchreib-Lese-KopfSkriptspracheZweiBinärcodeProgrammierungCompilerExpertensystemHardwareWurm <Informatik>Mini-DiscCodeLeistung <Physik>Socket-SchnittstelleGebäude <Mathematik>SoftwareentwicklerElektronische PublikationProzessfähigkeit <Qualitätsmanagement>LastWurzel <Mathematik>SpeicherabzugComputeranimation
SystemprogrammierungDefaultSystemstartMenütechnikBootenNormalvektorWurzel <Mathematik>SoftwaretestKonfiguration <Informatik>MultiplikationsoperatorSkriptspracheGruppenoperationKonfigurationsraumSoftwareentwicklerElektronische PublikationBootenRechter WinkelParametersystemMAPBitSystemstartMinkowski-MetrikSchreib-Lese-KopfDefaultSpeicherabzugComputeranimation
BetriebssystemMultiplikationsoperatorPunktZeitstempelDemo <Programm>Physikalisches SystemMinkowski-MetrikZweiRechter WinkelSystemstartKernel <Informatik>Schreib-Lese-KopfMotion CapturingInverser LimesDienst <Informatik>SpeicherabzugNichtlinearer OperatorComputeranimation
SystemprogrammierungMessage-PassingZweiZeitstempelWiederherstellung <Informatik>SystemstartSpeicherabzugNabel <Mathematik>SpielkonsoleMereologieServerDemo <Programm>MultiplikationsoperatorFestplattePhysikalisches SystemATMNichtflüchtiger SpeicherRechter WinkelGamecontrollerInformationsspeicherungComputeranimation
SystemprogrammierungDefaultIntelFehlermeldungBootenServerBeschreibungskomplexitätSystemstartMini-DiscFirmwareKonfiguration <Informatik>Desintegration <Mathematik>Wurm <Informatik>Total <Mathematik>ZweiNotebook-ComputerParallele SchnittstelleStandardabweichungVerschlingungBootenFirmwareKomplex <Algebra>Rechter WinkelDateiverwaltungOpen SourceGraphikprozessorStrömungsrichtungWeb SiteLastWechselsprungSystemstartCodeDemo <Programm>Physikalisches SystemMultiplikationsoperatorSpeicherabzugQuaderNichtflüchtiger SpeicherCASE <Informatik>Hidden-Markov-ModellSystemplattformKonfiguration <Informatik>MultimediaMini-DiscFreewareKernel <Informatik>BeobachtungsstudieEndliche ModelltheorieHardwareGraphische BenutzeroberflächeBrowserComputersicherheitLeistung <Physik>ServerSerielle SchnittstelleBetriebssystemBitFokalpunktEnergiedichteVersionsverwaltungRechenschieber
Physikalisches SystemKernel <Informatik>Minkowski-MetrikGebäude <Mathematik>GraphSystemstartFokalpunktSystemprogrammierungHydrostatikModul <Datentyp>Nichtflüchtiger SpeicherLeistungsbewertungSchlussregelDienst <Informatik>ModemSoftwareentwicklerIntelARM <Computerarchitektur>GoogolOffene MengeLeistung <Physik>Workstation <Musikinstrument>Interface <Schaltung>DifferenteServerTypentheorieDruckverlaufDesintegration <Mathematik>Notebook-ComputerShape <Informatik>BimodulMultiplikationsoperatorPhysikalisches SystemZweiGraphFokalpunktKonfigurationsraumDefaultSoftwareSkriptspracheZahlenbereichBitDatenverwaltungGrenzschichtablösungMereologieDienst <Informatik>BetriebssystemTreiber <Programm>Kette <Mathematik>BootenModemAblaufverfolgungStellenringFunktionalKernel <Informatik>SystemstartUmwandlungsenthalpieFirmwareInnerer PunktProjektive EbeneLeistung <Physik>Workstation <Musikinstrument>FreewareHardwareServerMinkowski-MetrikFacebookDistributionenraumDatenkompressionDifferenteDruckverlaufBinärcode
FokalpunktDruckverlaufInterface <Schaltung>Desintegration <Mathematik>SystemprogrammierungFacebookWeg <Topologie>MultiplikationsoperatorBesprechung/Interview
Transkript: Englisch(automatisch erzeugt)
Good morning everyone Thank you for everyone for coming and to get up this early and I'm delighted to be here. It's my second conference I was here two years ago and Yeah, I'm today the talk is Linux boot and booting fast
And my name is Paul Menzel and I work at the Max Planck Institute for molecular genetics here in Berlin By profession I'm actually a mathematician but I'm was always interested in free software and I'm currently active in the community of the of Corbut the free
Alternative to proprietary Biases or you you EFI firmware and yeah, I work at the Max Planck Institute All right for everyone who wants to edit typos in this
presentation right away you can clone this and Then It's available online Okay so Why this talk at first the warning? I'm more in to x86. Although I want to change it so a lot of things are On the concern to x86 or only apply to x86
And why this talk I was always wondering why? Systems boots so slow. Yeah, you see it in all Everyday like your phones you when you reboot them it takes forever your TV if you turn it on
even Yeah, and your system, of course, and you see the buyers screen like for a very long time and there's no focus on that and that's Kind of strange because those systems are fast. And for example if I want for my parents, for example to have like a
Multimedia system. Yeah, I want them to just turn it on and then To be readily available so that they can have a better user experience and can start right away. And that's Unfortunately in my experience not possible with proprietary firmware because the vendors and probably the customers don't put so much focus on it and
I had other bad experience like a very long time ago You all knew when you USB devices came Into the market you wanted to boot from those right and the firmware didn't support it. So you couldn't boot from those. Although you had like
USB connector and it was just the firmware issue and had nothing to do with the hardware and because the vendor didn't think You deserve it You couldn't get it at least not there's a lot of time so it's a good idea to have free software in the firmware also and
The second thing for example Currently I have an AMD Ryzen system and The driver in there doesn't support MST displays multi-stream transport displays which have two panels and So when they tell you yeah go into the firmware menu, for example You don't see anything right? So and I cannot do anything about it besides complaining and the vendor
Well probably already moved to the next product Yeah, also to be more close to the hardware right x86 the promise is more or less for the systems in contrast to arm for example where the device tree situation or
Implementation is going to fix us x86 gives you a common interface. I'd say so You that's why you can boot more or less all x86 kernels on any device right in contrast to arm systems, for example And that's also interesting to actually see that's the x86
model is more or less emulated by all current devices, although they more or less move to To assist them on a ships, right? And there is no source South Northbridge and so on but they kind of still emulate all these old devices so it's quite interesting to actually see how the hardware is set up and
To all of you who have seen like Ron Minick, for example, who who is very active in this community and all the other guys They're all very smart and it's really cool to meet them. Although that's probably true for all
for a lot of free software projects Alright, let's start with Linux boot So a Main Model is we do not trust firmware and we actually do not like it right to update it
You have to have this flash ROM ship Updating as a pain most of the time So it would be great to have actually all of these things in the Linux kernel And if there is a problem you can actually just reboot right and update it You don't have to flash anything you reboot and then the problem is fixed
Um firmware is everywhere, right All devices are more or less now Little computers right even in the CPU there are components which run Which run separately which have like small control processors or parts in them and
For example, it's a management engine. Yeah on Intel systems You have like a separate device which runs its own OS and it was in the news quite a lot in hard drives as firmware in monitors as from where you can update or Have to update you to fix bugs, right?
So it's unfortunately everywhere and most of the time although probably everyone here uses Linux The system is actually not free and the problem with this is that firmware has high privileges For example you EFI Because it boots first, right? It can set up all registers and do a lot of things to your system and
And Mock to the operating systems that certain things are What it expects but in the background, for example locks your key events or something like this and the operating system And in the Windows world if you have like an anti-virus program or malware checker
It's it's totally Obfuscated it doesn't know that this these things happening and one of those things is for example system management mode it's like a way that the firmware can set up handlers for certain traps and then the operating does something but the firmware decides, okay
We got the CPU instructions And we know this is a CPU box so we have we cannot run it and have to rewrite it so the system goes into the system management mode and the operating system doesn't know about it and
That's not only a problem security vise and there were a lot of vulnerabilities in this regards It's also a problem for high computing systems, and that's the reasons Siemens for example in their Devices And their CNC devices which have like 32 axis or 31
They use core boot and because they want to disable the system management mode right away because even two milliseconds delay what Make their product or the the product they work on would make it bad because then the axis
And they cut stuff and they would destroy each other All right, yeah, I already said it's slow. It's often buggy. It's a pain to update. It's often proprietary and Even if it's free software It's unfamiliar code base if you put Linux in the firmware and do a lot of stuff in the Linux kernel
That's the code most of us are familiar with or not familiar with but there There's a big community who is familiar visit who works on it so in this Regard I think it's good to
To To share this code base right and to use it and for administrators who are familiar with Linux it would be great if also in the firmware there would be Linux because they could use all the tools and That's the next thing right?
Do you want to boot from pixie for example over wireless? Is it possible with UEFI probably not because there's no driver in there or you don't have like the command-line tools, whatever So if you actually had control over the firmware you could boot over Wi-Fi With pixie or do your own boot protocol
Yeah, and as I said, but this also applies to Linux boot firmware is normally Pain to update because those flashes are small. So you want to have the firm a small firm image Okay. Yeah that Linux do it It's a solution for the problems. I mentioned it's a familiar code base. That's also big reason at Facebook
I heard why they want to move to a Linux boot and Google because they have a lot of engineers who are familiar with Linux developers who are familiar with Linux, so They can improve and work faster on implementing stuff and improve stuff
It's well tested Let's see if I Sailed there's a cool Metric for this and there are a lot of developers for example in in
EDK which is the an implementation of you you if I and which a lot of vendors use for making you if I firmware GitHub shows 100 I show get up because they do these statistics. So you see
163 contributors, right? So If you do it with Linux Then There's an infinity sign. Yes, so the
Community is much much bigger. They can work on more stuff. There are more eyes I mean, it's it's not a hundred percent proof, right but the gut feeling says it's it's good to have more developers and Because you get more features and you have more eyes who have spot box or can review code
and That's the next thing for example with you if I You more or less have an operating system in your firmware, right? If you look at it It hasn't has an IP stack for example for network It has all those drivers and so on and more or less they we have to re-implement everything so why not just use Linux
Do we have do you have support for Braille devices in your firmware, right? for to have people So people can use it with disabilities or their tools. They want those Braille keyboards Probably not Wi-Fi is not there you would get it with Linux and if there's enough space
so now most of you say well, but I want to boot my operating system and There is a message for this. That's a kxec system call more or less or the kxec program and you can Boot an other Linux kernel for example with kxec and I also think FreeBSD
I'm not totally sure with if it's possible with Windows. I don't think so, but It surely could be implemented yeah, in the in the drum if as you could put all your tools you are familiar with and Yeah, you just fix issues
If the firmware is small and most of the stuff is in the Linux kernel on your hard drive for example Or which you load over the network and you just fix issues there and just reboot Okay, yeah So the implementation max makes the firmware as small as possible that also improves boot time and the attack vector
Move as much as possible into the Linux kernel for easier maintenance and administration And this is called the boot kernel in the Linux boot Ecosystem they kind of mimic the names of you the UEFI spec there and
You use Linux as bootloader with kxec in the user space That was actually already reality in 2001 and Ron Minick who started Linux BIOS Had a lot of problems with the cluster for example
Once there was a BIOS buck for example, which When you rebooted the system, and of course, it's a cluster. There is no No keyboard attached. It told you press f1 to continue right and for a lot of notes. That's
And there was no keyboard attached So somebody had to go to all the clusters and connect the keyboard and press f1 So it could boot and they could fix the BIOS This is actually a link so for everyone who is interested there were several papers about Linux BIOS and it's so interesting that
18 years ago or 17 years ago all these problems which are still present today were actually Present back then and it has more or less. Nothing has changed about it. Yeah, and Yeah, there are some clusters here which used Linux BIOS
And Yeah, so these are links when you look at the presentation you can click on those okay, so maybe for this More or less there was no real interest and probably it was then also a heart without vendor support to actually
support new devices, so The Linux networks for example who supported Linux biospace clusters say more or less went out of business and the big manufacturers. They
didn't have any interest and so They had the new hardware and everyone moved there. For example, and Intel and AMD they also Didn't publish a documentation anymore, right? So actually the hardware you own without schematics and without the data manual you cannot do
It's hard to to write your own firmware Okay, so what's the present so Another problem was back then that Linux didn't support the PC couldn't enumerate PCI Subsystems well enough so and the flash chips got too small. It was only like 256 kilobytes
so and the Linux kernel got bigger and bigger so Linux BIOS wasn't a solution anymore and the solution was to move the Linux kernel out of it Just have a small firmware and the so-called payload, which could be grub or file loads a file loader And this would only have small drivers and load the Linux kernel from disk over them
over the network So and now we come to the Linux boot project again. The present is thanks There's one advantage of UEFI because we now have an operate a big operating system in our firmware The The size got bigger and bigger
Yeah, so we actually can now put the Linux kernel into the flash ROM image on the flash ROM ship again Common sizes are 60 megabytes, for example Sometimes it could even put the distribution kernel in it
one first has to say that IBM also Saw this and since power 8 they use something called petit boot Which is more or less also like Linux boot and it's I believe on build root They built it in a ROMFS and also puts a kernel into the flash ROM ship and which is
executed quite quite early and so they actually do this already since power 8 which is I think five or six years old So IBM moved there, which is good to know
And Also a lot of more things for Linux boot will be talked about by Chris Koch tomorrow at 630 He actually works at Google on this stuff directly so he will also talk a little bit more on the user space which is go based Europe, for example and
Also focus a little bit more on the Linux boot UEFI side So what is Linux boot so we have an image with Linux as a boot kernel and then in it ROMFS or in it RD user space environment which
Works as a bootloader Yeah, we on x86. It's now possible again to use it due to the increased flash ROM ship sizes and the idea is To also To to Okay, sorry, let's back up that the biggest problem on x86
For example to support a new platform is to write the chipset code and there the biggest problem is the RAM initialization for example all the undocumented register rights, which We don't have access to the documentation so In the UEFI case, for example, there is a so-called taxi phase
I'm sorry the PEI phase and More or less this means after this phase the ROM is initialized that most drivers have run which are DXE drivers and The idea is now to strip down this UEFI image and extend Linux this way that it is
Works more or less as a new EFI driver and then the UEFI The Firmware will load Linux after the ROM is initialized So you cut down a lot of these components which are shipped with a UEFI and then put Linux in there
But it's still not totally free software, right? This would be also possible with you boot and Of course with core boot 2 there the goal is to get rid of the ROM stage which runs after ROM has initialized and
Because the Linux PCI code has improved a lot put Linux in there, too so these are the interfaces Linux boot tries to build upon or to use and On the UEFI case, I guess Chris will talk more about it tomorrow
Okay There are several projects who More or less our frameworks or make it easy for you to have a user space to So that you can boot actually other systems and that's heads which is found which was started by tremel Hudson, he also
Was Ron Minick started the Linux boot stuff, which was named nerf non extensible firmware In contrast to Extensible firmware because we want to have a small by Ron Minick and tremel, which is now called Linux boot
So heads more or less uses of some kind of bash scripts around KX like and I try to show demo in a few seconds Uroot it's go based the idea is to because goes so fast to just put the go binary in there and all the sources and to
If you execute a program, it's compiled in in just in time and go so fast to compile stuff The the advantages are if you like a go Expert that you Then also can extend these scripts very easily and it's good to have these sources, right?
And if there's enough room why not put the sources in there? So that's what Google I think focuses on a lot As I already said you could actually also use a petite boot stuff from IBM and Of course, yeah use build route use open embedded
They have a lot of experience to make small images for their embedded devices. So why not leverages leverage their Frameworks to also make an inner drama fest for Linux boot Okay demo time We tried it a little bit The graphics might not be so good
So we have a seven year old ace rock is 350 and one system here it's It's not a very powerful system There's a socketed flash right here
Socket is good for development because you can just unplug it and if you put a pushpin on here glue it on it's You can remove it quite easily So we have this and Yeah, there's an old SSD H a HCI device connected so I just
Try to connect this So the problem is because we want to it's still fast We probably will have problems that you don't see anything which is more or less the goal, right but And that's the disadvantage of core boot for example to present it as at like fairs or
Conferences right because actually your goal is that nothing can be seen. So Yeah, let's try it. I Started no, okay
And now core boot runs the ROM stage Dude, and Daniel do we already see it on it? Okay Okay, so yeah there it will come
so heads is on here Oh and And that's better so let's now the heads user space, right If you want it more fast you can of course already boot the thing you want to right but now it gives you a boot menu because you
That's used by default and is better for all users right which use it for the first time so What I wanted to show you I mean, let's try it two times so the default boot now there are scripts which look on the hard drive and pass the group configuration file and
to get the parameters for K exec and Now it Did K exec and yeah, we all come to booting fast already This will be shown later it's that's just now the operating system, right so
Let's see because of the time I maybe Show it right now Yep, um, okay, so So
So if you cannot see it so the boot kernel actually it run in 900 860 milliseconds, right we come to this later and the system D This is a system deep
Limit where it says all services have started finished after one point three eight seconds so the total time is two point two seconds after I pressed Y in the heads demo and Because this is core boot and we have we we can capture timestamps and
Let's see if I can show you those Yeah That's a problem on this system I I don't know how It's a exterminate. I'm sorry. And if I wanted to show The timestamps I oh, that's a I just reboot and show you the timestamps in the in our user space
Because we have the tools in there one second yeah, so
That the problem is even I have to be honest even if the if you had a fast monitor Connected the X server actually takes some time. So the system D Timestamped you saw there is actually not It's actually not
Valid for the user, right? It's more or less five seconds Okay, so let's go into the recovery mode So we now have our shell here, right? It's it's now an inner drama if I could disconnect the hard drive and this would still work and Yeah, we have LS and I hope we have CP ma'am, yeah CP ma'am is a core boot memory
It's a small part which core boot reserves from memory and puts console messages in there or timestamps for example Okay demo didn't work so it would
Would be around one second for this or 1.3 seconds But console messages can be seen Yeah, so that's a core boot messages we see Yeah Nothing for this talk now. Okay, that was the Linux boot demo. It's worked. I'm
and Yeah, I probably won't show
This again because of time reasons, but you got the idea, right? I counted the seconds and it was more or less like five six seconds, but it was no genome genome also to be To to be honest With genome it would probably have taken a little bit more time. Oh
nice Okay now to booting fast. So that was the You guys know that was a good start the demo for booting fast, so it's possible right and it's strange the system is seven years old and
the systems got faster and faster and My laptop it still boots slower than this device. So why don't customers want this? For booting fast We have to of course first optimize the firmware because that's today the problem
I mean Leonard is here and all the system D folks it improved a lot right the boot time for us, but you actually It actually doesn't really matter because your firmware is still too slow right on the current MSI system I have it takes 11 seconds here takes at least six seconds. So
even if you could boot your Operating system in one second. It would still be a bad experience In my opinion suspend to ROM is is bad and it was actually just the workaround for actually this problem that
The boot was so slow, right if you actually could reboot your system in two seconds or so and put everything And suspend to disk would work, right? People would probably not need suspend to ROM even those who want to have their sessions saved so and With suspend to ROM came a lot of problems. I mean, I believe every one of us had problems with suspend to ROM on
That that's well not ten years ago. It worked always right on out of the box. Okay Yeah, but before hmm
Yeah, but when you use Nvidia Okay, I think he said was Nvidia devices you you had problems yeah Yeah, and that's also it consumes
Energy, right? So I mean for for TV devices multimedia devices it's There were studies if there would be a Power off switch on all devices you could save like to you you could shut down to power plants, right? so
Yeah, so my opinion suspend to ROM is bad and it's just a workaround for a slow boot time and Yeah So but customers don't request it I guess more focuses on the fastest hardware and not on fast boot time or free firmware
Chromebooks actually put focus on it because that's a use model and They actually have boot time requirements that they want their Chrome OS to have started from pushing the power button to The browser in less than 10 seconds, and that's why they also use a core boot
Due to the boot time, but also to have verified boot. They have their own security requirements And Even on servers a fast boot time would be awesome There are a lot of firmware who? initialize the RAM modules zero in serial that means
although you can do it in parallel and That means all of you who have like a Dell server, whatever it takes like six minutes to reboot it What if you could do it to reboot it in less than a minute? That's less than TCP timeout for example the standard or 60 seconds, right so you could
Corner updates would be much easier and Also one thing again to suspend to run it Increase the complexity a lot all these problems with suspend to run all these vendors They now have to also test suspend to run So why not put all these effort which goes into fixing and testing suspend to run to just improve the firmware and make booting fast
Okay They Were now let's go back to the operating system there were efforts to boot it in like less than five seconds This was ten years ago by Arjen van de Ven and Coco out from Intel, and there's a
LV IW Linux weekly news article the link is in the On the site there is a link here, and they used an EPC and After the firmware they measured it and they had to fix a X org and so on and they more or less managed to have an
Auto load lock in in less than five seconds or in five seconds, but they had to do a lot of Work to get there, but it's still not the standard today Okay, yeah now due to time reasons Jump over the demo, but as I said it's it's five to six seconds on the system was more or less
without patching anything besides the Linux kernel So what to do to get a file system in the firmware? Yeah, you use core boot or Linux boot for example, and then you get one second of the firmware So you have four seconds for the rest?
This device is actually quite slow with one second if using in this case an Intel based system Which is not totally free because it uses the firmware Support package from Intel so there's a binary blob to initialize the memory you actually get a boot time from 380 milliseconds, which is half of the
the AMD system I have here because AMD open source their platform initialization code and it was smallest kind of Fastly glued into core boot So there are certain things which could be optimized and which is the reason why it takes one second
Also, the option ROM on AMD has to be run which is a downside compared to Intel because also graphics cards have firmware and AMD devices have atom BIOS and It requires the option ROM to be there which is it was until it's possible to to initialize hardware more or less natively
So that's a difference Okay, the operating system. We should need to optimize the Linux kernel the in a drum of s and the user space so The distribution kernel is too big first, which takes too long to load and secondly
There are too much there's too much stuff enabled which you Probably don't need on your laptop for example or on your desktop system and normally you don't switch drives and put it And want to boot different systems, right? 90% or 95% of the time you have a fixed system with a fixed configuration
And so you actually don't need this flexibility which a default kernel gives you So that's why you should if you want to have a fastest fast system build it yourself There's a Linux command in it called debug which shows you the
initialization time of all the modules which Also system the boot chart Shows you to to see how long certain modules took with K probes certain devices are also now Profiled and instrumented and
From Intel there is a PM minus graph project which has a script called boot graph It's a Python script which traces of certain modules with with With F trace and so you actually get how long each function
Takes and it's interesting how many M sleeps are in the Linux kernel, which are over 100 milliseconds. Yeah So but unfortunately, I think there is not much focus on this because during review or so I would always request if there's a sleep over five milliseconds
You actually should document why in the data sheet this is needed on the specification Especially in graphics drivers, this is very bad Let's come to in a drama face if you have an SSD you can Get sorry. It's off the chart. It's 53 milliseconds, which
Was lz4 to decompress the inner drama fess and put it in and blowed it With the standard gzip it was on this laptop system over 300 milliseconds Yeah, so all of you you have an SSD adapt
on Debian update printed update in a drama fess to In Debian unstable, it's supported by default and use lz4 as compression Make it small and put only the necessary modules in this but if you have a static system the Flexibility of in the drama fess is actually not needed. So even to
Shave off these 53 milliseconds, which is quite a lot Which is like 1% if you have like 5 seconds more 300 now Well, which is still quite a lot 50 milliseconds Build your kernel yourself put all the more dip modules in there which you need and then you don't need an inner rama fess
Okay and user space Probably all of you have heard from system D analyze and it has several commands like system D analyze critical chain or blame which shows you which services take a long time There are some For whatever reason these numbers are not always true
I was told so there is a system D boot shot which which you put in the on the as your in it Binary on the Linux command line and which Then collects all this data differently at least a little bit differently and gives you a nice chart
I will show it to you. The time is almost over, but I will show you this graph in a second Yeah, then yeah, there are tools as trace perf to to to profile what took so long and Of course the services you don't need you should deactivate it on a standard system in my opinion in my experience
For example modem manager is used but I never use modem manager because I only use wireless LAN or on a desktop system I have a network cable. So I never need these UMTS devices for example to use as a modem Yeah
You should reorder some services those dependencies if I have a local system and don't need my users don't I? Don't need NFS or network users, right? The dependencies that system D lock in D is all see started after the network is up It's actually slowing this down
so one should look into this and find solution for to To support systems which don't need it. So it's too general in my opinion system D Journal has a flushing Which takes long in the beginning and
Currently, I'm investigating how to make you deaf faster Yeah, a CPI is reality. So there's also cool tool called sleep graph to debug the corner in this regard and What to do I just say it really quickly Actually put pressures on vendors complain support vendors who care about free software in the free firmware who?
care about fast boot times Power is now also available as workstations from Talos There are resellers for older Corbut devices
There on newer systems you have part have parts which are binary reblob. So if you Are okay and want to have recent systems and there's purism who actually sells laptops with with Corbut on it for service Facebook Okay. Yeah
Yeah, chromebooks. They'll supports updates from user space and Yeah how to improve the situation I'm looking forward to talk to all of you in the next on Sunday To hopefully find solution that all users can profit from it. So thanks for your attention Sorry for taking a little bit too long. Oh, no, I started five minutes late
No Anyway, this thanks a lot Paul for this interesting talk So I'm afraid we don't have time for questions anymore But of course we are here for two days so you can of course ask Paul the questions in the hallway track Yeah, we have sorry