You are not logged in.

#1 2012-06-24 15:42:56

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,101

Some thoughts about grub2 and bootloaders in general.

Since grub1 is becoming depreceated, I have looked at grub2. I feel a discomfort about it. The tendancy was already present in grub1 but it is getting worse. It is in my opinion bloated and too complicated. It supports a lot of file system, booting from the network, support scripting, etc... Also the problem is that it encourages not to edit grub.cfg directly (wich makes virtually impossible to have several entry with the same kernel and same initrd but with different parameters). All of these features may be usefull but grub2 is becoming an OS by itself. If we need an OS, we have already one with all the drivers, scripting possibility, etc... and that OS is Linux. Linux has the opportunity to boot a kernel with the kexec system call. I do not know if it has the opportunity of chainloading another bootloader (but this would be welcome). I think it would be much cleaner to have a minimal bootloader that is able to load Linux and an initrd from whatever the Bios support, no more no less (the newer UEFI firmware is able to do that by itself). If more functionality is needed, boot the real OS from this Linux kernel. This solution would be more powerfull that anything grub can imagine because we would have the full power of Linux with all the drivers and it would spare the effort to dupplicate a lot of drivers in the bootloader.

As for me, I am looking at syslinux, it is better than grub in my opinion. Moreover syslinux has an important feature that is really usefull and that I have not seen in grub: the ability to determine from the boot sector the device from which it is booted *at boot time* and to use that to find the kernel. So we can make a filesystem bootable no matter on which bios it is booted and on which device you have put it. floppy, hard disk, even, a CDROM (with isolinux isohybrid format).

Last edited by olive (2012-06-24 16:47:46)

Offline

#2 2012-06-24 17:18:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,147

Re: Some thoughts about grub2 and bootloaders in general.

The main problem I had with syslinux is that it can't boot kernels on other partitions. If you only have one Linux OS, then that probably won't cause you to lose any sleep; but if you, like me, have several Linux installations, then grub{,2} are pretty much your only choices. I ended up having syslinux to boot my ssd btrfs partition, and chainloaded grub legacy to boot my other Linux OSes.

That worked fine for a while, but then I converted my btrfs partition into a RAID1 btrfs partition, which caused syslinux to balk as it doesn't support multidevice partitions. So now I'm using grub2 to boot the btrfs partition out of necessity, but keeping grub legacy for my other Linux OSes, because it's got a much more intuitive configuration process to it.

Long story short, use what you need to use.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

#3 2012-06-24 18:47:56

Roken
Member
From: UK
Registered: 2012-01-16
Posts: 653

Re: Some thoughts about grub2 and bootloaders in general.

I personally have no problem with grub2 - but then I don't use update-grub. For the last three distros I've used (one of them LFS) I've had the same /boot partition with the original grub. If I install something new (not something I'm planning on for a good while - quite happy with Arch) I amend grub.cfg manually despite the recommendation not to. This has served me well for more than 2 years.


[img=Speedtest]http://www.speedtest.net/my-result/5145583518[/img]

Nvidia GTX 670 2Gb, AMD Phenom II X4 (965BE) @ 3.6 Ghz (Overclocked) 8GB RAM
Linux user #545703

Offline

#4 2012-06-24 20:42:24

bwat47
Member
Registered: 2009-10-07
Posts: 637

Re: Some thoughts about grub2 and bootloaders in general.

I'm sticking with grub 1 for as long as I can, it works just dandy. I've never had problems with grub2 in other distros, but its already set up in those. In arch I'd have to configure it, and from what I've  seen its configuration is unnecessarily complex compared to grub 1. I might just switch to syslinux down the road, since I don't need any advanced bootloader functions.

Offline

#5 2012-06-25 03:43:53

Diaz
Member
From: Lisbon, Portugal
Registered: 2008-04-16
Posts: 361
Website

Re: Some thoughts about grub2 and bootloaders in general.

I created my grub2 config file manually and never created it with the "right way". It has worked so far and it's simple enough to understand. I looked at the script that it runs to create the file and it scared me big_smile


Owner of Asus 1215B :: User of Xfce :: Vasco Dias @blog

Offline

#6 2012-06-25 03:58:51

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,656

Re: Some thoughts about grub2 and bootloaders in general.

I guess I'm in the minority here -- I came to Arch from a distro that used grub2 and I have no problems with it. If I need to have "custom" entries (olive's example of several entries with different parameters) it's simple enough to put them in 40_custom. I don't think that if Arch moves to grub2 we'll all be configuring grub by hand -- that's the whole point of grub-install and update-grub.

Offline

#7 2012-06-25 04:09:30

bwat47
Member
Registered: 2009-10-07
Posts: 637

Re: Some thoughts about grub2 and bootloaders in general.

Diaz wrote:

I looked at the script that it runs to create the file and it scared me big_smile

