All of lore.kernel.org
 help / color / mirror / Atom feed
* Starting grub 2 from grub legacy?
@ 2008-02-13 16:19 Arthur Marsh
  2008-02-13 16:41 ` ardoRic
  0 siblings, 1 reply; 16+ messages in thread
From: Arthur Marsh @ 2008-02-13 16:19 UTC (permalink / raw)
  To: grub-devel

  Hi, I am running Debian unstable on i386 (Pentium II) and have:

grub-pc 1.96+20080210-1 installed, although the grub menu I am presented 
with is from grub-legacy.

It used to be possible to boot grub 2 from a menu entry in 
/boot/grub/menu.lst of grub-legacy but that entry was removed by a 
recent upgrade and I didn't save a copy )-:.

What entry should be put in grub-legacy's menu.lst to present the option 
to run grub 2?

Regards,

Arthur.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-13 16:19 Starting grub 2 from grub legacy? Arthur Marsh
@ 2008-02-13 16:41 ` ardoRic
  2008-02-13 18:50   ` ardoRic
  0 siblings, 1 reply; 16+ messages in thread
From: ardoRic @ 2008-02-13 16:41 UTC (permalink / raw)
  To: The development of GRUB 2

Hello there,

running 'dpkg-reconfigure grub-pc' doesnt get you that option back ?

Ricardo Silva

On Feb 13, 2008 4:19 PM, Arthur Marsh <arthur.marsh@internode.on.net> wrote:
>   Hi, I am running Debian unstable on i386 (Pentium II) and have:
>
> grub-pc 1.96+20080210-1 installed, although the grub menu I am presented
> with is from grub-legacy.
>
> It used to be possible to boot grub 2 from a menu entry in
> /boot/grub/menu.lst of grub-legacy but that entry was removed by a
> recent upgrade and I didn't save a copy )-:.
>
> What entry should be put in grub-legacy's menu.lst to present the option
> to run grub 2?
>
> Regards,
>
> Arthur.
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-13 16:41 ` ardoRic
@ 2008-02-13 18:50   ` ardoRic
  2008-02-14 18:28     ` Arthur Marsh
  2008-02-18 13:42     ` Arthur Marsh
  0 siblings, 2 replies; 16+ messages in thread
From: ardoRic @ 2008-02-13 18:50 UTC (permalink / raw)
  To: The development of GRUB 2

Hi.

I tried it and didn't exactly work.

the grub entry you are looking for is:

title Chainload Grub2
root (hd0,0) # or whatever your root is
kernel /boot/grub/core.img
savedefault

This is what i had before commenting it out, and i tried it out and works.

Regards,
Ricardo Silva

On Feb 13, 2008 4:41 PM, ardoRic <ardoric@gmail.com> wrote:
> Hello there,
>
> running 'dpkg-reconfigure grub-pc' doesnt get you that option back ?
>
> Ricardo Silva
>
>
> On Feb 13, 2008 4:19 PM, Arthur Marsh <arthur.marsh@internode.on.net> wrote:
> >   Hi, I am running Debian unstable on i386 (Pentium II) and have:
> >
> > grub-pc 1.96+20080210-1 installed, although the grub menu I am presented
> > with is from grub-legacy.
> >
> > It used to be possible to boot grub 2 from a menu entry in
> > /boot/grub/menu.lst of grub-legacy but that entry was removed by a
> > recent upgrade and I didn't save a copy )-:.
> >
> > What entry should be put in grub-legacy's menu.lst to present the option
> > to run grub 2?
> >
> > Regards,
> >
> > Arthur.
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > http://lists.gnu.org/mailman/listinfo/grub-devel
> >
>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-13 18:50   ` ardoRic
@ 2008-02-14 18:28     ` Arthur Marsh
  2008-02-18 13:42     ` Arthur Marsh
  1 sibling, 0 replies; 16+ messages in thread
From: Arthur Marsh @ 2008-02-14 18:28 UTC (permalink / raw)
  To: grub-devel

ardoRic wrote, on 2008-02-14 05:20:
> Hi.
> 
> I tried it and didn't exactly work.
> 
> the grub entry you are looking for is:
> 
> title Chainload Grub2
> root (hd0,0) # or whatever your root is
> kernel /boot/grub/core.img
> savedefault
> 
> This is what i had before commenting it out, and i tried it out and works.
> 
> Regards,
> Ricardo Silva
> 
> On Feb 13, 2008 4:41 PM, ardoRic <ardoric@gmail.com> wrote:
>> Hello there,
>>
>> running 'dpkg-reconfigure grub-pc' doesnt get you that option back ?
>>
>> Ricardo Silva

I have in /boot/grub/menu.lst for grub-legacy:

[edit]


title           Debian GNU/Linux, kernel 2.6.23 (recovery mode)
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.23 root=/dev/hda5 ro noisapnp single
initrd          /boot/initrd.img-2.6.23
savedefault

