7 ms·
It's far from clear how grub package updates work on Ubuntu
- userbinator 2y agoIt's far from clear how grub works. IMHO it contains enough functionality (filesystem access, user interface, program execution, etc.) that it could already be considered an OS itself.
- sambazi 2y agoefi joined the chat
- magicalhippo 2y ago> it contains enough functionality [...] that it could already be considered an OS itself. That's what ZFSBootMenu[1] is, an OS to start the OS. And as sibling points out, if you're using EFI you got an OS booting your OS booting your OS... [1]: https://www.zfsbootmenu.org/ https://www.zfsbootmenu.org/
- E39M5S62 2y agoI originally wrote ZFSBootMenu as a reaction to how awful Grub is. I was hacking on the Grub scripts and hitting all sorts of limitations that were just awful to work around (or not possible at all). I used Grub to chain load early versions of ZBM before I had the whole UEFI application build process worked out.
- raggi 2y agoGrubs install process is a complete disaster. I went to use it to boot Fuchsia on bios systems at one point, when Zircon still supported multiboot chaining. The "install" scripts and so on are all horribly broken, and extremely badly behaved in terms of grabbing arbitrary stuff from the environment that has nothing to do with your desired target system. Using them for anything other than modifying the current host system is extremely sketchy at best. I ended up re-implementing the whole process in a pile of bash (it should have been in something else, but I started in bash, and finished there). The slicing up of the bios segment that it does is also unnecessarily fiddly considering how it's all constructed, it would have been far easier to keep those segments in separate files and then you could just write one buffer after another in any language/tool environment you want. The whole thing seems like an accident of history that no one wants to fix, which would be approximately congruent with all of the tooling in that area of the boot path, partition tools and so on.
- jorvi 2y ago> The whole thing seems like an accident of history that no one wants to fix I can’t really speak to Fuchsia systems, but a lot (most?) Linux desktop distros use stub or systemd-boot bootloading these days. And if you want to get fancy, there’s rEFInd.
- DaSHacka 2y ago> I can’t really speak to Fuchsia systems, but a lot (most?) Linux desktop distros use stub or systemd-boot bootloading these days. Which ones are you thinking of? Most 'desktop' distros I've used recently still default to Grub (Debian, Fedora, Linux Mint, Ubuntu) though I'd certainly be glad if change is on the horizon.
- JustSkyfall 2y agoPop!OS has systemd-boot on systems with UEFI
- spookie 2y agoArch install script defaults to systemd
- 01HNNWZ0MV43FF 2y agoI didn't know systemd had its own bootloader. I thought everything was still GRUB, I think all my systems are GRUB. Course I'm a few years out of date
- WWLink 2y agoActually, with refind being a thing, I'm not sure why grub is still a thing. Also why MS' bootmgr stuff is still a flaming pile of junk. Edit: And why MS has never given us a way to dictate where it installs its junk and/or to not install its junk!!!!!!
- spockz 2y agoThis is the reason why I disable all non windows drives in my machine before letting any Microsoft installer do its things.
- rini17 2y agoHad a reckoning too with unholy heap of shell scripts that is grub-probe and dracut. At least they don't use M4 preprocessing XD
- ur-whale 2y ago> It's far from clear how grub package updates work on Ubuntu It's far from clear how grub works, uprade or otherwise, period. Much less how to configure it or install it. Sendmail.cf or jq level configuration language in terms of obscurity. Cryptic error messages the severity of which is impossible to infer (actual impact being from no impact whatsoever to my computer won't boot anymore). Not my favorite piece of Linux software by a very large margin.
- chungy 2y agoIt's pretty well documented with a pretty simple configuration language (if you already use a bourne shell (and you probably do), you already know how GRUB's syntax works). I guess reading the manual isn't popular these days, but GRUB has a complete one that explains it all.
- userbinator 2y agoThe point is, GRUB is unnecessary complexity for probably 99.9% of all systems that boot Linux and maybe one other OS.
- c0l0 2y ago... can you really fault software that has "Grand" and "Unified" right there in its name for trying to be just that? The number of systems supported by GRUB is really impressive, the number of special-sauce features supported (filesystems, RAID levels, snapshots, etc.) downright staggering. And if you don't like it, there's plenty of alternative, simpler options with a narrowere focus. I use systemd-boot on most non-Debian (which supports A LOT of other platforms, mind you) x86 EFI boxen of mine. GRUB might be an unnecessary complexity for a number of use cases, but it's a solution that strives towards being universal (which is also a goal of Debian). I think it comes rather close, and I am happy it exists. Learning you way around it for an hour or two will yield payoffs down the road.
- Brian_K_White 2y ago
- andrewstuart 2y agoOne of the areas of Linux that I slunk away from defeated is understanding grub and the boot process in general for Linux. Either I am stopid or it is stopidly complex or both.
- Vecr 2y agoNah, I never understood it. You'd probably be better off writing your own from scratch that does exactly what you want it to do. I've written both MBR and EFI bootloaders, but for MBR it's probably better to copy at least some of the very early boot stuff from somewhere else.
- nicholasbraker 2y agoThis.. For a moderate somewhat prosumerish user like me, it's these kind of stuff which is why can't have nice things. It used to be the ./configure, make, make install hell which modern package managers and distributions seem to have fixed for most software, now it's this.
- gtirloni 2y agoThe lower you go in the stack, the uglier it gets.
- rcxdude 2y agoGrub is just unnecessarily complicated. Simpler options exist (even ones with the same level of flexibility, though I am most familiar with embedded options there: Something like barebox shows an alternative approach that could be applied to desktop: basically just make a shell environment in your bootloader to script your more complex requirements). But 90% of users nowadays can just use systemd-boot.
- a3f 2y agobarebox can be compiled as EFI payload and used on Desktop systems. The main impediment is packaging it for the OS and scripting the hooks that would write e.g. bootloader spec files on kernel updates.
- pjmlp 2y agoI miss LILO, life was song much simpler, to this day I barely understand grub beyond basic kernel parameters.
- sedatk 2y agoLI
- Zardoz84 2y agoI miss LOADLIN
- microtonal 2y agoLOADLIN with UMSDOS certainly brings back memories.
- lathiat 2y agoLI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI LI
- lathiat 2y ago-2 points, yikes.. not sure if if that's 3 angry people that had to deal with LILO not working or 3 people thinking I was just spamming who never had the pleasure of dealing with LILO.
- the_oh_of_ples 2y agoThe Boxen.
- derekp7 2y agoThe isolinux package has boot methods that work on HDs, and are set up very similar to LILO. Not sure why it never took off with distros.
- endgame 2y agoI have fond memories of using SYSLINUX + MEMDISK to make DOS bootdisks which loaded themselves into RAM. Mostly to play games in the library.
- lionkor 2y agoI had great luck with Limene! :)
- MaximilianEmel 2y agoI assume this person meant to say `Limine'. It's what I use for dualbooting Windows and Linux. It's really easy to Install, Use & Understand. https://limine-bootloader.org/ https://limine-bootloader.org/
- usr1106 2y agoSo assuming your machine supports UEFI, what are the common use cases that systemd-boot would not support, requiring you to use grub? Encrypted boot partition I'd guess? I tried that once with grub, but it was unbearingly slow, because grub did not / could not use modern x86 extensions to do the decryption. So not a common use case either, maybe a desirable one.
- serf 2y ago> So not a common use case either, maybe a desirable one. it's a literal checkbox install option on Ubuntu at least a few versions back (i'm not up to date), so I wouldn't call it uncommon.
- usr1106 2y agoFor root partition sure. But for boot? Normally when you choose an encrypted root partition you get an extra boot partition without encryption. Unless that has changed rather recently.
- brnt 2y agoDepends on the distro. openSuse encrypts all, and has (or had?) slow boot as consequence. I think Tumbleweed just switched away from Grub. The theory is that messing with boot can compromise your system and leave you vupnarable despite encryption.
- k8svet 2y agoI mean, something still accepts your password that's unencrypted. The solution for this is, yay I get to say it, Secureboot.
- deleted 2y ago[deleted]
- wolletd 2y agoI shifted to using systemd-boot as default years ago and don't look back. Granted, prior to Debian Bookworm I had to roll my own initramfs- and kernel-hooks, but there were blog posts and I didn't need to develop them. I even tried directly booting into Linux EFISTUB, but thats uselessly annoying compared to a proper bootloader.
- im3w1l 2y agoIirc when I upgraded from ubuntu 22 to 23 grub stopped being able to boot my windows drive. I played around with it for like an hour and it just wouldnt work, so now whenever I want to boot windows I have to use the efi boot menu instead which is a good enough solution that I wont spend more time on the problem.
- deleted 2y ago[deleted]
- qwertox 2y agoSpeaking of the devil: I just upgraded an Ubuntu install which I hadn't touched for around a month, and after rebooting I'm unable to boot Ubuntu. It's very odd. Instead of the GRUB menu, only a countdown number shows up on the top-left (5,4,3,..) with an underscore behind it. "5 _". All the rest is black. When the countdown finishes, the system boots into the (UEFI) BIOS. If I use the BIOS' boot disk selector, then it also happens both when I directly select the Ubuntu installation as well as when I select the GRUB bootloader. I hope I'll enjoy the ride.
- hh3h33hhh3 2y agoLinux feels like a jumbled mess, akin to a box of LEGO where none of the pieces fit together. With countless package managers, desktop environments, and distros, etc. it's a chaotic maze of choices. Yet, despite the abundance, usability remains a distant dream. It's frustratingly disappointing, to say the least.
- 01HNNWZ0MV43FF 2y agoIt's about the only game in town though. BSD isn't popular enough and Windows wants to be a cable TV channel
- tuna74 2y agoLinux is an OS kernel running everything from toasters to the largest HPC clusters. The user space will differ depending on what you want to do.