Yeah, me too big_smile

Offline

#8 2012-06-25 04:31:30

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Some thoughts about grub2 and bootloaders in general.

I use Grub 1 in my desktop, but started to use Grub2 in my Laptop one year ago, mainly to get acquainted.

The laptop has Arch as the main system, but for testing purposes I normally have an extra 3 to 4 Linux distributions on disk.

All of them do an update-grub now and then, mostly by kernel updates, and I sometimes end up with funny start boot menus, or none at all.

And I ended up knowing much more about GRUB2 then GRUB1, probably the same way a 1930's car owner had to know much more about the engine of his car.

Having 4-5 distributions on disk complicates things a lot, but until now I survived.

All in all GRUB2 is a curious solution for a problem I didn't have.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#9 2012-06-25 07:17:55

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,101

Re: Some thoughts about grub2 and bootloaders in general.

As grub is becoming depreacated, I hope that archlinux will choose syslinux as the default bootloader in the future. It do what it should do and it is more in phase with the philosophy of KISS. Of course grub2 could remains available in the repositories for the people that want it.

Last edited by olive (2012-06-25 07:18:14)

Offline

#10 2012-06-25 08:11:02

Diaz
Member
From: Lisbon, Portugal
Registered: 2008-04-16
Posts: 361
Website

Re: Some thoughts about grub2 and bootloaders in general.

Strangely enough since yesterday or so that for no reason my pc was just not booting and the problem was somewhere between grub2 finishing and kernel starting up. After some iterations rebooting and trying again it would work. This thread and another one about uefi made me look again at all this bootloader problem and now I just have it working this way UEFI Bootloaders - Using UEFI Shell.

Even simpler and easier. And it workd, so no need to discover why the hell there was a problem. No more grub2 for me big_smile

Last edited by Diaz (2012-06-25 08:12:59)


Owner of Asus 1215B :: User of Xfce :: Vasco Dias @blog

Offline

#11 2012-06-25 13:13:58

ratcheer
Member
Registered: 2011-10-09
Posts: 505

Re: Some thoughts about grub2 and bootloaders in general.

I also get along fine with grub2. I currently have four distros installed on my PC. I have to manually update grub.cfg every time after running update-grub in order to add "nomodeset" to the linux line for Arch, because I run fglrx.

Other than that, my only rule is to always run update-grub from the same distro installation. If a new kernel is installed on one of the other distros, causing that distro to run update-grub, I go back to my controlling distro and run update-grub, myself. Everything stays consistent, this way.

This has worked very well for me ever since I figured out doing things this way.

Tim

Offline

#12 2012-06-25 17:04:49

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,045
Website

Re: Some thoughts about grub2 and bootloaders in general.

For me grub2  works better. On my SSD Grub 1 simply would not boot.
I believe grub2 is complicated, too, but it can do more.

ratcheer wrote:

I have to manually update grub.cfg every time after running update-grub in order to add "nomodeset" to the linux line for Arch,

Usually you can add nomodeset to /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="... nomodeset ..."
Then it will be included by update-grub, too.
Are you in a special situation where that doesn't work?

Last edited by teateawhy (2012-06-25 17:05:18)

Offline

#13 2012-06-25 17:42:05

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: Some thoughts about grub2 and bootloaders in general.

The only thing that really gives me unease these days is when someone posts a thread of the sort "Thoughts of ..." and in their post wave around ~KISS~~~ARCHWAY~ like it's some sort of competition without fully considering the fallout of their actions (for instance, Arch having no UEFI-capable bootloader as a "default" choice isn't exactly a good thing, although that's a bit lessened for single-boot systems with EFI Shell + EFISTUB in recent kernels).

It's ok, though, I'll play along - why have a default bootloader at all?  It discourages user choice in the matter especially if there is only one choice; it's clearly more User-Centric to tell the user to switch to another tty at that point in the process and manually install the bootloader (or lack thereof) of their choice!

Offline

#14 2012-06-25 17:50:20

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,656

Re: Some thoughts about grub2 and bootloaders in general.

I don't think Arch has a "default" bootloader.

this is from the Official Installation Guide:

Install Bootloader

Install Bootloader will install and help you configure the bootloader that you selected in the "Select Packages" stage.
An editor will open, allowing you to edit the appropriate bootloader configuration file which the installer has pre-populated. You should check and modify this file, if needed, to accommodate your boot setup.

/boot/syslinux/syslinux.cfg (Syslinux) After checking your bootloader configuration for correctness, you'll be asked to allow the installer to Set the Boot Flag and install the Syslinux MBR.

/boot/grub/menu.lst (Grub) After checking your bootloader configuration for correctness, you'll be prompted for a disk to install the loader to. You should install GRUB to the MBR of the installation disk.

And this is from the beginner's guide:

