* grub/asmstub.c (biosdisk): Work around a bug in linux's ez
remapping. Problem reported by Ben Byer <bbyer@rice.edu>.
This commit is contained in:
parent
9e3e10d2c1
commit
68c2bd1e7b
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-05-03 Jochen Hoenicke <jochen@gnu.org>
|
||||||
|
|
||||||
|
* grub/asmstub.c (biosdisk): Work around a bug in linux's ez
|
||||||
|
remapping. Problem reported by Ben Byer <bbyer@rice.edu>.
|
||||||
|
|
||||||
2001-03-28 Gordon Matzigkeit <gord@fig.org>
|
2001-03-28 Gordon Matzigkeit <gord@fig.org>
|
||||||
|
|
||||||
* stage2/boot.c (load_image): Don't cast entry_addr to an int, or
|
* stage2/boot.c (load_image): Don't cast entry_addr to an int, or
|
||||||
|
|
|
@ -872,6 +872,19 @@ biosdisk (int subfunc, int drive, struct geometry *geometry,
|
||||||
switch (subfunc)
|
switch (subfunc)
|
||||||
{
|
{
|
||||||
case BIOSDISK_READ:
|
case BIOSDISK_READ:
|
||||||
|
#ifdef __linux__
|
||||||
|
if (sector == 0 && nsec > 1)
|
||||||
|
{
|
||||||
|
/* Work around a bug in linux's ez remapping. Linux remaps all
|
||||||
|
sectors that are read together with the MBR in one read. It
|
||||||
|
should only remap the MBR, so we split the read in two
|
||||||
|
parts. -jochen */
|
||||||
|
if (nread (fd, buf, SECTOR_SIZE) != SECTOR_SIZE)
|
||||||
|
return -1;
|
||||||
|
buf += SECTOR_SIZE;
|
||||||
|
nsec--;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (nread (fd, buf, nsec * SECTOR_SIZE) != nsec * SECTOR_SIZE)
|
if (nread (fd, buf, nsec * SECTOR_SIZE) != nsec * SECTOR_SIZE)
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue