grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* grub2 boot freedos kernel.sys
@ 2013-08-28  9:04 Beeblebrox
  2013-08-28 14:43 ` Lennart Sorensen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Beeblebrox @ 2013-08-28  9:04 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

I would like to know if the following is possible:

* USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
* hd(0,1)/boot/freedos has files
autoexec.bat, command.com, config.sys, kernel.sys, sys.com
Un-tarred from freedos FDOEM.144 and copied into folder
* Boot into USB drive's grub2 boot menu and try to boot freedos by:
menuentry "DOS kernel" {
   root=UUID=8D40-EC8D
   chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
   boot  }
gives err msg: "wrong signature". Probably expected, since files being
booted are for a "virtual floppy", but I also tried it with the files from
ke386f32 .zip as well.

Q: Is what I'm trying to do possible?
I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
purpose for this is to be able to make mobo BIOS-updates (place BIOS
dosflash.exe + bios.rom files on USB drive, boot into grub2 -> chainload to
dos, mount thumbdrive in dos to make files visible, run dosflash.exe)

I asked this question on the freedos mail list, but they could not help
much because of insufficient grub2 expertise. The feasibility of the
concept is described here:
http://www.novell.com/coolsolutions/feature/3612.html
I would appreciate some help on how to get this done, or if someone has
ideas on how to flash the BIOS using the grub2 menu, that would also work.
Regards.

[-- Attachment #2: Type: text/html, Size: 1760 bytes --]

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

* Re: grub2 boot freedos kernel.sys
  2013-08-28  9:04 Beeblebrox
@ 2013-08-28 14:43 ` Lennart Sorensen
  2013-08-28 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-08-31  4:42 ` Andrey Borzenkov
  2 siblings, 0 replies; 8+ messages in thread
From: Lennart Sorensen @ 2013-08-28 14:43 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Aug 28, 2013 at 12:04:31PM +0300, Beeblebrox wrote:
> I would like to know if the following is possible:
> 
> * USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
> * hd(0,1)/boot/freedos has files
> autoexec.bat, command.com, config.sys, kernel.sys, sys.com
> Un-tarred from freedos FDOEM.144 and copied into folder
> * Boot into USB drive's grub2 boot menu and try to boot freedos by:
> menuentry "DOS kernel" {
>    root=UUID=8D40-EC8D
>    chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
>    boot  }
> gives err msg: "wrong signature". Probably expected, since files being
> booted are for a "virtual floppy", but I also tried it with the files from
> ke386f32 .zip as well.
> 
> Q: Is what I'm trying to do possible?
> I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
> purpose for this is to be able to make mobo BIOS-updates (place BIOS
> dosflash.exe + bios.rom files on USB drive, boot into grub2 -> chainload to
> dos, mount thumbdrive in dos to make files visible, run dosflash.exe)
> 
> I asked this question on the freedos mail list, but they could not help
> much because of insufficient grub2 expertise. The feasibility of the
> concept is described here:
> http://www.novell.com/coolsolutions/feature/3612.html
> I would appreciate some help on how to get this done, or if someone has
> ideas on how to flash the BIOS using the grub2 menu, that would also work.
> Regards.

I don't see how that describes any such thing.  It is perfectly known
how to boot linux kernel and a ramdisk of arbitrary size.  linux was
designed to allow exactly that.  DOS was NOT designed to have ramdisks
loaded along with the OS.  DOS doesn't even have much of a clue about
devices without the BIOS doing all the work unless you add device drivers
to help it.

I think the most practical thing to do would be to make a bootable USB
key and use that along with the USBASPI.SYS driver to get access to the
rest of the USB key after booting DOS.  That should work, and I see
no practical difference from what you were proposing in terms of what
it accomplishes.  Sure you boot to a virtual floppy but then the virtual
floppy can load the USB driver and mount the rest of the USB drive as
a harddisk to access the BIOS file.

You are trying to make it way too complicated.  DOS doesn't like
complicated.

Remember DOS needs access to config.sys and autoexec.bat using primitive
BIOS disk access calls.  That is why the BIOS emulates a floppy drive
while booting from USB.  DOS has no idea how to access a USB drive
normally.  now if you could have the BIOS emulate a harddisk using the
USB key, DOS could boot from that too and use it directly I suspect, but
that would involve the BIOS booting the USB drive directly, not using
grub as far as I know, since the BIOS has to setup the disk emulation
so that the BIOS calls needed by DOS to access the disk are present.

I doubt grub can ask the BIOS to setup such emulation, and grub does
not stick around in memory after loading the OS to provide such access.

-- 
Len Sorensen


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

* Re: grub2 boot freedos kernel.sys
  2013-08-28  9:04 Beeblebrox
  2013-08-28 14:43 ` Lennart Sorensen