Because we have no secondary operating system in our example, we will need a bootloader. GRUB (GRand Unified Bootloader) will be used in the following examples. Alternatively, you may choose LILO, Syslinux or GRUB2. Please see the related wiki and documentation pages if you choose to use a bootloader other than GRUB.

If Grub is "deprecated" the only thing that might change about this is which bootloader is used in the examples. The user will still be free to choose whatever he or she likes.

This thread should probably have been title "I'm unhappy because Grub is going away and I don't really like any of the alternatives"

Last edited by 2ManyDogs (2012-06-25 17:57:23)

Offline

#15 2012-06-25 17:57:19

ratcheer
Member
Registered: 2011-10-09
Posts: 505

Re: Some thoughts about grub2 and bootloaders in general.

teateawhy wrote:
ratcheer wrote:

I have to manually update grub.cfg every time after running update-grub in order to add "nomodeset" to the linux line for Arch,

Usually you can add nomodeset to /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="... nomodeset ..."
Then it will be included by update-grub, too.
Are you in a special situation where that doesn't work?

Yes, I am. As I said, I run four distros on my PC. Arch is the only one that requires nomodeset. I don't understand why, but that is the case.

So, if I modify the grub2 configuration to use nomodeset, it puts it on all my instances and I would have to update three lines in grub.cfg to remove it. The way I am doing it, I only have to edit the one line for Arch Linux, to add it.

Tim

Offline

#16 2012-06-25 18:00:01

2ManyDogs
Member
Registered: 2012-01-15
Posts: 1,656

Re: Some thoughts about grub2 and bootloaders in general.

ratcheer wrote:

So, if I modify the grub2 configuration to use nomodeset, it puts it on all my instances and I would have to update three lines in grub.cfg to remove it. The way I am doing it, I only have to edit the one line for Arch Linux, to add it.

You could put all the entries except the distro that controls grub in 40_custom, then disable 30_os-prober. Then only edit 40_custom when you change one of the distros (like Arch) that aren't controlling grub (update-grub won't change 40_custom).

See this link.

Last edited by 2ManyDogs (2012-06-25 18:03:31)

Offline

#17 2012-06-26 00:29:44

ratcheer
Member
Registered: 2011-10-09
Posts: 505

Re: Some thoughts about grub2 and bootloaders in general.

2ManyDogs wrote:

You could put all the entries except the distro that controls grub in 40_custom, then disable 30_os-prober. Then only edit 40_custom when you change one of the distros (like Arch) that aren't controlling grub (update-grub won't change 40_custom).

See this link.

Cool. I will check it out.

Thanks,
Tim

Offline

#18 2012-06-26 02:53:59

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,170

Re: Some thoughts about grub2 and bootloaders in general.

Mektub wrote:

....All in all GRUB2 is a curious solution for a problem I didn't have.

Mektub

I agree. I think that (along with pulseaudio), GRUB2 is just another solution in search of a problem.

GRUB legacy is more simple and centralized, which are good things.

GRUB2 is more complicated and complex, which are bad things.

When using GRUB2, I quickly became weary of its convoluted structure and simply sat back to be at its mercy and whims, rather than hack away to customize it, or fix it. Whereas, with GRUB legacy, hacking and customization is easy, quick, straightforward and simple.

Was a complete re-write really necessary?

If yes, why a completely new naming convention, syntax and structure?

Why not make things good, familiar, simple and inviting?

Change does not equal progress, improvement does.

Offline

#19 2012-06-26 08:45:36

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Some thoughts about grub2 and bootloaders in general.

Misfit138 wrote:

Why not make things good, familiar, simple and inviting?

Change does not equal progress, improvement does.

I say it to myself everytime I think of KDE4, Gnome3, Firefox4, Thunderbird4, PulseAudio, Systemd, and Fedora18's offline updates.

Offline

#20 2012-06-26 10:42:45

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,101

Re: Some thoughts about grub2 and bootloaders in general.

I have definitively switched to syslinux. It is much simpler and it has interesting features that I need while grub (espacially grub2) have only complications. The two key feature for me are:

1) The ability to determine at boot time from where it is booted and to use that as the root directory, no more hassle trying to find the device where the kernel is. @WorMzy It is true that you cannot load directly a kernel from another distribution with syslinux (unless you put all the kernels in the same directory), however you can easily chainload another linux installation (that must have its own bootloader in its partition).

2) It pass BOOT_IMAGE as a kernel command line, which make easy to reconstruct the exact commandd that have been used to boot the kernel. I use this possibility in a script with the --once option before hibernating so that when the system wake up, it automatically restart the same kernel with the same parameters. It works even if we have manually entered a special kernel at the boot prompt that was not in the menu.

1) is only possible in a very complicated way under grub2 (with the search uuid) and as far as I know 2) is not possible, at least not reliably.

Last edited by olive (2012-06-26 12:17:18)

Offline

