[gPXE] Booting FreeDOS - beginner question

114 views
Skip to first unread message

Ruzsinszky Attila

unread,
Jan 13, 2012, 6:14:58 AM1/13/12
to gp...@etherboot.org
Hi,

I want to test, setup, learn, use a virtual environment.

I've got a very simple scenario. Booting a simple FreeDOS.

FreeDOS is on an iSCSI target which comes from FreeNAS.
DHCP server is a SuSE 9.3 Linux.
Client is a 4.x Virtualbox which is running under WinXP.

Almost everything is ready but when I try to boot FreeDOS,
I got: Error loading operating system.
Of course I'm not sure the iSCSI target image is correct. I
did it half a year before.

The messages when the system is booting:

Loading ROM image .......
gPXE initialising devices...

gPXE 1.0.1 -- Open Source Boot Firmware -- http://etherboot.org
Feature: AoE HTTP iSCSI DNS TFTP bzImage COMBOOT ELF Multiboot NBI PXE PXEXT

net0: 08:00:27:2c:61:a6 on PCI00:03:0 (open)
[Link:up, TX:0 TXE:0 RX:0 RXE:0]
DHCP (net0 08:00:27:2c:61:a6).... ok
net0: 192.168.52.22/255.255.255.0 gw 192.168.52.254
Booting from root path
"iscsi:192.168.52.60::::iqn.2010-12.hu.mavrt.bbf.fc:fdos-disk"
Registered as BIOS drive 0x80
Booting from BIOS drive 0x80
Error loading operating system

I "mounted" that disk under XP with iSCSI initiator without problem.
The image was create from balder10 image and there are just a KERNEL.SYS and
some inrelevant files and directories. I think the problem is related to the
disk image which was created from balder10 image.
The question: how can I make a bootable FreeDOS image under Linux and
how can I check it in a virtual environment?

The further goal would be a boot server setup installing Linuxes and other
OSs from network with PXE.

TIA,
Ruzsi
_______________________________________________
gPXE mailing list
gP...@etherboot.org
http://etherboot.org/mailman/listinfo/gpxe

david...@l-3com.com

unread,
Jan 13, 2012, 10:49:21 AM1/13/12
to Ruzsinszky Attila, gp...@etherboot.org
I feel your FreeDOS pain. I just spent two days setting up a bootable
USB before I finally got it working.


Specifically, I was trying to flash gPXE into ROM on an intel NIC.

So, I learned that gPXE is relatively low-volume. Check out iPXE, which
seems to be a fork. They advertise that they actually have more
commits/updates than gPXE.

Certainly, their Intel flash instructions are more up to date:
http://ipxe.org/howto/romburning/intel


They do have a dosboot.img file up there, which is a freedos boot image.
You may want to try that (it's linked at the top of that page). You
should be able to try that at least.


Otherwise, I think I finally tried the 144 image here:
http://www.fdos.org/bootdisks/ and loading it via GRUB, following these
instructions (on a linux box, not the windows one. That didn't work)
http://sourceforge.net/apps/mediawiki/freedos/index.php?title=USB

So, how does it help you? Well, hopefully that 144 image will work out
of the box. No further work required.

Good luck

Ruzsinszky Attila

unread,
Jan 13, 2012, 10:58:01 AM1/13/12
to gp...@etherboot.org
Hi Michael,

Thanks for your information!

> Firstly, please upgrade to iPXE.  gPXE is a dead project and is no longer
> maintained.
If I can, I will try iPXE.
I don't remember now where is gPXE in the system (where I put it, for example
DHCP or TFTP server). I hate compiling anything. I've got bad experiences.
I try using packet management (deb or rpm).

> Have you tried booting directly from your FreeDOS image (i.e. attaching it as
> a "physical" disk within a VM, rather than using iSCSI)?  Make sure that the
> image itself is bootable before attempting to boot via iSCSI.
No, I think, not. For example there isn't command.com. For MSDOS it is a
must. I think I have to refresh my DOS knowledge.

So do I have to make a booting image in my VM and if it is working I have to
copy it to iSCSI server? Maybe I did it. Maybe not.

Ruzsinszky Attila

unread,
Jan 13, 2012, 11:01:33 AM1/13/12
to gp...@etherboot.org
Hi David,

> I feel your FreeDOS pain.  I just spent two days setting up a bootable
> USB before I finally got it working.

:-)
Thanks! So you know what I speaking.
FreeDOS is not so important but I thought it is the most easy OS for
boot testing.

> Specifically, I was trying to flash gPXE into ROM on an intel NIC.

I think I don't have to because of the VM environment.

