Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2 vs systemd
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Sat Sep 23, 2017 3:17 am    Post subject: grub2 vs systemd Reply with quote

Rules of the fight, only 1: systemd being Borg-like is disqualified.

I've avoided Grub 2 until now, and for good reason. The installation guide seemed to push toward GPT, which isn't supported by Legacy. So now I get the joy of going through the amazing successor to Grub legacy. And I'm inspired to focus on whatever language Legacy uses (I'm guessing C).
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5276

PostPosted: Sat Sep 23, 2017 4:57 am    Post subject: Reply with quote

Why use grub at all? EFI stub booting is the future.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Sat Sep 23, 2017 5:19 am    Post subject: Reply with quote

That requires an EFI aware BIOS, doesn't it? I didn't notice anything in my BIOS to suggest it knows of EFI.

The Phenom II X4 965 wasn't hot off the press when I built it some 7 or so years ago.
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 198

PostPosted: Sat Sep 23, 2017 5:59 am    Post subject: Reply with quote

Just set "pc" as a grub platform. The installation process does not seem to have changed. I have had no problems with it.
Back to top
View user's profile Send private message
HungGarTiger
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2014
Posts: 122
Location: /nz/auckland

PostPosted: Sat Sep 23, 2017 6:00 am    Post subject: Reply with quote

I use Grub2 and only legacy boot, even on newer laptops and it's always worked like a charm.

I don't want to use EFI, it just seems irrelevant to me when MBR works perfectly.

Get off my grass!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Sat Sep 23, 2017 8:58 pm    Post subject: Reply with quote

R0b0t1 wrote:
Just set "pc" as a grub platform. The installation process does not seem to have changed. I have had no problems with it.
I didn't have any installation problems. Just the mess that is the configuration scripts intermixed with the menu. I'll check out the pc platform setting.


HungGarTiger wrote:
I use Grub2 and only legacy boot, even on newer laptops and it's always worked like a charm.

I don't want to use EFI, it just seems irrelevant to me when MBR works perfectly.

Get off my grass!
I hear ya. It was an opportunity to start with a clean slate, and my presumption was that EFI was going to become unavoidable at some point, so I decided to see how bad it was going to be. And don't get me started on the decision that necessitates the use of FAT.

My complaint with Grub 2 is entirely with configuration (mis)management.
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
zixnub
n00b
n00b


Joined: 27 Dec 2007
Posts: 67
Location: Brasschaat, Belgium

PostPosted: Sat Sep 23, 2017 9:02 pm    Post subject: Reply with quote

bunder wrote:
Why use grub at all? EFI stub booting is the future.


except it requires you to bake the boot parameters in the kernel. Admitted that's a rather minor thing imho, however I can image it being super dick if your system decides to go bananas one day...
_________________
https://github.com/Zubnix/jaccall
https://github.com/Zubnix/wayland-java-bindings
https://github.com/Zubnix/westford
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 198

PostPosted: Sun Sep 24, 2017 12:51 am    Post subject: Reply with quote

pjp wrote:
My complaint with Grub 2 is entirely with configuration (mis)management.
Code:
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

You only need to touch /etc/defaults/grub if you want to change the default parameters, main one being kernel command line. You never have to touch the GRUB configuration directly.

To me it seems like most of the people who complain about GRUB(2) have never used it. I like GRUB, it was made by the nice people associated with the Free Software Foundation. I am not very smart, sir, but they write good documentation that helps me figure out how to use their programs. I am glad they write such reliable software that helps me run my computer.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Sun Sep 24, 2017 3:25 am    Post subject: Reply with quote

R0b0t1 wrote:
You only need to touch /etc/defaults/grub if you want to change the default parameters, main one being kernel command line. You never have to touch the GRUB configuration directly.
It wraps the easy to read menu text in a mess of shell script. Nothing about that is easy to troubleshoot. While there may have been technical benefits to changing the architecture of the design away from Grub Legacy, the new solution is not an improvement for system administration. It is also now doing stuff I never requested. NOT GOOD.
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 198

PostPosted: Sun Sep 24, 2017 5:23 am    Post subject: Reply with quote

pjp wrote:
R0b0t1 wrote:
You only need to touch /etc/defaults/grub if you want to change the default parameters, main one being kernel command line. You never have to touch the GRUB configuration directly.
It wraps the easy to read menu text in a mess of shell script. Nothing about that is easy to troubleshoot. While there may have been technical benefits to changing the architecture of the design away from Grub Legacy, the new solution is not an improvement for system administration. It is also now doing stuff I never requested. NOT GOOD.
All the generated script does is load modules and specify your root partition. The only thing it does that you may not have asked it to do is use a UUID to detect your root parition. If you really want to edit it by hand it is very readable, though then you may want to avoid using grub-mkconfig. There is no reason you have to use grub-mkconfig.