title Chainload Grub2
root (hd0,4) # or whatever your root is
kernel /boot/grub/core.img
savedefault

[end quote]

and I get a looping invalid syntax error when I select the "Chainload 
Grub2" option on the grub-legacy menu, but I can load kernels like the 
one listed above alright from grub-legacy.

Could the:

# or whatever your root is

on the same line as:

root (hd0,4)

be the problem?

ls /boot/grub
acorn.mod       gfxterm.mod                     normal.mod
affs.mod        gpt.mod                         pc.mod
amiga.mod       grub.cfg                        play.mod
apple.mod       gzio.mod                        pxeboot.img
bitmap.mod      halt.mod                        raid.mod
blocklist.mod   hello.mod                       reboot.mod
boot.img        help.mod                        reiserfs_stage1_5
boot.mod        hfs.mod                         search.mod
cat.mod         hfsplus.mod                     sfs.mod
_chain.mod      iso9660.mod                     stage1
chain.mod       iso9660_stage1_5                stage2
cmp.mod         jfs.mod                         sun.mod
command.lst     jfs_stage1_5                    terminal.mod
configfile.mod  kernel.img                      terminfo.mod
core.img        _linux.mod                      test.mod
default         linux.mod                       tga.mod
device.map      loopback.mod                    ufs2_stage1_5
diskboot.img    ls.mod                          ufs.mod
e2fs_stage1_5   lvm.mod                         vbeinfo.mod
elf.mod         menu.lst                        vbe.mod
ext2.mod        menu.lst~                       vbetest.mod
fat.mod         menu.lst_backup_by_grub2_prerm  video.mod
fat_stage1_5    minix.mod                       videotest.mod
ffs_stage1_5    minix_stage1_5                  vstafs_stage1_5
font.mod        moddep.lst                      xfs.mod
fshelp.mod      _multiboot.mod                  xfs_stage1_5
fs.lst          multiboot.mod