> So, I learned that gPXE is relatively low-volume.  Check out iPXE, which
> seems to be a fork.  They advertise that they actually have more
> commits/updates than gPXE.

2nd vote for iPXE. ;-)

Thanks for your information about setup. I'll try it out soon.

Ruzsinszky Attila

unread,
Jan 13, 2012, 1:30:23 PM1/13/12
to gp...@etherboot.org
Hi,

Something went wrong when I tried to compiling iPXE:

...
[BUILD] bin/ath5k_phy.o
[BUILD] bin/ath5k_qcu.o
[BUILD] bin/ath5k_reset.o
[BUILD] bin/ath5k_rfkill.o
[BUILD] bin/ath9k_ani.o
In file included from drivers/net/ath/ath9k/hw.h:25,
from drivers/net/ath/ath9k/ath9k_ani.c:20:
drivers/net/ath/ath9k/mac.h:702: warning: parameter has incomplete type
make: *** [bin/ath9k_ani.o] Error 1

That happened under SuSE 9.3.
binutils is 2.15 :-(
gcc 3.3.5

Is there a rom-o-matic for iPXE somewhere on the Net?

Ruzsinszky Attila

unread,
Jan 13, 2012, 1:36:58 PM1/13/12
to gp...@etherboot.org
Hi,

Under Ubuntu 10.04.3 LTS 64 bit:

rattila@amd1:~/ipxe-18d2887/src$ make
[BUILD] bin/blockdev.o
In file included from include/ipxe/uaccess.h:27,
from include/ipxe/blockdev.h:14,
from core/blockdev.c:23:
./config/ioapi.h:17:32: error: config/local/ioapi.h: Nincs ilyen fájl
vagy könyvtár
make: *** [bin/blockdev.o] Error 1

Ruzsinszky Attila

unread,
Jan 13, 2012, 3:42:45 PM1/13/12
to gp...@etherboot.org
Hi,

> So, how does it help you?  Well, hopefully that 144 image will work out
> of the box.  No further work required.

Is there a description or howto making hard disk image?
I try to convert USB description.

My original image is unmountable so it is not booting. I don't understand
why because I can see it if I mount under XP as iSCSI drive.

david...@l-3com.com

unread,
Jan 13, 2012, 3:58:01 PM1/13/12
to Ruzsinszky Attila, gp...@etherboot.org
No, sorry :-/

-----Original Message-----
From: gpxe-b...@etherboot.org [mailto:gpxe-b...@etherboot.org] On Behalf Of Ruzsinszky Attila

Quinn Plattel

unread,
Jan 16, 2012, 1:54:00 AM1/16/12
to gpxe
Hi,

It may be something to do with disk geometry.  Create a new blank freedos image on your iscsi target then try putting in a bootable freedos install cd and boot from a bootable gpxe usb key using this gpxe script:

#!gpxe
dhcp net0
set keep-san 1
sanboot iscsi:192.168.52.60::::iqn.2010-12.hu.mavrt.bbf.fc:fdos-disk

What happens here is your pc will boot from usb with gpxe on it, gpxe will try to boot from your empty iscsi disk but it cannot because it is empty and then it will fallback to booting from your cd.  Your empty iscsi disk will be seen by freedos as a new blank hard drive and will format it properly when installing to it.

The instructions are similar to the installation instructions for windows 2k8:
http://etherboot.org/wiki/sanboot/win2k8_iscsi_install

br,
Quinn
--
Best regards/Med venlig hilsen,
Quinn Plattel

Ruzsinszky Attila

unread,
Jan 16, 2012, 3:26:12 AM1/16/12
to gp...@etherboot.org
Hi,

> Yesterday I installed a FreeDOS to VBox vdi image and the image was
> converted to .img format. qemu was able to boot from it. I'll test it today
> putting that image to iSCSi server (FreeNAS).
It doesn't work:

...


Booting from BIOS drive 0x80

...Error!.

That's all.

If it was connected to XP with iSCSI Initiator, XP complains about
the drive not formatted. Interesting ...

I don't know whether I did the right steps putting the image on FreeNAS:
1. I gzipped the image
2. scp to FreeNAS in my home dir
3. gzip -d image
4. stopped iSCSI service
5. mv image to the right place for iscsi and renamed to the original
name which was configured
6. started iscsi service
7. checked iscsi is running

Ruzsinszky Attila

unread,
Jan 16, 2012, 7:14:29 AM1/16/12
to gp...@etherboot.org
Hi,

> #!gpxe
> dhcp net0
> set keep-san 1
> sanboot iscsi:192.168.52.60::::iqn.2010-12.hu.mavrt.bbf.fc:fdos-disk

Registered as BIOS drive 0x80
Booting from BIOS drive 0x80

Boot failed
Preserving connection to SAN disk
Could not boot from iscsi:........: Not an executable image (0x2e852001)
gPXE>

No CD boot. The gPXE comes from floppy image. fdfull.iso is in the CD "drive".

Quinn Plattel

unread,
Jan 16, 2012, 7:26:40 AM1/16/12
to gpxe
Ok, you must be typing the lines in manually from the command line.  Add "exit" as the last command, then it should boot from cd if your BIOS allows it.

br,
Quinn

Ruzsinszky Attila

unread,
Jan 16, 2012, 7:39:17 AM1/16/12
to gp...@etherboot.org
> Ok, you must be typing the lines in manually from the command line.  Add
> "exit" as the last command, then it should boot from cd if your BIOS allows
> it.
Something is not perfect with VBox:
after exit I got:
FATAL: INT18: BOOT FAILURE

Ruzsinszky Attila

unread,
Jan 16, 2012, 8:10:34 AM1/16/12
to gp...@etherboot.org
Hi,

> Something is not perfect with VBox:
> after exit I got:
> FATAL: INT18: BOOT FAILURE

As usually, VBox not compatible gPXE (I found it some time).
VMware seems working as you mentioned.
iscsi boot failing and after it system booting from CD and thanks
for keep-san 1 can see my 40MB empty iscsi disk. ;-)

