* stage2/builtins.c (boot_func): In the chain-loading mode,
clear the active flag of each of the loaded partition entries, and then set the active flag of the booted partition image. VS: ----------------------------------------------------------------------
This commit is contained in:
parent
71840f80e9
commit
3c8e99279f
3 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2001-01-07 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage2/builtins.c (boot_func): In the chain-loading mode,
|
||||||
|
clear the active flag of each of the loaded partition entries,
|
||||||
|
and then set the active flag of the booted partition image.
|
||||||
|
|
||||||
2001-01-04 Jochen Hoenicke <jochen@gnu.org>
|
2001-01-04 Jochen Hoenicke <jochen@gnu.org>
|
||||||
|
|
||||||
* stage2/builtins.c (embed_func): Call open_partition() even for
|
* stage2/builtins.c (embed_func): Call open_partition() even for
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||||
.TH GRUB "8" "December 2000" "grub (GNU GRUB 0.5.97)" FSF
|
.TH GRUB "8" "January 2001" "grub (GNU GRUB 0.5.97)" FSF
|
||||||
.SH NAME
|
.SH NAME
|
||||||
grub \- the grub shell
|
grub \- the grub shell
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
|
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
|
||||||
* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -291,6 +291,7 @@ boot_func (char *arg, int flags)
|
||||||
if (boot_drive & 0x80)
|
if (boot_drive & 0x80)
|
||||||
{
|
{
|
||||||
char *dst, *src;
|
char *dst, *src;
|
||||||
|
int i;
|
||||||
|
|
||||||
/* Read the MBR here, because it might be modified
|
/* Read the MBR here, because it might be modified
|
||||||
after opening the partition. */
|
after opening the partition. */
|
||||||
|
@ -309,6 +310,12 @@ boot_func (char *arg, int flags)
|
||||||
src = (char *) SCRATCHADDR + BOOTSEC_PART_OFFSET;
|
src = (char *) SCRATCHADDR + BOOTSEC_PART_OFFSET;
|
||||||
while (dst < (char *) BOOT_PART_TABLE + BOOTSEC_PART_LENGTH)
|
while (dst < (char *) BOOT_PART_TABLE + BOOTSEC_PART_LENGTH)
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
|
|
||||||
|
/* Set the active flag of the booted partition. */
|
||||||
|
for (i = 0; i < 4; i++)
|
||||||
|
PC_SLICE_FLAG (BOOT_PART_TABLE, i) = 0;
|
||||||
|
|
||||||
|
*((unsigned char *) boot_part_addr) = PC_SLICE_FLAG_BOOTABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
chain_stage1 (0, BOOTSEC_LOCATION, boot_part_addr);
|
chain_stage1 (0, BOOTSEC_LOCATION, boot_part_addr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue