bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub dumps core


From: Peter Jones
Subject: Re: grub dumps core
Date: Fri, 04 Mar 2005 10:45:26 -0500

On Sun, 2005-02-20 at 12:29 +0100, Harald Dunkel wrote:
[...]
> I get a core dump if I try to install grub on an USB stick
> (amd64). Sample session:
[...]
> grub> setup (hd1)
> setup (hd1)
>   Checking if "/boot/grub/stage1" exists... yes
>   Checking if "/boot/grub/stage2" exists... yes
>   Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
>   Running "embed /boot/grub/reiserfs_stage1_5 (hd1)"... failed (this is not 
> fatal)
>   Running "embed /boot/grub/reiserfs_stage1_5 (hd1,0)"... failed (this is not 
> fatal)
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x556f9b00 in ?? ()
> (gdb) bt
> #0  0x556f9b00 in ?? ()
> #1  0x0804bd31 in rawread (drive=129, sector=280353, byte_offset=0, 
> byte_len=512,
>      buf=0x55792600 "ÉÃU\211å\213M\b\203é\t\203ù\027w\023¸\001") at 
> disk_io.c:268
> #2  0x0804bf66 in devread (sector=280353, byte_offset=0, byte_len=512, 
> buf=0x556f9b00 "¹p\233oUéE\001\226²]U|ÜhU") at disk_io.c:327
> #3  0x080520df in reiserfs_read (buf=0x55792600 
> "ÉÃU\211å\213M\b\203é\t\203ù\027w\023¸\001", len=512) at fsys_reiserfs.c:965
> #4  0x0805a211 in install_func (arg=0x1 <Address 0x1 out of bounds>, flags=1) 
> at builtins.c:1965
> #5  0x0805c31e in setup_func (arg=0x556f9c90 "/boot/grub/stage1 (hd1) 
> /boot/grub/stage2 p /boot/grub/menu.lst ", flags=1)
>      at builtins.c:4058
> #6  0x0805d564 in enter_cmdline (heap=0x556a8c60 "setup (hd1)", forever=1) at 
> cmdline.c:172
> #7  0x08056eed in cmain () at stage2.c:1057
> #8  0x0804ba56 in init_bios_info () at common.c:336
> #9  0x08049391 in doit.0 () at asmstub.c:131
> #10 0x08049484 in grub_stage2 () at asmstub.c:188
> #11 0x08049146 in main (argc=1, argv=0xffffda44) at main.c:264
[...]
> Anybody got an idea?

Do you have the "NX" features of the amd64 turned on?  If you're not
sure, try booting with "noexec=off".  If it works once you do that, then
you're using NX, and that's causing grub to have some problems.

I'd bet that's the case, as rawread() is using disk_read_hook.  In the
current CVS grub, that uses a nested function in a way that's not even
remotely safe on amd64, and it'll build a trampoline on the stack in a
way which isn't really allowed.

Let me know once you've tested it.  If it is NX, I'll try to make the
two patches we've got in the Fedora Core 4 tree suitable for upstream
grub next week.  It's probably not much work, just making sure it
applies correctly and writing ChangeLog, etc.  But it won't happen until
at least next week, because the FC4 test 1 freeze is Monday.

-- 
        Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]