Opened 17 years ago
Closed 13 years ago
#124 closed task (fixed)
Grub 1.98
Reported by: | Joe Ciccone | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | CLFS Standard 1.2.0 |
Component: | BOOK | Version: | CLFS Standard GIT |
Keywords: | grub2 1.98 x86_64-64 pure64 | Cc: |
Description
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" grub_cv_check_edata_symbol=yes grub_cv_check_end_symbol=yes grub_cv_check_uscore_edata_symbol=yes grub_cv_check_uscore_end_symbol=yes grub_cv_check_uscore_start_symbol=yes grub_cv_check_uscore_uscore_bss_start_symbol=yes grub_cv_i386_check_nested_functions=no EOF
Compile and install:
./configure --prefix=/usr --cache-file=config.cache && make && make install
Configuring:
mkdir -p /boot/grub && cat > /boot/grub/grub.cfg << "EOF" set timeout=30 set default=0 menuentry "Linux 2.6.22.1" { linux (hd0,1)/kernel-2.6.22.1 root=/dev/hda1 } EOF
Installing the bootsector.
grub-setup --directory=/boot/grub --device-map=/boot/grub/device.map /dev/hda
Comments, testing, improvements would be appreciated.
Reference: http://lists.cross-lfs.org/pipermail/clfs-dev/2007-July/000667.html
Change History (12)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
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 by , 17 years ago
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
Julio
comment:4 by , 17 years ago
Joe,
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
Julio
comment:5 by , 17 years ago
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 by , 17 years ago
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)
Julio
comment:7 by , 17 years ago
Milestone: | CLFS Standard 1.1.0 → CLFS Standard 1.2.0 |
---|---|
Version: | CLFS Standard 1.1.0 → CLFS Standard 1.2.0 |
It's probably better to stick with lilo till after the next release.
comment:8 by , 17 years ago
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
Julio
comment:9 by , 16 years ago
Version: | CLFS Standard 1.2.0 → CLFS Standard SVN |
---|
comment:11 by , 15 years ago
I have made a wiki page here to install grub: http://trac.cross-lfs.org/wiki/bootloaders/grub2
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 by , 14 years ago
Keywords: | 1.98 x86_64-64 added |
---|---|
Priority: | minor → blocker |
Summary: | Grub 1.96 → Grub 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 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
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 alpha.gnu.org site since the age of stone...
Joe, do you want me to test the 1.95 version, too?
Julio