And here is the next problem:
XFDisk:
Writing Changes. Please be patient.
Writing Harddisk #1.
0%
... and waiting, waiting és waiting....

SOmething was modified on the partition table, because if I reset
the VM and restart everything, gPXE complains about invalid
partition table.
Hmmmmmm.......

Ruzsinszky Attila

unread,
Jan 16, 2012, 8:31:24 AM1/16/12
to gp...@etherboot.org
> XFDisk:
> Writing Changes. Please be patient.
> Writing Harddisk #1.
> 0%
> ... and waiting, waiting és waiting....
Something is happening: 10% in half an hour for a 40MB HDD!!!
Isn't it a little bit slooooooooow, it is?

Ruzsinszky Attila

unread,
Jan 17, 2012, 1:19:03 AM1/17/12
to gp...@etherboot.org
>> ... and waiting, waiting és waiting....
> Something is happening: 10% in half an hour for a 40MB HDD!!!
> Isn't it a little bit slooooooooow, it is?
The partition was finished in some hours.
The setup asked me to reboot. After it I got:
...

Registered as BIOS drive 0x80
Booting from BIOS drive 0x80
Invalid Operating System!

and VMware (or gPXE) do nothing.

Is that so hard installing a FreeDOS in an iSCSI drive?

Quinn Plattel

unread,
Jan 17, 2012, 6:17:10 AM1/17/12
to gpxe
As far as I remember, the geometry for the hard drive should be 255 heads, 63 sectors per track.  Try and use qemu with a raw disk image or virtualbox with a vmdk file pointing to a raw image, then they should at least use 63 sectors per track as the geometry, so if you setup freedos under one of these virtual machines onto a flat hard disk image, then you should just be able to move the raw or flat image file over to your iscsi target and use that for booting.

The reason why installation is so slow over iscsi is because all reads and writes are going through the gpxe bios to the iscsi disk - that is the only option under dos.  Under windows and linux, they have native drivers for the netcard so it is usually at least 50x faster with those operating systems.

btw, have you looked through this document: http://etherboot.org/wiki/sanboot/freedos

br,
Quinn

Ruzsinszky Attila

unread,
Jan 17, 2012, 8:01:02 AM1/17/12
to gp...@etherboot.org
Hi,

qemu and VBox is able to boot from my image (I converted vdi to img).
That image doesn't boot from iSCSI.

> btw, have you looked through this document:
> http://etherboot.org/wiki/sanboot/freedos

Yes.
It isn't a real cookbook. I don't know what is my problem.

I think I have to leave FreeDOS. I thought it was a simple OS.

Can I boot a tinyCoreLinux iso from iSCSI?

Ruzsinszky Attila

unread,
Jan 17, 2012, 8:18:19 AM1/17/12
to gp...@etherboot.org
> It is real eays to boot Linux from iSCSI. Ubuntu is able to recognize that
> you want to install it on a iSCSI-volume at the installation-process and
> will adapt the boot-parameter to boot from.
OK.

My goal is a working boot server with many different OSes, like
- some Linux distros
- some rescueCD-s (systemrescuecd, etc.)
- DOSes (M$ and Free)
- Win (XP, W7)
- maybe OS/2, FreeBSD.

> I recommend at least to use Ubuntu 11.04, but 11.10 should also be no
> problem.
I like Ubuntu 10.04.3 LTS. I hate Unity because I don't know how can I use it.