dpkg -l grub-pc
...
||/ Name           Version        Description
+++-==============-==============-============================================
ii  grub-pc        1.96+20080213- GRand Unified Bootloader, version 2 
(PC/BIOS




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-13 18:50   ` ardoRic
  2008-02-14 18:28     ` Arthur Marsh
@ 2008-02-18 13:42     ` Arthur Marsh
  2008-02-18 13:55       ` Arthur Marsh
                         ` (2 more replies)
  1 sibling, 3 replies; 16+ messages in thread
From: Arthur Marsh @ 2008-02-18 13:42 UTC (permalink / raw)
  To: grub-devel

ardoRic wrote, on 14/02/08 05:20:
> Hi.
> 
> I tried it and didn't exactly work.
> 
> the grub entry you are looking for is:
> 
> title Chainload Grub2
> root (hd0,0) # or whatever your root is
> kernel /boot/grub/core.img
> savedefault
> 
> This is what i had before commenting it out, and i tried it out and works.
> 

This doesn't work for me )-:

To reiterate, I installed grub-pc with an existing grub-legacy on Debian 
unstable on a Pentium II machine:

# ls -al /boot/grub

total 676
drwxr-xr-x 2 root root   4096 2008-02-18 22:41 .
drwxr-xr-x 3 root root   4096 2008-02-13 17:02 ..
-rw-r--r-- 1 root root   2168 2007-05-08 21:27 acorn.mod
-rw-r--r-- 1 root root   4756 2007-05-08 21:27 affs.mod
-rw-r--r-- 1 root root   2512 2007-05-08 21:27 amiga.mod
-rw-r--r-- 1 root root   2652 2007-05-08 21:27 apple.mod
-rw-r--r-- 1 root root   2512 2007-05-08 21:27 bitmap.mod
-rw-r--r-- 1 root root   2040 2007-05-08 21:27 blocklist.mod
-rw-r--r-- 1 root root    512 2007-05-08 21:27 boot.img
-rw-r--r-- 1 root root   1276 2007-05-08 21:27 boot.mod
-rw-r--r-- 1 root root   1800 2007-05-08 21:27 cat.mod
-rw-r--r-- 1 root root   2232 2007-05-08 21:27 _chain.mod
-rw-r--r-- 1 root root   1640 2007-05-08 21:27 chain.mod
-rw-r--r-- 1 root root   2132 2007-05-08 21:27 cmp.mod
-rw-r--r-- 1 root root    515 2007-05-08 21:27 command.lst
-rw-r--r-- 1 root root   1816 2007-05-08 21:27 configfile.mod
-rw-r--r-- 1 root root  27193 2007-05-08 21:27 core.img
-rw-r--r-- 1 root root      4 2006-06-14 15:06 default
-rw-r--r-- 1 root root     45 2008-01-08 18:01 device.map
-rw-r--r-- 1 root root    512 2007-05-08 21:27 diskboot.img
-rw-r--r-- 1 root root   8000 2004-06-23 17:01 e2fs_stage1_5
-rw-r--r-- 1 root root   4440 2007-05-08 21:27 elf.mod
-rw-r--r-- 1 root root   4184 2007-05-08 21:27 ext2.mod
-rw-r--r-- 1 root root   4816 2007-05-08 21:27 fat.mod
-rw-r--r-- 1 root root   7728 2004-06-23 17:01 fat_stage1_5
-rw-r--r-- 1 root root   7040 2004-06-23 17:01 ffs_stage1_5
-rw-r--r-- 1 root root   2492 2007-05-08 21:27 font.mod
-rw-r--r-- 1 root root   2504 2007-05-08 21:27 fshelp.mod
-rw-r--r-- 1 root root     56 2007-05-08 21:27 fs.lst
-rw-r--r-- 1 root root   6628 2007-05-08 21:27 gfxterm.mod
-rw-r--r-- 1 root root   2744 2007-05-08 21:27 gpt.mod
-r--r--r-- 1 root root   1794 2008-02-18 22:41 grub.cfg
-rw-r--r-- 1 root root   8148 2007-05-08 21:27 gzio.mod
-rw-r--r-- 1 root root   1452 2007-05-08 21:27 halt.mod
-rw-r--r-- 1 root root   1200 2007-05-08 21:27 hello.mod
-rw-r--r-- 1 root root   1904 2007-05-08 21:27 help.mod
-rw-r--r-- 1 root root   6416 2007-05-08 21:27 hfs.mod
-rw-r--r-- 1 root root   6312 2007-05-08 21:27 hfsplus.mod
-rw-r--r-- 1 root root   5108 2007-05-08 21:27 iso9660.mod
-rw-r--r-- 1 root root   7008 2004-06-23 17:01 iso9660_stage1_5
-rw-r--r-- 1 root root   5056 2007-05-08 21:27 jfs.mod
-rw-r--r-- 1 root root   8544 2004-06-23 17:01 jfs_stage1_5
-rw-r--r-- 1 root root  31256 2007-05-08 21:27 kernel.img
-rw-r--r-- 1 root root   4788 2007-05-08 21:27 _linux.mod
-rw-r--r-- 1 root root   1492 2007-05-08 21:27 linux.mod
-rw-r--r-- 1 root root   3124 2007-05-08 21:27 loopback.mod
-rw-r--r-- 1 root root   3780 2007-05-08 21:27 ls.mod
-rw-r--r-- 1 root root   5044 2007-05-08 21:27 lvm.mod
-rw-r--r-- 1 root root   5026 2008-02-18 23:14 menu.lst
-rw-r--r-- 1 root root   4973 2008-02-18 22:32 menu.lst~
-rw-r--r-- 1 root root   4973 2008-02-18 22:32 
menu.lst_backup_by_grub2_prerm
-rw-r--r-- 1 root root   4240 2007-05-08 21:27 minix.mod
-rw-r--r-- 1 root root   7232 2004-06-23 17:01 minix_stage1_5
-rw-r--r-- 1 root root    673 2007-05-08 21:27 moddep.lst
-rw-r--r-- 1 root root   5092 2007-05-08 21:27 _multiboot.mod
-rw-r--r-- 1 root root   1544 2007-05-08 21:27 multiboot.mod
-rw-r--r-- 1 root root  39376 2007-05-08 21:27 normal.mod
-rw-r--r-- 1 root root   3288 2007-05-08 21:27 pc.mod
-rw-r--r-- 1 root root   2152 2007-05-08 21:27 play.mod
-rw-r--r-- 1 root root   1024 2007-05-08 21:27 pxeboot.img
-rw-r--r-- 1 root root   4212 2007-05-08 21:27 raid.mod
-rw-r--r-- 1 root root   1184 2007-05-08 21:27 reboot.mod
-rw-r--r-- 1 root root   9472 2004-06-23 17:01 reiserfs_stage1_5
-rw-r--r-- 1 root root   3080 2007-05-08 21:27 search.mod
-rw-r--r-- 1 root root   4276 2007-05-08 21:27 sfs.mod
-rw-r--r-- 1 root root    512 2004-06-23 17:01 stage1
-rw-r--r-- 1 root root 107250 2004-06-23 17:01 stage2
-rw-r--r-- 1 root root   2468 2007-05-08 21:27 sun.mod
-rw-r--r-- 1 root root   1792 2007-05-08 21:27 terminal.mod
-rw-r--r-- 1 root root   6952 2007-05-08 21:27 terminfo.mod
-rw-r--r-- 1 root root   1580 2007-05-08 21:27 test.mod
-rw-r--r-- 1 root root   2868 2007-05-08 21:27 tga.mod
-rw-r--r-- 1 root root   7296 2004-06-23 17:01 ufs2_stage1_5
-rw-r--r-- 1 root root   4640 2007-05-08 21:27 ufs.mod
-rw-r--r-- 1 root root   2112 2007-05-08 21:27 vbeinfo.mod
-rw-r--r-- 1 root root  13860 2007-05-08 21:27 vbe.mod
-rw-r--r-- 1 root root   2988 2007-05-08 21:27 vbetest.mod
-rw-r--r-- 1 root root   3736 2007-05-08 21:27 video.mod
-rw-r--r-- 1 root root   2700 2007-05-08 21:27 videotest.mod
-rw-r--r-- 1 root root   6688 2004-06-23 17:01 vstafs_stage1_5
-rw-r--r-- 1 root root   6828 2007-05-08 21:27 xfs.mod
-rw-r--r-- 1 root root   9512 2004-06-23 17:01 xfs_stage1_5

# ls -al /usr/lib/grub/i386-pc
total 532
drwxr-xr-x 2 root root  4096 2008-02-18 22:40 .
drwxr-xr-x 3 root root  4096 2008-02-18 22:40 ..
-rw-r--r-- 1 root root  2160 2008-02-17 10:58 acorn.mod
-rw-r--r-- 1 root root  4792 2008-02-17 10:58 affs.mod
-rw-r--r-- 1 root root  2492 2008-02-17 10:58 amiga.mod
-rw-r--r-- 1 root root  2612 2008-02-17 10:58 apple.mod
-rw-r--r-- 1 root root  4572 2008-02-17 10:58 ata.mod
-rw-r--r-- 1 root root  4060 2008-02-17 10:58 biosdisk.mod
-rw-r--r-- 1 root root  2516 2008-02-17 10:58 bitmap.mod
-rw-r--r-- 1 root root  2064 2008-02-17 10:58 blocklist.mod
-rw-r--r-- 1 root root   512 2008-02-17 10:58 boot.img
-rw-r--r-- 1 root root  1276 2008-02-17 10:58 boot.mod
-rw-r--r-- 1 root root  1808 2008-02-17 10:58 cat.mod
-rw-r--r-- 1 root root   512 2008-02-17 10:58 cdboot.img
-rw-r--r-- 1 root root  2340 2008-02-17 10:58 _chain.mod
-rw-r--r-- 1 root root  1624 2008-02-17 10:58 chain.mod
-rw-r--r-- 1 root root  2128 2008-02-17 10:58 cmp.mod
-rw-r--r-- 1 root root   634 2008-02-17 10:58 command.lst
-rw-r--r-- 1 root root  1816 2008-02-17 10:58 configfile.mod
-rw-r--r-- 1 root root  3056 2008-02-17 10:58 cpio.mod
-rw-r--r-- 1 root root  1504 2008-02-17 10:58 cpuid.mod
-rw-r--r-- 1 root root   512 2008-02-17 10:58 diskboot.img
-rw-r--r-- 1 root root  1904 2008-02-17 10:58 echo.mod
-rw-r--r-- 1 root root  4420 2008-02-17 10:58 elf.mod
-rw-r--r-- 1 root root  4180 2008-02-17 10:58 ext2.mod
-rw-r--r-- 1 root root  4816 2008-02-17 10:58 fat.mod
-rw-r--r-- 1 root root  2532 2008-02-17 10:58 font.mod
-rw-r--r-- 1 root root  2488 2008-02-17 10:58 fshelp.mod
-rw-r--r-- 1 root root    75 2008-02-17 10:58 fs.lst
-rw-r--r-- 1 root root  8472 2008-02-17 10:58 gfxterm.mod
-rw-r--r-- 1 root root  2720 2008-02-17 10:58 gpt.mod
-rw-r--r-- 1 root root  8224 2008-02-17 10:58 gzio.mod
-rw-r--r-- 1 root root  1440 2008-02-17 10:58 halt.mod
-rw-r--r-- 1 root root  1200 2008-02-17 10:58 hello.mod
-rw-r--r-- 1 root root  1912 2008-02-17 10:58 help.mod
-rw-r--r-- 1 root root  2524 2008-02-17 10:58 hexdump.mod
-rw-r--r-- 1 root root  6368 2008-02-17 10:58 hfs.mod
-rw-r--r-- 1 root root  6244 2008-02-17 10:58 hfsplus.mod
-rw-r--r-- 1 root root  5108 2008-02-17 10:58 iso9660.mod
-rw-r--r-- 1 root root  5092 2008-02-17 10:58 jfs.mod
-rw-r--r-- 1 root root  6076 2008-02-17 10:58 jpeg.mod
-rw-r--r-- 1 root root 30324 2008-02-17 10:58 kernel.img
-rw-r--r-- 1 root root  4768 2008-02-17 10:58 _linux.mod
-rw-r--r-- 1 root root  1492 2008-02-17 10:58 linux.mod
-rw-r--r-- 1 root root  1024 2008-02-17 10:58 lnxboot.img
-rw-r--r-- 1 root root  3104 2008-02-17 10:58 loopback.mod
-rw-r--r-- 1 root root  3752 2008-02-17 10:58 ls.mod
-rw-r--r-- 1 root root  4068 2008-02-17 10:58 lspci.mod
-rw-r--r-- 1 root root  5016 2008-02-17 10:58 lvm.mod
-rw-r--r-- 1 root root  2128 2008-02-17 10:58 memdisk.mod
-rw-r--r-- 1 root root  4320 2008-02-17 10:58 minix.mod
-rw-r--r-- 1 root root   918 2008-02-17 10:58 moddep.lst
-rw-r--r-- 1 root root 11360 2008-02-17 10:58 _multiboot.mod
-rw-r--r-- 1 root root  1572 2008-02-17 10:58 multiboot.mod
-rw-r--r-- 1 root root 40884 2008-02-17 10:58 normal.mod
-rw-r--r-- 1 root root  3340 2008-02-17 10:58 ntfscomp.mod
-rw-r--r-- 1 root root  8300 2008-02-17 10:58 ntfs.mod
-rw-r--r-- 1 root root   852 2008-02-17 10:58 pci.mod
-rw-r--r-- 1 root root  3216 2008-02-17 10:58 pc.mod
-rw-r--r-- 1 root root  2112 2008-02-17 10:58 play.mod
-rw-r--r-- 1 root root  6100 2008-02-17 10:58 png.mod
-rw-r--r-- 1 root root  1024 2008-02-17 10:58 pxeboot.img
-rw-r--r-- 1 root root  5096 2008-02-17 10:58 raid.mod
-rw-r--r-- 1 root root  1604 2008-02-17 10:58 read.mod
-rw-r--r-- 1 root root  1184 2008-02-17 10:58 reboot.mod
-rw-r--r-- 1 root root  9508 2008-02-17 10:58 reiserfs.mod
-rw-r--r-- 1 root root  3068 2008-02-17 10:58 search.mod
-rw-r--r-- 1 root root  5544 2008-02-17 10:58 serial.mod
-rw-r--r-- 1 root root  4360 2008-02-17 10:58 sfs.mod
-rw-r--r-- 1 root root  2048 2008-02-17 10:58 sleep.mod
-rw-r--r-- 1 root root  2464 2008-02-17 10:58 sun.mod
-rw-r--r-- 1 root root  1792 2008-02-17 10:58 terminal.mod
-rw-r--r-- 1 root root  6888 2008-02-17 10:58 terminfo.mod
-rw-r--r-- 1 root root  1580 2008-02-17 10:58 test.mod
-rw-r--r-- 1 root root  2856 2008-02-17 10:58 tga.mod
-rw-r--r-- 1 root root  5056 2008-02-17 10:58 ufs.mod
-rw-r--r-- 1 root root  3021 2008-02-17 10:58 update-grub_lib
-rw-r--r-- 1 root root  2112 2008-02-17 10:58 vbeinfo.mod
-rw-r--r-- 1 root root 13996 2008-02-17 10:58 vbe.mod
-rw-r--r-- 1 root root  2988 2008-02-17 10:58 vbetest.mod
-rw-r--r-- 1 root root  3792 2008-02-17 10:58 vga.mod
-rw-r--r-- 1 root root  3996 2008-02-17 10:58 video.mod
-rw-r--r-- 1 root root  2696 2008-02-17 10:58 videotest.mod
-rw-r--r-- 1 root root  7384 2008-02-17 10:58 xfs.mod

What should be the correct lines in /boot/grub/menu.lst to start grub 2 
from grub legacy?

Arthur.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-18 13:42     ` Arthur Marsh
@ 2008-02-18 13:55       ` Arthur Marsh
  2008-02-18 14:08       ` Pavel Roskin
  2008-02-19  0:57       ` George Lengel
  2 siblings, 0 replies; 16+ messages in thread
From: Arthur Marsh @ 2008-02-18 13:55 UTC (permalink / raw)
  To: grub-devel

Arthur Marsh wrote, on 2008-02-19 00:12:

See also:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466389




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-18 13:42     ` Arthur Marsh
  2008-02-18 13:55       ` Arthur Marsh
@ 2008-02-18 14:08       ` Pavel Roskin
  2008-02-19  0:57       ` George Lengel
  2 siblings, 0 replies; 16+ messages in thread
From: Pavel Roskin @ 2008-02-18 14:08 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, 2008-02-19 at 00:12 +1030, Arthur Marsh wrote:
> ardoRic wrote, on 14/02/08 05:20:
> > Hi.
> > 
> > I tried it and didn't exactly work.
> > 
> > the grub entry you are looking for is:
> > 
> > title Chainload Grub2
> > root (hd0,0) # or whatever your root is
> > kernel /boot/grub/core.img
> > savedefault
> > 
> > This is what i had before commenting it out, and i tried it out and works.
> > 
> 
> This doesn't work for me )-:

For what it's worth, I cannot load core.img even from the current GRUB2:

grub> kernel /boot/grub/core.img
error: unknown ELF class

Yet core.img appears to have a valid multiboot header:

# mbchk /boot/grub/core.img 
/boot/grub/core.img: The Multiboot header is found at the offset 592.
/boot/grub/core.img: Page alignment is turned off.
/boot/grub/core.img: Memory information is turned off.
/boot/grub/core.img: Address fields is turned on.
/boot/grub/core.img: All checks passed.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-18 13:42     ` Arthur Marsh
  2008-02-18 13:55       ` Arthur Marsh
  2008-02-18 14:08       ` Pavel Roskin
@ 2008-02-19  0:57       ` George Lengel
  2008-02-19  6:25         ` Pavel Roskin
  2 siblings, 1 reply; 16+ messages in thread
From: George Lengel @ 2008-02-19  0:57 UTC (permalink / raw)
  To: The development of GRUB 2


>
> What should be the correct lines in /boot/grub/menu.lst to start grub 
> 2 from grub legacy?

I installed this about two weeks ago and this was the entry that was 
added for me by the process.


title           Grb2 chainload
root            (hd2,6)
kernel          /boot/grub/core.img
boot
savedefault





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19  0:57       ` George Lengel
@ 2008-02-19  6:25         ` Pavel Roskin
  2008-02-19  7:13           ` Robert Millan
  2008-02-19  7:14           ` Bean
  0 siblings, 2 replies; 16+ messages in thread
From: Pavel Roskin @ 2008-02-19  6:25 UTC (permalink / raw)
  To: grub-devel

Quoting George Lengel <lengel1@comcast.net>:

>> What should be the correct lines in /boot/grub/menu.lst to start   
>> grub 2 from grub legacy?
>
> I installed this about two weeks ago and this was the entry that was
> added for me by the process.
>
>
> title           Grb2 chainload
> root            (hd2,6)
> kernel          /boot/grub/core.img
> boot
> savedefault

Yes, I installed both GRUB 1 and GRUB 2, and loading core.img from  
GRUB 1 is working fine.  But GRUB 2 cannot load its own core.img, and  
neither can it load stage2:

grub> multiboot /boot/grub/core.img
error: unknown ELF class
grub> multiboot /boot/grub/stage2
alloc magic is broken at 0x93c50
Aborted. Press any key to exit.

That's current CVS versions of GRUB 1 and GRUB 2.  Compiled on Fedora  
8 x86_64 with all updates.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19  6:25         ` Pavel Roskin
@ 2008-02-19  7:13           ` Robert Millan
  2008-02-19  7:14           ` Bean
  1 sibling, 0 replies; 16+ messages in thread
From: Robert Millan @ 2008-02-19  7:13 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, Feb 19, 2008 at 01:25:52AM -0500, Pavel Roskin wrote:
> 
> Yes, I installed both GRUB 1 and GRUB 2, and loading core.img from  
> GRUB 1 is working fine.  But GRUB 2 cannot load its own core.img, and  
> neither can it load stage2:
> 
> grub> multiboot /boot/grub/core.img
> error: unknown ELF class

I think Bean made a patch to fix that (the same that implements *BSD boot).

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19  6:25         ` Pavel Roskin
  2008-02-19  7:13           ` Robert Millan
@ 2008-02-19  7:14           ` Bean
  2008-02-19 18:19             ` Pavel Roskin
  1 sibling, 1 reply; 16+ messages in thread
From: Bean @ 2008-02-19  7:14 UTC (permalink / raw)
  To: The development of GRUB 2

On Feb 19, 2008 2:25 PM, Pavel Roskin <proski@gnu.org> wrote:
> Quoting George Lengel <lengel1@comcast.net>:
>
> >> What should be the correct lines in /boot/grub/menu.lst to start
> >> grub 2 from grub legacy?
> >
> > I installed this about two weeks ago and this was the entry that was
> > added for me by the process.
> >
> >
> > title           Grb2 chainload
> > root            (hd2,6)
> > kernel          /boot/grub/core.img
> > boot
> > savedefault
>
> Yes, I installed both GRUB 1 and GRUB 2, and loading core.img from
> GRUB 1 is working fine.  But GRUB 2 cannot load its own core.img, and
> neither can it load stage2:
>
> grub> multiboot /boot/grub/core.img
> error: unknown ELF class

That's because core.img is a.out format multiboot kernel, but the
current multiboot loader can only handle elf format. My bsd patch add
a.out support for multiboot. with that, you can load core.img
successfully.

> grub> multiboot /boot/grub/stage2
> alloc magic is broken at 0x93c50
> Aborted. Press any key to exit.

stage2 is not multiboot format, actually, it's not of any format. The
alloc magic broken is caused by a bug in the multiboot loader, my bsd
also fit this, it will print the error message: "currently only ELF is
supported"

however, it's still possible to load GRUB Legacy with my grubutil
package. It contain several header file which you can use to load
various boot loader from any loader that support linux kernel. For
example, the header for grub legacy is ldgrub.bin, you can use it like
this:

linux ldgrub.bin
initrd stage2

-- 
Bean



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19  7:14           ` Bean
@ 2008-02-19 18:19             ` Pavel Roskin
  2008-02-19 18:33               ` Bean
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Roskin @ 2008-02-19 18:19 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, 2008-02-19 at 15:14 +0800, Bean wrote:

> That's because core.img is a.out format multiboot kernel, but the
> current multiboot loader can only handle elf format. My bsd patch add
> a.out support for multiboot. with that, you can load core.img
> successfully.

It's working, thanks!  Just one minor issue - the new core.img is
confused about the root device:

Welcome to GRUB!

error: unknown device
Entering into rescue mode...
grub rescue> set
prefix=(fd0,1,a)/boot/grub
root=fd0,1,a
grub rescue>


That's qemu with one hard drive and no floppies.  By the way, "Entering
into rescue mode" should be "Entering rescue mode".

> > grub> multiboot /boot/grub/stage2
> > alloc magic is broken at 0x93c50
> > Aborted. Press any key to exit.
> 
> stage2 is not multiboot format, actually, it's not of any format. The
> alloc magic broken is caused by a bug in the multiboot loader, my bsd
> also fit this, it will print the error message: "currently only ELF is
> supported"

Yes, it's better now.

Actually, GRUB 2 modules still confuse multiboot.  Loading _bsd.mod or
affs.mod would cause GRUB to hand.  But "multiboot configfile.mod"
actually crashed qemu 0.9.1 with "qemu: fatal: triple fault"!

> however, it's still possible to load GRUB Legacy with my grubutil
> package. It contain several header file which you can use to load
> various boot loader from any loader that support linux kernel. For
> example, the header for grub legacy is ldgrub.bin, you can use it like
> this:
> 
> linux ldgrub.bin
> initrd stage2

I'm thinking maybe the final GRUB 1 should make stage2 multiboot
compliant, if we are going to release it one day.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19 18:19             ` Pavel Roskin
@ 2008-02-19 18:33               ` Bean
  2008-02-19 20:56                 ` Pavel Roskin
  0 siblings, 1 reply; 16+ messages in thread
From: Bean @ 2008-02-19 18:33 UTC (permalink / raw)
  To: The development of GRUB 2

On Feb 20, 2008 2:19 AM, Pavel Roskin <proski@gnu.org> wrote:
> On Tue, 2008-02-19 at 15:14 +0800, Bean wrote:
>
> > That's because core.img is a.out format multiboot kernel, but the
> > current multiboot loader can only handle elf format. My bsd patch add
> > a.out support for multiboot. with that, you can load core.img
> > successfully.
>
> It's working, thanks!  Just one minor issue - the new core.img is
> confused about the root device:
>
> Welcome to GRUB!
>
> error: unknown device
> Entering into rescue mode...
> grub rescue> set
> prefix=(fd0,1,a)/boot/grub
> root=fd0,1,a
> grub rescue>
>
>
> That's qemu with one hard drive and no floppies.  By the way, "Entering
> into rescue mode" should be "Entering rescue mode".
>

The boot drive isn't passed to core.img.

> > > grub> multiboot /boot/grub/stage2
> > > alloc magic is broken at 0x93c50
> > > Aborted. Press any key to exit.
> >
> > stage2 is not multiboot format, actually, it's not of any format. The
> > alloc magic broken is caused by a bug in the multiboot loader, my bsd
> > also fit this, it will print the error message: "currently only ELF is
> > supported"
>
> Yes, it's better now.
>
> Actually, GRUB 2 modules still confuse multiboot.  Loading _bsd.mod or
> affs.mod would cause GRUB to hand.  But "multiboot configfile.mod"
> actually crashed qemu 0.9.1 with "qemu: fatal: triple fault"!

Multiboot loader would try to load elf kernel if the multiboot header
is not found. The modules file have the elf header, but they're not
really kernels, so it cause the problem.

>
> > however, it's still possible to load GRUB Legacy with my grubutil
> > package. It contain several header file which you can use to load
> > various boot loader from any loader that support linux kernel. For
> > example, the header for grub legacy is ldgrub.bin, you can use it like
> > this:
> >
> > linux ldgrub.bin
> > initrd stage2
>
> I'm thinking maybe the final GRUB 1 should make stage2 multiboot
> compliant, if we are going to release it one day.

it should be trivial, but i think grub1 is not updated any more ?

-- 
Bean



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19 18:33               ` Bean
@ 2008-02-19 20:56                 ` Pavel Roskin
  2008-02-20 21:32                   ` Yoshinori K. Okuji
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Roskin @ 2008-02-19 20:56 UTC (permalink / raw)
  To: The development of GRUB 2

On Wed, 2008-02-20 at 02:33 +0800, Bean wrote:
> On Feb 20, 2008 2:19 AM, Pavel Roskin <proski@gnu.org> wrote:
> > On Tue, 2008-02-19 at 15:14 +0800, Bean wrote:
> >
> > > That's because core.img is a.out format multiboot kernel, but the
> > > current multiboot loader can only handle elf format. My bsd patch add
> > > a.out support for multiboot. with that, you can load core.img
> > > successfully.
> >
> > It's working, thanks!  Just one minor issue - the new core.img is
> > confused about the root device:
> >
> > Welcome to GRUB!
> >
> > error: unknown device
> > Entering into rescue mode...
> > grub rescue> set
> > prefix=(fd0,1,a)/boot/grub
> > root=fd0,1,a
> > grub rescue>
> >
> >
> > That's qemu with one hard drive and no floppies.  By the way, "Entering
> > into rescue mode" should be "Entering rescue mode".
> >
> 
> The boot drive isn't passed to core.img.

I think it should be passed (see "boot_device" in the specification).
Perhaps core.img doesn't use it?  That would be more understandable.

> > > > grub> multiboot /boot/grub/stage2
> > > > alloc magic is broken at 0x93c50
> > > > Aborted. Press any key to exit.
> > >
> > > stage2 is not multiboot format, actually, it's not of any format. The
> > > alloc magic broken is caused by a bug in the multiboot loader, my bsd
> > > also fit this, it will print the error message: "currently only ELF is
> > > supported"
> >
> > Yes, it's better now.
> >
> > Actually, GRUB 2 modules still confuse multiboot.  Loading _bsd.mod or
> > affs.mod would cause GRUB to hand.  But "multiboot configfile.mod"
> > actually crashed qemu 0.9.1 with "qemu: fatal: triple fault"!
> 
> Multiboot loader would try to load elf kernel if the multiboot header
> is not found. The modules file have the elf header, but they're not
> really kernels, so it cause the problem.

Oh, well, I don't really care about foolproofing GRUB too much.

But it made me think whether it's right for the "multiboot" command to
try ELF if multiboot fails.  Either we should go with one universal
"kernel" command as in GRUB 1 (perhaps with switches to force specific
loading algorithm) or we was a multitude of commands for every kernel
type (linux, multiboot, elf, a.out, bsd, bsdloader).  Having "multiboot"
fallback to ELF is inconsistent.

> > > however, it's still possible to load GRUB Legacy with my grubutil
> > > package. It contain several header file which you can use to load
> > > various boot loader from any loader that support linux kernel. For
> > > example, the header for grub legacy is ldgrub.bin, you can use it like
> > > this:
> > >
> > > linux ldgrub.bin
> > > initrd stage2
> >
> > I'm thinking maybe the final GRUB 1 should make stage2 multiboot
> > compliant, if we are going to release it one day.
> 
> it should be trivial, but i think grub1 is not updated any more ?

The CVS is still exists, and there was a discussion about making a
release with cs89x0 removed.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-19 20:56                 ` Pavel Roskin
@ 2008-02-20 21:32                   ` Yoshinori K. Okuji
  2008-02-21  3:19                     ` Bean
  0 siblings, 1 reply; 16+ messages in thread
From: Yoshinori K. Okuji @ 2008-02-20 21:32 UTC (permalink / raw)
  To: The development of GRUB 2

On Tuesday 19 February 2008 21:56, Pavel Roskin wrote:
> But it made me think whether it's right for the "multiboot" command to
> try ELF if multiboot fails.

It is wrong. No fallback, please. If someone wants a fallback, it should be 
accomplished with scripting.

Okuji



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Starting grub 2 from grub legacy?
  2008-02-20 21:32                   ` Yoshinori K. Okuji
@ 2008-02-21  3:19                     ` Bean
  0 siblings, 0 replies; 16+ messages in thread
From: Bean @ 2008-02-21  3:19 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Feb 21, 2008 at 5:32 AM, Yoshinori K. Okuji <okuji@enbug.org> wrote:
> On Tuesday 19 February 2008 21:56, Pavel Roskin wrote:
>  > But it made me think whether it's right for the "multiboot" command to
>  > try ELF if multiboot fails.
>
>  It is wrong. No fallback, please. If someone wants a fallback, it should be
>  accomplished with scripting.

I agree, in fact, the generic handling rarely works for elf kernels.
The physical address in elf header can't be used directly most of the
time,  and the parameter need to be set properly before jumping to the
entry point.

-- 
Bean



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-02-21  3:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 16:19 Starting grub 2 from grub legacy? Arthur Marsh
2008-02-13 16:41 ` ardoRic
2008-02-13 18:50   ` ardoRic
2008-02-14 18:28     ` Arthur Marsh
2008-02-18 13:42     ` Arthur Marsh
2008-02-18 13:55       ` Arthur Marsh
2008-02-18 14:08       ` Pavel Roskin
2008-02-19  0:57       ` George Lengel
2008-02-19  6:25         ` Pavel Roskin
2008-02-19  7:13           ` Robert Millan
2008-02-19  7:14           ` Bean
2008-02-19 18:19             ` Pavel Roskin
2008-02-19 18:33               ` Bean
2008-02-19 20:56                 ` Pavel Roskin
2008-02-20 21:32                   ` Yoshinori K. Okuji
2008-02-21  3:19                     ` Bean

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.