All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hitoshi Ozeki" <h-ozeki@ck2.so-net.ne.jp>
To: "'The development of GRUB 2'" <grub-devel@gnu.org>
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	[thread overview]
Message-ID: <000001c772ae$a4fa46d0$030010ac@temjin> (raw)
In-Reply-To: <200703282125.06774.okuji@enbug.org>

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	other threads:[~2007-03-30  9:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-25  6:33 I write a patch for Japanese NEC i386 old computers Ernest Sales
2007-03-28 15:27 ` Hitoshi Ozeki
2007-03-28 19:25   ` Yoshinori K. Okuji
2007-03-30  9:34     ` Hitoshi Ozeki [this message]
2007-03-31  4:24       ` i386-pc 'chainloader' is something wrong. (RE: I write a patch forJapanese NEC i386 old computers.) Hitoshi Ozeki
2007-04-07 13:13         ` Yoshinori K. Okuji
2007-09-03 20:27       ` i386-pc 'chainloader' is something wrong. (RE: I write a patch for Japanese " Yoshinori K. Okuji
2007-04-10 18:56     ` I write a patch for Japanese NEC i386 old computers Hitoshi Ozeki
2007-04-13 10:57       ` Hitoshi Ozeki
2007-04-13 11:12         ` Vesa Jääskeläinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c772ae$a4fa46d0$030010ac@temjin' \
    --to=h-ozeki@ck2.so-net.ne.jp \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.