I'd like to know whether I can setup FreeDOS boot system using only Linux
utilities (dd, fdisk, mkfs.msdos, makebootfat, etc.) I hope it is possible.
If my image is correct checking with fdisk, no boot at all (from qemu).
If I use makebootfat, fdisk complains but qemu is able to boot from it. If
qemu is able to boot directly from my image not booting from the iSCSI.
What is the difference? I don't understand. I'm confused.

For boot server, almost everything is ready: DHCP+TFTP+WEB+Samba+
iSCSI server. What is missing a bootable image what I can put on iSCSI
server.

Mybe I don't understand many things, like exact booting from PXE, CD,
HDD, floppy. It is very complex for me. I know just very few things about them.

Quinn Plattel

unread,
Jan 17, 2012, 8:24:04 AM1/17/12
to gpxe
Check your image file - I don't think it is a raw image.  If you use linux, you can see if it is a raw image by using the disktype command. "disktype <imagefile>".
iSCSI cannot deal with any other image types except raw.

Quinn Plattel

unread,
Jan 17, 2012, 8:26:26 AM1/17/12
to gp...@etherboot.org
Don't give up. :-)  It took me a long time too to understand iscsi but it is great once you have a working setup.

br,
Quinn

Ruzsinszky Attila

unread,
Jan 17, 2012, 8:34:17 AM1/17/12
to gp...@etherboot.org
> Don't give up. :-)  It took me a long time too to understand iscsi but it is
> great once you have a working setup.
OK.

Reverse our think.
If I've got a working FreeDOS HDD (from a virtual machine) and I can mount
it under linux and I use dd and put on that image on an iSCSI server does it
have to boot?
Or do I have to prepare it somehow before I put on iSCSI?

Quinn Plattel

unread,
Jan 17, 2012, 8:38:02 AM1/17/12
to gpxe
If you use qemu, qcow is the default image format which is not raw.
If you use VirtualBox, vdi is the default image format which  is also not raw.
The easiest is to use dd "dd if=/dev/zero of=image.bin bs=1M count=0 seek=40" to create a raw image and then use qemu to populate the image "qemu -hda image.bin -cdrom freedos.iso".
After install, copy the image.bin file to your iscsi target and edit /etc/iet/ietd.conf to point to that image.

br,
Quinn

On Tue, Jan 17, 2012 at 2:30 PM, Ruzsinszky Attila <ruzsinsz...@gmail.com> wrote:
> Check your image file - I don't think it is a raw image.  If you use linux,
> you can see if it is a raw image by using the disktype command. "disktype
> <imagefile>".
Under FreeNAS there isn't disktype.


> iSCSI cannot deal with any other image types except raw.
What does it mean 'raw' exactly? No partition table? Or what?
I created a full of zero file with dd.
Fdisked it.
Formatted it (msdos)
Makebootfatted.
Copied some FDOS files.

So I really confused.
Are those steps correct in theoretically?

TIA,
Ruzsi

Ruzsinszky Attila

unread,
Jan 17, 2012, 8:42:24 AM1/17/12
to gp...@etherboot.org
> If you use qemu, qcow is the default image format which is not raw.
> If you use VirtualBox, vdi is the default image format which  is also not
> raw.
OK, Now I understand.

> The easiest is to use dd "dd if=/dev/zero of=image.bin bs=1M count=0
> seek=40" to create a raw image and then use qemu to populate the image "qemu

I did it.

> -hda image.bin -cdrom freedos.iso".

It is a good idea making the image under qemu. If it is working ...

> After install, copy the image.bin file to your iscsi target and edit
> /etc/iet/ietd.conf to point to that image.

I'll do it.

Quinn Plattel

unread,
Jan 17, 2012, 8:43:30 AM1/17/12
to gpxe
If you used dd and you can mount it "sudo mount -o loop,offset=$((512*63)) image.bin <dir>" and also boot it with qemu, then it should just work with iscsi.
You do need a partition table with an active partition - freedos should do that for you when installing.

Quinn

Ruzsinszky Attila

unread,
Jan 17, 2012, 8:49:20 AM1/17/12
to gp...@etherboot.org
>>and then use qemu to populate the image "qemu
>> -hda image.bin -cdrom freedos.iso".
I don't understand why didn't work with sanboot.
The fdisk+format (maybe) were successfull. Even the
result was: Invalid Operating System. I know the setup hadn't
finished but what changed at the 2nd boot what resulted
Inv. OS message.

I'd like to understand ...
Maybe am I too stupid? ;-)

Reply all
Reply to author
Forward
0 new messages