The only issue you might run into is that hardware is now managed differently, so copying the video setup portion of a generated grub.cfg is a good idea. Otherwise it is likely video will not work when you load your kernel.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Sun Sep 24, 2017 5:52 am    Post subject: Reply with quote

I disagree that it is "very readable." The point is having to tip-toe around the script as compared to a plain text / configuration file.

In addition to UUIDs it also manipulates modules. I don't have any objections to grub-mkconfig.


I may just move the install to another drive and reconfigure the primary drive with Grub Legacy. I'm not gaining anything with GPT and Grub 2. But it would be a time sink to migrate.
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 198

PostPosted: Sun Sep 24, 2017 7:14 am    Post subject: Reply with quote

pjp wrote:
I disagree that it is "very readable." The point is having to tip-toe around the script as compared to a plain text / configuration file.
The point of the autogenerated script is that it is configured with the settings from /etc/defaults/grub. The script doesn't manipulate UUIDs, it records them, just like it records what your current root partition is. Modules are loaded individually so that it is not necessary to include them all by default in the main binary.

If the autogeneration is too inflexible for some reason you can simply not use it and can configure GRUB 2 almost exactly like you would configure "legacy" GRUB. That is why I don't understand the problems people are having: besides actually updating the package it's not necessary to do much of anything at all.
Back to top
View user's profile Send private message
erm67
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 184
Location: somewhere in Renziland.

PostPosted: Sun Sep 24, 2017 9:20 am    Post subject: Reply with quote

rEFInd rulez, you dinosaurs ...
_________________
True ignorance is not the absence of knowledge, but the refusal to acquire it.
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Sun Sep 24, 2017 2:18 pm    Post subject: Reply with quote

erm67 wrote:
rEFInd rulez, you dinosaurs ...
Yeah, FAT isn't ancient. :P
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
b0nafide
Apprentice
Apprentice


Joined: 17 Feb 2008
Posts: 170
Location: ~/

PostPosted: Mon Sep 25, 2017 2:55 am    Post subject: Reply with quote

I've been focusing on getting everything booting with iPXE, EFI or legacy. This is an amusing page: http://ipxe.org/appnote/etoken
Back to top
View user's profile Send private message
erm67
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 184
Location: somewhere in Renziland.

PostPosted: Mon Sep 25, 2017 7:52 am    Post subject: Reply with quote

b0nafide wrote:
I've been focusing on getting everything booting with iPXE, EFI or legacy. This is an amusing page: http://ipxe.org/appnote/etoken

Than try to focus better and insecurely boot uefi ....
Ipxe efi boot works perfectly, apart for iscsi (netboot), but that's because there is no dos interrupt to patch, and nobody has written an ipxe module for that.
Try refind you'll change your mind.
Uefi Pxe booting works fine with most boards without ipxe anyway.
_________________
True ignorance is not the absence of knowledge, but the refusal to acquire it.
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
b0nafide
Apprentice
Apprentice


Joined: 17 Feb 2008
Posts: 170
Location: ~/

PostPosted: Mon Sep 25, 2017 5:16 pm    Post subject: Reply with quote

erm67 wrote:
b0nafide wrote:
I've been focusing on getting everything booting with iPXE, EFI or legacy. This is an amusing page: http://ipxe.org/appnote/etoken

Than try to focus better and insecurely boot uefi ....
Ipxe efi boot works perfectly, apart for iscsi (netboot), but that's because there is no dos interrupt to patch, and nobody has written an ipxe module for that.
Try refind you'll change your mind.
Uefi Pxe booting works fine with most boards without ipxe anyway.


I don't have any issues with booting ipxe.efi. Also I can store my kernels and initrds on whatever filesystem I want on the server. I like iPXE. I can also boot machines without network cards with a special version of iPXE with USB NIC support. It would be especially nice if I had a signed version of iPXE.efi however, because over the course of my day I'm booting plenty of other people's computers, some of which are quite stubborn about secure boot. Some devices, like the M$ Surface, are UEFI only. Ideally I'd be able to boot everything.
Back to top
View user's profile Send private message
erm67
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 184
Location: somewhere in Renziland.

PostPosted: Mon Sep 25, 2017 9:03 pm    Post subject: Reply with quote

The ipxe guy probably wants some money to produce signed binaries. He will write the netboot modules for ipxe.efi only if someone funds him :-)
Unfortunately there are no signed drivers for my broadcom wifi card, so a signed ipxe binary is not really useful for me.
_________________
True ignorance is not the absence of knowledge, but the refusal to acquire it.
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
b0nafide
Apprentice
Apprentice