@ 2013-08-28 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-08-28 19:19   ` Lennart Sorensen
  2013-08-31  4:42 ` Andrey Borzenkov
  2 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-08-28 17:21 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

On 28.08.2013 11:04, Beeblebrox wrote:
>    chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
The command to load freedos kernel is "freedos". It can load kernel from
any place accessible by GRUB. As to what FreeDOS kernel expects in order
to load the rest you have to consult FreeDOS documenttion or contact
their devs.
FreeDOS requirement may or may not be different from IBM-/MS-DOS
requirements as described by Lennart. You can always modify FreeDOS to
suit your needs: you have full source.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

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

* Re: grub2 boot freedos kernel.sys
  2013-08-28 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-08-28 19:19   ` Lennart Sorensen
  0 siblings, 0 replies; 8+ messages in thread
From: Lennart Sorensen @ 2013-08-28 19:19 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Aug 28, 2013 at 07:21:42PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 28.08.2013 11:04, Beeblebrox wrote:
> >    chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
> The command to load freedos kernel is "freedos". It can load kernel from
> any place accessible by GRUB. As to what FreeDOS kernel expects in order
> to load the rest you have to consult FreeDOS documenttion or contact
> their devs.
> FreeDOS requirement may or may not be different from IBM-/MS-DOS
> requirements as described by Lennart. You can always modify FreeDOS to
> suit your needs: you have full source.

That is a good point. :)

-- 
Len Sorensen


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

* grub2 boot freedos kernel.sys
@ 2013-08-30  7:05 Beeblebrox
  2013-08-30 14:35 ` Lennart Sorensen
  0 siblings, 1 reply; 8+ messages in thread
From: Beeblebrox @ 2013-08-30  7:05 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

Len & Vladimir:

I just sent a repeat of the first message by mistake - please disregard.

>> You are trying to make it way too complicated. DOS doesn't like
complicated.

I'm fine with that. I just went about it in that manner because I was not
very sure how to get this done and more or less fumbling around.

>> I think the most practical thing to do would be to make a bootable USB
key and use that along with the USBASPI.SYS driver to get access to the
rest of the USB key after booting DOS.

You of course mean by this that I would have to have a dedicated USB drive
just for this task - is that correct? I really don't want to have a USB
dedicated and limited to upgrading of BIOS.

>>* You can always modify FreeDOS to* >* suit your needs

*
*Just to confirm: What I am trying to get done is possible then? Not that I
want to make things complicated, I just want to be able to use a
grub2-bootlader USB to multi-boot various tools (including BIOS flash
utility from dos).
*
*Sadly, flashrom does not work on my hardware as yet.
*
*Thanks again.
*
*
*

