From cfce0b1fae9e1e514ce945e7ed71e3e48a22fc7f Mon Sep 17 00:00:00 2001 From: okuji Date: Thu, 4 Apr 2002 14:52:21 +0000 Subject: [PATCH] 2002-04-04 Yoshinori K. Okuji * stage2/builtins.c (setup_func): Don't embed a drive number, if unnecessary. --- ChangeLog | 5 +++++ docs/grub.8 | 2 +- stage2/builtins.c | 21 ++++++++++++--------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ce7c68a1..e19dcaa9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-04-04 Yoshinori K. Okuji + + * stage2/builtins.c (setup_func): Don't embed a drive number, if + unnecessary. + 2002-03-29 Yoshinori K. Okuji * docs/grub.texi (General commands): Added ``pager'' into the diff --git a/docs/grub.8 b/docs/grub.8 index 8d901ee49..3c4c53dcc 100644 --- a/docs/grub.8 +++ b/docs/grub.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB "8" "March 2002" "grub (GNU GRUB 0.92)" FSF +.TH GRUB "8" "April 2002" "grub (GNU GRUB 0.92)" FSF .SH NAME grub \- the grub shell .SH SYNOPSIS diff --git a/stage2/builtins.c b/stage2/builtins.c index 15da71e18..0792f9388 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -3642,7 +3642,7 @@ setup_func (char *arg, int flags) return ret; } - + /* Construct a device name in DEVICE. */ void sprint_device (int drive, int partition) { @@ -3836,8 +3836,8 @@ setup_func (char *arg, int flags) arguments. */ sprint_device (installed_drive, installed_partition); -#ifdef NO_BUGGY_BIOS_IN_THE_WORLD - /* I prefer this, but... */ +#if 1 + /* Don't embed a drive number unnecessarily. */ grub_sprintf (cmd_arg, "%s%s%s%s %s%s %s p %s %s", is_force_lba? "--force-lba" : "", stage2_arg? stage2_arg : "", @@ -3848,11 +3848,14 @@ setup_func (char *arg, int flags) stage2, config_filename, real_config_filename); -#else /* ! NO_BUGGY_BIOS_IN_THE_WORLD */ - /* Actually, there are several buggy BIOSes in the world, so we - may not expect that your BIOS will pass a booting drive to stage1 - correctly. Thus, always specify the option `d', whether - INSTALLED_DRIVE is identical with IMAGE_DRIVE or not. *sigh* */ +#else /* NOT USED */ + /* This code was used, because we belived some BIOSes had a problem + that they didn't pass a booting drive correctly. It turned out, + however, stage1 could trash a booting drive when checking LBA support, + because some BIOSes modified the register %dx in INT 13H, AH=48H. + So it becamed unclear whether GRUB should use a pre-defined booting + drive or not. If the problem still exists, it would be necessary to + switch back to this code. */ grub_sprintf (cmd_arg, "%s%s%s%s d %s %s p %s %s", is_force_lba? "--force-lba " : "", stage2_arg? stage2_arg : "", @@ -3862,7 +3865,7 @@ setup_func (char *arg, int flags) stage2, config_filename, real_config_filename); -#endif /* ! NO_BUGGY_BIOS_IN_THE_WORLD */ +#endif /* NOT USED */ /* Notify what will be run. */ grub_printf (" Running \"install %s\"... ", cmd_arg);