Joined: 17 Feb 2008
Posts: 170
Location: ~/

PostPosted: Tue Sep 26, 2017 12:13 am    Post subject: Reply with quote

Really the only reason I'm into ipxe is because I can't be bothered to update a large set of USB sticks from which to boot otherwise non-booting hardware. I do use rEFInd as well, for newer intel macs mostly.
Back to top
View user's profile Send private message
erm67
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 184
Location: somewhere in Renziland.

PostPosted: Tue Sep 26, 2017 9:14 am    Post subject: Reply with quote

I use ipxe only to boot win10 over iscsi since my motherboard do not ships uefi iscsi drivers. Otherwise plain pxe is just fine to boot nextstep 3.3 or solaris 8 on my sparcstation5 with openprom.
_________________
True ignorance is not the absence of knowledge, but the refusal to acquire it.
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Tue Sep 26, 2017 1:28 pm    Post subject: Reply with quote

erm67 wrote:
with openprom.
If not for Intel, maybe EFI could have been something better.
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
erm67
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 184
Location: somewhere in Renziland.

PostPosted: Tue Sep 26, 2017 8:54 pm    Post subject: Reply with quote

pjp wrote:
erm67 wrote:
with openprom.
If not for Intel, maybe EFI could have been something better.

It's not bad, but vendors do not ship full uefi environment on low cost motherboards or cripple it in other ways. The bios is signed and can't be easily modified & reflashed. So basically a side effect of the cryptographic security is that we are all stuck to whatever crippled version the vendor ships. If it was possible to install &update the uefi environment to the latest tiano core release it would be great .. or install additional drivers like those : http://efi.akeo.ie/downloads/efifs-latest/x64/
_________________
True ignorance is not the absence of knowledge, but the refusal to acquire it.
A posse ad esse non valet consequentia
Πάντα ῥεῖ
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Tue Sep 26, 2017 10:54 pm    Post subject: Reply with quote

erm67 wrote:
The bios is signed and can't be easily modified & reflashed. So basically a side effect of the cryptographic security is that we are all stuck to whatever crippled version the vendor ships.
Wow. I guess I hope I can limp my aging systems along for quite a while. Surely 2018 will be the year of ARM on the desktop or server. :)
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 102

PostPosted: Wed Sep 27, 2017 12:25 am    Post subject: Reply with quote

pjp wrote:

My complaint with Grub 2 is entirely with configuration (mis)management.


This is mostly because a lot of distributions ship the shit that grub-mkconfig automatically generates, even the GRUB devs themselves insist that this is a stopgap because it generates retarded config files that are naturally extreme verbose as they are machine-generated from heuristics. The config syntax is documented and super easy. This is my /boot/grub/grub.cfg written by hand:

Code:
timeout=2
default=0

menuentry 'desktop' {
   set root='hd0,msdos2'
   linux   /vmlinuz init=/sbin/runit-init root=/dev/sdb6 ro rootfstype=ext4 autologin=user quiet acpi_backlight=video
}

menuentry 'text' {
   set root='hd0,msdos2'
   linux   /vmlinuz init=/sbin/runit-init root=/dev/sdb6 ro rootfstype=ext4 autologin=user quiet acpi_backlight=video text
}

menuentry 'vmlinuz-4.0.6-040006-generic + /dev/sdb5 + text' {
   set root='hd0,msdos2'
   linux   /vmlinuz-4.0.6-040006-generic root=/dev/sdb5 quiet text
   initrd /initrd.img-4.0.6-040006-generic
}


I'm sure you can see exactly what it does without any further explanation; that's what normal hand-written grub configs look like instead of the stuff rolling out of grub-mkconfig. People who say you can just "edit /etc/default/grub" and use grub-mkconfig instead are full of shit. It obviously cannot handle dual booting multiple encrypted operating systems; it generates retarded menuentries (read: "GNU/Linux" the moment it detects Linux even if you boot a musl system or fucking android) and it generates a random permutation of each kernel with each root filesystem it can find unless you don't share a /boot partition as it obviously has no way of knowing what kernel is to be matched with what root filesystem.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16614

PostPosted: Wed Sep 27, 2017 12:58 am    Post subject: Reply with quote

Excellent, thank you! And to the Grub2 team, a thousand apologies. :)

I don't have any problem with that configuration. It is a shame that something isn't included in man pages (or that I wasn't able to find anything) about the manual method, or even in grub.cfg near the dire warning about hand editing.
_________________
Find them! Fix them! Fight them! Finish them! -- GEN Matthew B. Ridgway
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum