grub-devel
[Top][All Lists]
Advanced

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

i386-pc 'chainloader' is something wrong. (RE: I write a patch for Japan


From: Hitoshi Ozeki
Subject: i386-pc 'chainloader' is something wrong. (RE: I write a patch for Japanese NEC i386 old computers.)
Date: Fri, 30 Mar 2007 18:34:29 +0900

Hello,

I wrote:
> * When doing 'chainloader' command, the all disk devices cannot use via
> 'dev.c',
>   because of doing 'grub_loader_unload_func'  on 'grub_loader_set'.
>   I think it is disirable to do 'grub_loader_unload_func' on
'grub_*_boot'.

Okuji-san wrote:
> Could you elaborate on why this is bad?

At first, excuse me. 'grub_loader_unload_func' is not bad.
Please see 'grub-1.96/loader/i386/pc/chainloader.c' and
 'grub-1.96/kern/loader.c'

When we execute the 'boot' command, process the 'grub_loader_boot()'
--------------------------------------------------
grub_loader_boot (void)
{
  if (! grub_loader_loaded)
    return grub_error (GRUB_ERR_NO_KERNEL, "no loaded kernel");

  if (grub_loader_noreturn)
    grub_machine_fini (); <--- includes 'grub_biosdisk_fini()'
  
  return (grub_loader_boot_func) ();  <--- call the
'grub_chainloader_boot()'
}
--------------------------------------------------

And 'grub_loader_boot()' passes to 'grub_chainloader_boot()'

--------------------------------------------------
grub_chainloader_boot (void)
{
  grub_device_t dev;
  int drive = -1;
  void *part_addr = 0;
  
  /* Open the root device.  */
  dev = grub_device_open (0);  <--- Ouch! Cannot open device!
  if (dev)
    {
      grub_disk_t disk = dev->disk;
--------------------------------------------------      

I experience this trouble during my work,
 so 'grub_chainloader_boot()' doesn't open the root device in PC-9800 patch.






reply via email to

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