Linux Internals: UEFI Boot Stages using Debian 11
HTML-код
- Опубликовано: 21 авг 2024
- Going to use Debian 11 as the example distro to explain how UEFI boot stages work to bring your system online after pressing the power button, as well as a few tools to help you shorten that time.
Support me on Patreon: / djware
Follow me:
Twitter @djware55
Facebook: / don.ware.7758
Discord: / discord
Gitlab: gitlab.com/djw...
"Brightly Fancy" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons...
"Militaire Electronic" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons...
Werq by Kevin MacLeod
Link: incompetech.fi...
License: filmmusic.io/s...
Industrial Cinematic by Kevin MacLeod
Link: incompetech.fi...
License: filmmusic.io/s...
Music Used in this video
"NonStop" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
I found your channel about a month ago, DJ, and I appreciate you more than I can adequately convey in words. A lot of content on these sorts of topics are either deeply technical and specific tutorial style slideshows or else over-simplified and hand-wavey "science communicator" videos designed for interested people who will never use the info. You do a great job of bridging that divide and delivering these tightly-focused presentations that don't dumb things down but also don't get bogged down in details.
I gained a lot of insight from this explanation. Have more tolerance for UEFI now. Thanks.
The best talk on the boot process I've heard for years. I also laughed at the reference to Microsoft's file partitioning as designed by a committee. That is how a camel came about - the committee was trying to design a type of horse!
Thank you Tony and hahahaha love the camel joke
Awesome content - thank you very much! I always want to learn more and dive deeper. There are not many people that really know how these things work. Educators, when you question them about these thing just explain it as a magical black box, and they don't like that that explanation is not enough for those of us who have a innate need to know..
I finally cleared up my confusion with UEFI and GPT by reading the documentation written by Rod Smith, the maintainer of refind and also (I believe) gdisk. His docs are a bit old now but still relevant and well written - he's a technical writer. I also read the Wikipedia pages for UEFI and GPT. After studying these docs, I finally abandoned the legacy boot (often called CSM - Compatibility Support Mode) + MBR and use UEFI + GPT exclusively. BTW, I thought ESP stood for EFI System Partition. The standard says that it must be formatted with a fat32 filesystem, which I don't recall you saying.
Thanks. As always, this was most insightful.
Great video! you gave so much information to look into
Thank you sir. I just learnt about systemd-analyze existence because of you :) now I have my hands scratching
Quite a good overview, thank you for this DJ.
this helped me so much. thank you
very enlightening, thanks so much!
Still actual 99% , I believe . Enjoyed your talk !
20:12 - not a big deal if you retain its GUID or disable WinRE, move/delete/create partition and enable WinRE again (REAgentC command). In fact you don't even need a separate WinRE partition because it can sit on the same volume with \Windows directory. 899 MiB partition you have is located just AFTER "Windows" basic data partition on purpose - because winre.wim image is larger in newer editions so for example (real life situation) - you have Windows8.1 (with 450 MiB WinRE part. at the beginning of the disk) and upgraded in place to W10/11 - now new winre.wim can't fit into this WinRE because partition is too small. So you end up with two WinRE partitions (first useless and second working). Another important thing with this behaviour - Windows can easily shrink or extend NTFS volume from its end in on-line mode.
Hi Myszka I love it when people say a computer can't do that. My advice has always been don't think of computers in terms of rules, think of them as extensions of the mind. You can do anything with them just imagine it. That is how we got where we are today, rules only stifle.
Great video. Loved it
Thanks
Very interesting topic.👍🏻
Do you have any experience with setting up secure boot on a linux installation yourself and if so, do you think it is worth the hassle for a personal/home installation?
Well not until the WIndows 11 install, that was my first one on a secure boot with Debian and Windows 11. Yeah I know I am a dinosaur :)
Thanks DJ
I don't see how anyone can tolerate windows. Officially it must be on for hours to update correctly and it seems, too frequently when I wish to do something urgent, it needs 15 minutes to update. But for security reasons I do not leave my network on when not in use. DJ combines technical expertise with historical scholarship. I could listen to him for hours (while win is updating LOL!). Will be shutting down remaining windows PC's forever soon.
gdisk -l /dev/sdx will provide the same info as fdisk -l, but only for the one device at a time.
I have had a few distros come with a direct kernel-stub boot option, where UEFI directly loads part of the kernel skipping the boot loader entirely.
It is a bit faster, but because I don't frequently reboot I still prefer the bootloader method for the option of specific kernel versions and modifying the boot parameters. It also seemed to have fewer issues with dualbooting debian and windows7, compared to using the UEFI menu to select the operating system; this was 8+ years ago and I've had no compelling reason to do a fresh bare metal setup since then. (Especially as I would need to buy win11 for my once per year need of Windows compatible software.)
It's possible to have both stub and bootloader methods as options in the UEFI boot-options menu.( f2 on my computer) Somewhat similar to a grub menu with multiple operating systems. (Significant overlap and redundancy with GRUB and UEFI)
According to the disclaimer, I'm eager to see an update in a month. Would you also cover other distros as well?
I am reaching userspace in 1min 3.664s and graphical.target after after 54.042s. I don't know if it takes so long because I have the non-free debian (bullseye) version or it is a 10 years old beaten down low spec office computer.
Normal with "modern" GUI distro installed on spinning rust...
Many motherboards of LGA1155 (Sandy Bridge and Ivy Bridge processors) do not support UEFI bios. Installing modern versions on Linux on them is becoming a pain, because Linux is supposedly to have better supports on older devices.
whats the problem in using BIOS installations?
👍👍
Swap partition and no side alignment?
Is there an update?
I don't get why people get so obsessed with boot time.. I start my pc maybe 3 times a week the rest it's in suspend to ram
Interesting video because I just had a problem related to UEFI on Debian 11 installs. In particular, I decided to replace one of my Fedora 35 installations with Debian 11 (to hedge my bets, so to speak). I used the graphical installer with the non-free net install iso. I decided to make it all fresh, and the disk partitioning step set the default UEFI partition to size 512 with boot flag set. After installation my boot attempts failed with a "can't find bootable media" message. I started a live Linux Mint session from usb and ran their boot repair program. It gave an error message that the partition size did not match the block size of 2048 but said a repair was made successfully. After this Debian booted just fine. Should I have set the UEFI partition to a size of 2048 during installation, or is this an installer bug of some sort? The SSD was a brand new Western Digital.
I've seen that error message before as well, this time when I installed Debian I let it do the partitioning and chose to have a separate /home, /tmp and /var and it worked fine for me. I imagine it was the alignment issue you mentioned for the partitions that got me as well.
@@CyberGizmo Thanks, DJ. I adjusted the size of the swap and /home partitions (but not / and the uefi partitions) and I wonder now if that was the "cause." Should I need to do another Debian 11 install I'll partition before I install, as I saw some other wonky stuff with the installer's partitioner. I'm sure what I experienced would likely be a deal breaker for someone new to Linux. Cheers.
i left linux... all distros are slow, with lagg or low performance, except UBUNTU, ubuntu is faster smoothy and good, my pc is i3 10th 8 gb and nvidia; i go back windows 10 :/ ... i hope OSTree will better in a future
From what you are saying you most likely didn't install proprietary Nvidia drivers on other distros whereas these come "out of the box" with Ubuntu.