#21 2012-06-26 12:28:50

PReP
Member
From: Sweden/Sala
Registered: 2010-06-13
Posts: 347
Website

Re: Some thoughts about grub2 and bootloaders in general.

Mr. Alex wrote:
Misfit138 wrote:

Why not make things good, familiar, simple and inviting?

Change does not equal progress, improvement does.

I say it to myself everytime I think of KDE4, Gnome3, Firefox4, Thunderbird4, PulseAudio, Systemd, and Fedora18's offline updates.

An edit to that, adding dbus and consolekit, and it would be the perfect sig. smile
----
Anyways, by reading the arch-dev-mailing list there seems to be plans in motion to leave grub-legacy for grub2 to a biot larger effect soon
(no grub legacy on the main repos, moving it to aur perhaps)

That is not a very big change i suppose, but i do find grub2 to be more convoluted then grub-legacy aswell,
so i am trying to make up my mind about moving to either grub2 or syslinux (i just have one / partition needing to boot from, and a win7 one as choice atm)

Last edited by PReP (2012-06-26 12:29:06)


#1 Main: Intel Core i5 2500k (Sandy) @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
#2 Server: Intel C2D E8400 @ 3.6 Ghz, 3 GB DDR2-RAM @ 802mhz, XFX GF GTX260 XT -ArchLinux 64-bit.

<- Server Homepage: http://prep.mine.nu ->

Offline

#22 2012-06-26 14:22:06

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Some thoughts about grub2 and bootloaders in general.

I got used to Grub2. I don't use it the 'right way' (i.e. I simply edit the grub.cfg file whenever I need to modify the settings) but I don't consider it anything painful. I stick with it mainly for two reasons: first, its gfx support is a feature that solved my fb headaches as it simply works with plain Vesa driver and the high default resolution in my laptop. Second, adding a new distro is as trivial as putting relevant entries in grub.cfg, without the need to update anything, reinstall, or whatever. (Originally it was ext4 that made me switch to Grub2, though.) Grub2 is big (in size and weight) and odd (for its weird default configuration method), but it can be tamed and in certain scenarios seems like a right choice.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#23 2012-06-26 23:49:59

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 689
Website

Re: Some thoughts about grub2 and bootloaders in general.

Old Grub has worked very well for me and I understand (but hardly love) it. Grub2 is, well, scary to contemplate for all I might need it for.
But I'm confused as to whether Syslinux could handle my 2-disk setup to boot Windows, Arch and another Linux distro:

/dev/sda1 = Windows
/dev/sda2 = swap

/dev/sdb1 = storage
.... etc
/dev/sdb5 = Arch Linux
/dev/sdb6 = Another Linux

I looked at the Arch Wiki and the Syslinux Wiki, also googled, and rarely is a two drive, extended partition setup mentioned.
Any help/suggestions regarding Syslinux for this might keep Grub2 at bay!
wink

Offline

#24 2012-06-27 01:22:27

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,101

Re: Some thoughts about grub2 and bootloaders in general.

ninian wrote:

Old Grub has worked very well for me and I understand (but hardly love) it. Grub2 is, well, scary to contemplate for all I might need it for.
But I'm confused as to whether Syslinux could handle my 2-disk setup to boot Windows, Arch and another Linux distro:

/dev/sda1 = Windows
/dev/sda2 = swap

/dev/sdb1 = storage
.... etc
/dev/sdb5 = Arch Linux
/dev/sdb6 = Another Linux

I looked at the Arch Wiki and the Syslinux Wiki, also googled, and rarely is a two drive, extended partition setup mentioned.
Any help/suggestions regarding Syslinux for this might keep Grub2 at bay!
wink

You cannot boot directly a kernel under another partition with syslinux, you have to chainload the other partition: https://wiki.archlinux.org/index.php/Sy … ainloading. See also the documentation of chain.c32 http://www.syslinux.org/wiki/index.php/ … /chain.c32. Syslinux install only on a partition, if you have several Linuxes, each of them should have syslinux (or another boot loader) in its partition. So in you case I would decide to have a /master/ syslinux installation on a linux distribution on the drive booted by the Bios, that have a menu that 1) load that distribution and 2)  Give the possibility to chainload the other distributions. Now you must have an mbr for the drive that is able to chainload an OS from a logical partition. I think the altmbr.bin of syslinux can do that from a given logical partition (be sure to read http://www.syslinux.org/wiki/index.php/Mbr to understand how to use it)

Last edited by olive (2012-06-27 01:23:42)

Offline

#25 2012-06-27 03:10:56

bwat47
Member
Registered: 2009-10-07
Posts: 637

Re: Some thoughts about grub2 and bootloaders in general.

I ended up just switching to grub2 anyway. The wiki page makes it look horribly complicated at first glance, but its really not that bad.

Offline

Board footer

Powered by FluxBB