[-- Attachment #2: Type: text/html, Size: 1306 bytes --]

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

* Re: grub2 boot freedos kernel.sys
  2013-08-30  7:05 grub2 boot freedos kernel.sys Beeblebrox
@ 2013-08-30 14:35 ` Lennart Sorensen
  0 siblings, 0 replies; 8+ messages in thread
From: Lennart Sorensen @ 2013-08-30 14:35 UTC (permalink / raw)
  To: The development of GNU GRUB

On Fri, Aug 30, 2013 at 10:05:12AM +0300, Beeblebrox wrote:
> Len & Vladimir:
> 
> I just sent a repeat of the first message by mistake - please disregard.
> 
> >> You are trying to make it way too complicated. DOS doesn't like
> complicated.
> 
> I'm fine with that. I just went about it in that manner because I was not
> very sure how to get this done and more or less fumbling around.
> 
> >> I think the most practical thing to do would be to make a bootable USB
> key and use that along with the USBASPI.SYS driver to get access to the
> rest of the USB key after booting DOS.
> 
> You of course mean by this that I would have to have a dedicated USB drive
> just for this task - is that correct? I really don't want to have a USB
> dedicated and limited to upgrading of BIOS.
> 
> >>* You can always modify FreeDOS to* >* suit your needs
> 
> *
> *Just to confirm: What I am trying to get done is possible then? Not that I
> want to make things complicated, I just want to be able to use a
> grub2-bootlader USB to multi-boot various tools (including BIOS flash
> utility from dos).
> *
> *Sadly, flashrom does not work on my hardware as yet.

Does this give you any ideas:

http://ubuntuforums.org/showthread.php?t=1545929

It uses a ramdisk as far as I can tell, rather than USB, but you can find
USB drivers for DOS that you could add to give you access to a USB key.

-- 
Len Sorensen


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

* Re: grub2 boot freedos kernel.sys
  2013-08-28  9:04 Beeblebrox
  2013-08-28 14:43 ` Lennart Sorensen
  2013-08-28 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-08-31  4:42 ` Andrey Borzenkov
  2013-09-05  7:29   ` Beeblebrox
  2 siblings, 1 reply; 8+ messages in thread
From: Andrey Borzenkov @ 2013-08-31  4:42 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: zaphod

В Wed, 28 Aug 2013 12:04:31 +0300
Beeblebrox <zaphod@berentweb.com> пишет:

> I would like to know if the following is possible:
> 
> * USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
> * hd(0,1)/boot/freedos has files
> autoexec.bat, command.com, config.sys, kernel.sys, sys.com
> Un-tarred from freedos FDOEM.144 and copied into folder
> * Boot into USB drive's grub2 boot menu and try to boot freedos by:
> menuentry "DOS kernel" {
>    root=UUID=8D40-EC8D
>    chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
>    boot  }
> gives err msg: "wrong signature". Probably expected, since files being
> booted are for a "virtual floppy", but I also tried it with the files from
> ke386f32 .zip as well.
> 
> Q: Is what I'm trying to do possible?
> I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
> purpose for this is to be able to make mobo BIOS-updates (place BIOS
> dosflash.exe + bios.rom files on USB drive, boot into grub2 -> chainload to
> dos, mount thumbdrive in dos to make files visible, run dosflash.exe)
> 

If I understand correctly what you are trying to do, the following
should work:

http://sourceforge.net/apps/mediawiki/freedos/index.php?title=USB

It describes how to create bootable FreeDOS USB stick using grub
legacy which should be trivially extrapolated to grub2.

> I asked this question on the freedos mail list, but they could not help
> much because of insufficient grub2 expertise. The feasibility of the
> concept is described here:
> http://www.novell.com/coolsolutions/feature/3612.html
> I would appreciate some help on how to get this done, or if someone has
> ideas on how to flash the BIOS using the grub2 menu, that would also work.
> Regards.



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

* Re: grub2 boot freedos kernel.sys
  2013-08-31  4:42 ` Andrey Borzenkov
@ 2013-09-05  7:29   ` Beeblebrox
  0 siblings, 0 replies; 8+ messages in thread
From: Beeblebrox @ 2013-09-05  7:29 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: The development of GNU GRUB

After giving some further thought to this concept, I am now of the
opinion that it might be a bad idea. The reason is, the USB connection
might get closed-out during the flash by the BIOS, whereas when loaded
into RAM (as ramdisk) there is no chance of the BIOS closing off the
connection.
So flashing the bios from dos-booted USB drive is probably risky.
Thanks and regards.

On Sat, Aug 31, 2013 at 7:42 AM, Andrey Borzenkov <arvidjaar@gmail.com> wrote:
> В Wed, 28 Aug 2013 12:04:31 +0300
> Beeblebrox <zaphod@berentweb.com> пишет:
>
>> I would like to know if the following is possible:
>>
>> * USB thumb drive has grub-1.98 on hd(0,1) gpt layout (boot-bios is hd0,2)
>> * hd(0,1)/boot/freedos has files
>> autoexec.bat, command.com, config.sys, kernel.sys, sys.com
>> Un-tarred from freedos FDOEM.144 and copied into folder
>> * Boot into USB drive's grub2 boot menu and try to boot freedos by:
>> menuentry "DOS kernel" {
>>    root=UUID=8D40-EC8D
>>    chainloader --ebx=0x0180 (hd0,1)/boot/freedos/kernel.sys
>>    boot  }
>> gives err msg: "wrong signature". Probably expected, since files being
>> booted are for a "virtual floppy", but I also tried it with the files from
>> ke386f32 .zip as well.
>>
>> Q: Is what I'm trying to do possible?
>> I don't want to boot into a ram-limited 1.44 or 2.88 virtual floppy. My
>> purpose for this is to be able to make mobo BIOS-updates (place BIOS
>> dosflash.exe + bios.rom files on USB drive, boot into grub2 -> chainload to
>> dos, mount thumbdrive in dos to make files visible, run dosflash.exe)
>>
>
> If I understand correctly what you are trying to do, the following
> should work:
>
> http://sourceforge.net/apps/mediawiki/freedos/index.php?title=USB
>
> It describes how to create bootable FreeDOS USB stick using grub
> legacy which should be trivially extrapolated to grub2.
>
>> I asked this question on the freedos mail list, but they could not help
>> much because of insufficient grub2 expertise. The feasibility of the
>> concept is described here:
>> http://www.novell.com/coolsolutions/feature/3612.html
>> I would appreciate some help on how to get this done, or if someone has
>> ideas on how to flash the BIOS using the grub2 menu, that would also work.
>> Regards.
>


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

end of thread, other threads:[~2013-09-05  7:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30  7:05 grub2 boot freedos kernel.sys Beeblebrox
2013-08-30 14:35 ` Lennart Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2013-08-28  9:04 Beeblebrox
2013-08-28 14:43 ` Lennart Sorensen
2013-08-28 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-08-28 19:19   ` Lennart Sorensen
2013-08-31  4:42 ` Andrey Borzenkov
2013-09-05  7:29   ` Beeblebrox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).