Thu 27 Oct 2005 09:07:36 AM UTC, original submission:
I build an LFS and added Reiser4 Support to my kernel.
I patched grub with the reiser patch an build it with the GCC 4.0.2.
# ./configure --prefix=/usr && make && make install
When i wanted to install the new grub into my MBR by:
# grub
grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 23 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,1)/boot/grub/stage /boot/grub/menu.lst"... failed
Error 15: File not found.
grub>
I checked, where the install was build and found it in stage2/buildins.c, line 4020. So the part "/boot/grub/stage comes from "config_filename".
I added a few grub_printf("Debug: %s\n", config_filename); and noticed after rebuilding grub, that the variable changes somehow in line 4016, where the command sprint_device (installed_drive, installed_partition); is called.
Now i used a clean source-package an rebuild grub and everything worked, when I installed grub in the MBR. The only modification the reiser4-path did in stage2/buildins.c, was adding a filesystem to the "stage1_5_map" variable.
So i added a filesystem "foobar" to the map and rebuild grub. When I tried to install grub in the MBR the error happened again.
The next step was trying an older compiler, I used Knoppix 4.0 with gcc 3.3.4 and it works.
After this I tried to modified the CFLAGS. With -O0 or -O1 the installation worked, with -Os or -O2 not.
|