Opened 15 years ago

Closed 11 years ago

#124 closed task (fixed)

Grub 1.98

Reported by: Joe Ciccone Owned by: clfs-commits@…
Priority: blocker Milestone: CLFS Standard 1.2.0
Component: BOOK Version: CLFS Standard GIT
Keywords: grub2 1.98 x86_64-64 pure64 Cc:


It's now possible to use Grub2 on 32, multilib, and pure64 if you trick configure a bit. Instructions to compile and install Grub2 are as follows:

cat > config.cache < "EOF"

Compile and install:

./configure --prefix=/usr --cache-file=config.cache &&
make &&
make install


mkdir -p /boot/grub &&
cat > /boot/grub/grub.cfg << "EOF"
set timeout=30
set default=0

menuentry "Linux" {
    linux (hd0,1)/kernel- root=/dev/hda1

Installing the bootsector.

grub-setup --directory=/boot/grub --device-map=/boot/grub/ /dev/hda

Comments, testing, improvements would be appreciated.


Change History (12)

comment:1 Changed 15 years ago by Julio Meca Hansen

just creating a cache file doesn't suffice, as the compilation searchs for stubs-32.h and in my attempted build (pure64) it fails, so I can't get grub to compile, but I have to note I used a tarball grabbed from cvs, not the 1.95 version that's stored in the site since the age of stone...

Joe, do you want me to test the 1.95 version, too?


comment:2 Changed 15 years ago by Joe Ciccone

I havn't had a chance to look at the cvs version, but I'm asuming that that was a change between the two versions. Since I don't have a stubs-32.h on my pure64 system. It couldn't hurt to verify by testing 1.95.

comment:3 Changed 15 years ago by Julio Meca Hansen

Hmm... ok, I'll give it a try, but I don't know if it's the best option for me, as grub-1.95 (AFAIK) doesn't support the journal in an ext3 partition and I didn't created my pure64 on ext2 like suggested by the book...

Maybe a more suitable solution would be to write to the grub-devel mailing list and try to gather as much information as I can... the dirtiest trick I can think about is to change all references to stubs-32.h to stubs.h, but I don't know if it will work, anyway... I'll test it with the regular 1.95


comment:4 Changed 15 years ago by Julio Meca Hansen


I got a response from Robert Millan, one of GRUB 2 developers, and his answer got me quite chilled... I'll post a piece of the e-mail from the grub-devel mailing list, judge for yourself:

Why are you compiling GRUB in 64-bit mode then?  It's not supported yet.

Doesn't the build system automaticaly ressort to 32-bit build for you?

Seems quite 'silly', as the code you posted for grub-1.95 works for pure64, right?

So, unless they give me a more appropiate answer, I'll try to fake the stubs-32.h file by symlinking it to our real stubs.h file and I'll see if it works, let's hope it's for good :S


comment:5 Changed 15 years ago by Joe Ciccone

It works on a pure64 system, the installer compiles fine as 64bit when you tweak the config.cache a bit. But all of the loaders are still 32bit. You don't have to install 1.95, just see if it compiles and executes properly.

comment:6 Changed 15 years ago by Julio Meca Hansen

No, it still doesn't compile, but it's not exactly the presence of a stubs-32.h but the content of one of the grub headers specifing the WORDSIZE variable, as the stubs.h file defines if you're working with a wordsize of 64bits it will search for stubs-64.h while if you're working with a wordsize of 32bits it will search for stubs-32.h, so I suppose I have to locate the exact location of the WORDSIZE statement within grub code and see if I can touch it a bit...

I'll keep working on it, hope I get a decent solution to this (for the moment, I'm booting my system from a grub cd :S)


comment:7 Changed 15 years ago by Joe Ciccone

Milestone: CLFS Standard 1.1.0CLFS Standard 1.2.0
Version: CLFS Standard 1.1.0CLFS Standard 1.2.0

It's probably better to stick with lilo till after the next release.

comment:8 Changed 15 years ago by Julio Meca Hansen

Yes, you're definitely right... and it's a shame, as GRUB 2 could be a far better bootloader than it currently is... looking at their mailing list archive seems to show quite a decent level of activity but apart from patches and implementations, there's not a single line about releases or anything similar...

So, for now, I've parked my attempts to make it work for x86-64, maybe at a later time, we could re-take it but for now... +1 for lilo in pure64


comment:9 Changed 14 years ago by Joe Ciccone

Version: CLFS Standard 1.2.0CLFS Standard SVN

comment:11 Changed 13 years ago by Jonathan

I have made a wiki page here to install grub:

I have done this on x86 32bit, If someone else can do it on x86_64 and x86_64-64 and confirms that it works then it can added to the book. If I were to just add it for x86 32bit I would have to seperate the grub pages from the x86_64 and x86_64-64 books.

comment:13 Changed 12 years ago by Joe Ciccone

Keywords: 1.98 x86_64-64 added
Priority: minorblocker
Summary: Grub 1.96Grub 1.98

Patience is a virtue, Grub 1.98 works on x86, x86_64, and x86_64 with no modifications. The book has been updated to these versions in the final systems, the boot section still needs to be re-written and verified.

At this point this ticket is a blocker since the boot section will be broken until it is updated.

comment:14 Changed 11 years ago by Joe Ciccone

Resolution: fixed
Status: newclosed

The boot section should be fairly stable now. More testing needed, but will resolve this ticket. Any issues found should be opened in new tickets.

Note: See TracTickets for help on using tickets.