public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* Bootability
@ 2002-05-31 16:43 Michael McConnell
  2002-05-31 16:57 ` Bootability Pascal Bellard
  2002-06-03 23:07 ` Bootability Riley Williams
  0 siblings, 2 replies; 4+ messages in thread
From: Michael McConnell @ 2002-05-31 16:43 UTC (permalink / raw)
  To: Linux 8086

An issue I've found is, if a hard disc (or HD image for emulator users) is 
completely blank, even when partitioned it will not boot - it seems like it 
needs an MBR to be placed on the first 256 bytes of /dev/bda.

Are there any plans to implement a mechanism of writing an MBR (such as 
LILO's bootloader or DOS's fdisk /mbr) ?

-- Michael "Soruk" McConnell		           [Eridani Linux 6.3 Now!]
Eridani Linux  --  The Most Up-to-Date Red Hat-based Linux CDROMs Available
Email: linux@eridani.co.uk  http://www.eridani.co.uk   Fax: +44-8701-600807
    "No. 'Eureka' is Greek for 'This bath is too hot.'" - Dr Who.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bootability
  2002-05-31 16:43 Bootability Michael McConnell
@ 2002-05-31 16:57 ` Pascal Bellard
  2002-06-03 23:07 ` Bootability Riley Williams
  1 sibling, 0 replies; 4+ messages in thread
From: Pascal Bellard @ 2002-05-31 16:57 UTC (permalink / raw)
  To: Michael McConnell; +Cc: Linux 8086

Bootkit bootloader can install MBR, Minix bootblocks and is 8086 clean.
Neil Holmes is working on it.

-pascal

Michael McConnell wrote:
> 
> An issue I've found is, if a hard disc (or HD image for emulator users) is
> completely blank, even when partitioned it will not boot - it seems like it
> needs an MBR to be placed on the first 256 bytes of /dev/bda.
> 
> Are there any plans to implement a mechanism of writing an MBR (such as
> LILO's bootloader or DOS's fdisk /mbr) ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bootability
  2002-05-31 16:43 Bootability Michael McConnell
  2002-05-31 16:57 ` Bootability Pascal Bellard
@ 2002-06-03 23:07 ` Riley Williams
  2002-06-04  8:57   ` Bootability Pascal Bellard
  1 sibling, 1 reply; 4+ messages in thread
From: Riley Williams @ 2002-06-03 23:07 UTC (permalink / raw)
  To: Michael McConnell; +Cc: Linux 8086

Hi Michael.

> An issue I've found is, if a hard disc (or HD image for emulator
> users) is completely blank, even when partitioned it will not boot -
> it seems like it needs an MBR to be placed on the first 256 bytes of
> /dev/bda.

I hope you mean the first 512 bytes (one sector) rather than the half
sector you mention above.

For reference, the format of the first sector of a PC disk is as
follows:

	Offsets 	Description
	~~~~~~~ 	~~~~~~~~~~~
	0000-01BC	Boot program
	01BD		Checksum of boot program
	01BE-01FD	Partition table
	01FE		Hex 0x55
	01FF		Hex 0xAA

That 0x55/0xAA in the last two sectors is the "Boot Signature" and
indicates that the disk has been formatted. Both the ELKS and Linux
fdisk programs handle the partition table and boot signatures correctly,
but neither supplies a boot program of any sort, and it's for this
reason that it is necessary to use MS-DOS's fdisk program to initialise
the boot program and checksum before putting ELKS on board.

> Are there any plans to implement a mechanism of writing an MBR (such
> as LILO's bootloader or DOS's fdisk /mbr) ?

That I can't advise on...would you like to have a go at writing the
specifications for such a program? Here's the obvious ones:

 1. The entire program must fit in the 445 bytes available.

 2. The program must be fully relocatable, in that all data references
    must be relative to CS:IP as that's the only sure address.

 3. The program must be able to boot ANY partition irrespective of
    operating system by loading it at 0x7C0:0 and then jumpint to
    0x7C0:0 to run it. That's where boot sectors expect to be when
    control is handed to them, according to the comments in the
    Linux kernel's boot sector.

Beyond that, tell me...

Best wishes from Riley.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bootability
  2002-06-03 23:07 ` Bootability Riley Williams
@ 2002-06-04  8:57   ` Pascal Bellard
  0 siblings, 0 replies; 4+ messages in thread
From: Pascal Bellard @ 2002-06-04  8:57 UTC (permalink / raw)
  To: Riley Williams; +Cc: Neil Holmes, Michael McConnell, Linux 8086

Bootkit bootloader can install MBR, Minix bootblocks and is 8086 clean.
MS-DOS, ELKS and Linux/i386 version are available with CHS, LBA or IDE
disk driver.
At boot time you can choose the partition (including extended
partition) and the hard drive to boot with ALT hot key.
Neil Holmes is working on it.

# ./bootkit -i stdmbr -b /tmp/oldmbr <device>

-pascal

Riley Williams wrote:
> 
> Hi Michael.
> 
> > An issue I've found is, if a hard disc (or HD image for emulator
> > users) is completely blank, even when partitioned it will not boot -
> > it seems like it needs an MBR to be placed on the first 256 bytes of
> > /dev/bda.
> 
> I hope you mean the first 512 bytes (one sector) rather than the half
> sector you mention above.
> 
> For reference, the format of the first sector of a PC disk is as
> follows:
> 
>         Offsets         Description
>         ~~~~~~~         ~~~~~~~~~~~
>         0000-01BC       Boot program
>         01BD            Checksum of boot program
>         01BE-01FD       Partition table
>         01FE            Hex 0x55
>         01FF            Hex 0xAA
> 
> That 0x55/0xAA in the last two sectors is the "Boot Signature" and
> indicates that the disk has been formatted. Both the ELKS and Linux
> fdisk programs handle the partition table and boot signatures correctly,
> but neither supplies a boot program of any sort, and it's for this
> reason that it is necessary to use MS-DOS's fdisk program to initialise
> the boot program and checksum before putting ELKS on board.
> 
> > Are there any plans to implement a mechanism of writing an MBR (such
> > as LILO's bootloader or DOS's fdisk /mbr) ?
> 
> That I can't advise on...would you like to have a go at writing the
> specifications for such a program? Here's the obvious ones:
> 
>  1. The entire program must fit in the 445 bytes available.
> 
>  2. The program must be fully relocatable, in that all data references
>     must be relative to CS:IP as that's the only sure address.
> 
>  3. The program must be able to boot ANY partition irrespective of
>     operating system by loading it at 0x7C0:0 and then jumpint to
>     0x7C0:0 to run it. That's where boot sectors expect to be when
>     control is handed to them, according to the comments in the
>     Linux kernel's boot sector.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-04  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-31 16:43 Bootability Michael McConnell
2002-05-31 16:57 ` Bootability Pascal Bellard
2002-06-03 23:07 ` Bootability Riley Williams
2002-06-04  8:57   ` Bootability Pascal Bellard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox