Jump to content











Photo
- - - - -

Issue with launching floppy image from grub4dos chainload


  • Please log in to reply
26 replies to this topic

#1 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 16 December 2012 - 09:14 PM

I have a .img floppy image - Eurosoft's Pc-Check Hardware Diagnostics Program.

 

I am using SARDU to create a mulitboot DVD and want to add the above program to the main menu.

 

I have tried using MEMDISK to launch the floppy but for some reason the image wont boot for the program to launch.  I know that my code in the .cfg is correct as I can launch other .img files successfully.

 

So... I tried making a grub4dos USB build to launch the floppy image and it works :-)

 

But for my purposes I need to use a DVD so I have tried to chainload grub4dos from the isolinux.cfg

 

My isolinux.cfg file reads:

 

 

LABEL pccheck
MENU LABEL pccheck
BOOT /grldr

 

 

 

I have copied the grldr, menu.lst & floppy image files to the root folder of my DVD build

 

My menu.list file reads:

 

 

title pccheck
find --set-root /pccheck.img
map /pccheck.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1

 

 

 

I then built my ISO (to be burnt to DVD) and tested it in QEMU.  The grub4dos menu chainloads successfully but when I attempt to launch the Pc-Check program the following error appears in QEMU:

 

 

Booting pccheck

 

find --set-root /pccheck.img

 

Error: 15: File not found

 

Press any key to continue...

 

 

This doesn't make any sense at all to me as the filepath is all correct.  I have been reading grub4dos tutuorials and the syslinux.org tutorials for several hours trying to figure out why MEMDISK doesn't work and why my chainload isn't working either.  I have tried my best to solve this myself but can't so I am hoping someone here can help me out please?

 

EDIT:  I intend to set the timeout on the menu.list to 0 so that the program will start automatically from the isolinux.cfg


Edited by TheFog, 16 December 2012 - 09:19 PM.


#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 16 December 2012 - 10:47 PM

set the timeout to 5 and then press C to get to the grub4dos command prompt. Then type   

ls /

and 

find

then

cdrom --init

find

 

and report back...



#3 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 16 December 2012 - 11:02 PM

Thanks Steve.  I found your grub4dos tutorial on your website very helpful and used your code to make my menu.lst file.

 

I have followed your advice and after typing in the final "find" command QEMU reads:

 

grub> _



#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 16 December 2012 - 11:54 PM

weird. I have seen strange behaviour when you chainload grldr from isolinux/syslinux. Why not just make a grub4dos ISO rather than a isolinux ISO?



#5 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 17 December 2012 - 12:00 AM

I have a .img floppy image - Eurosoft's Pc-Check Hardware Diagnostics Program.
 
I am using SARDU to create a mulitboot DVD and want to add the above program to the main menu.
 
I have tried using MEMDISK to launch the floppy but for some reason the image wont boot for the program to launch.  I know that my code in the .cfg is correct as I can launch other .img files successfully.
MEMDISK accepts the raw, bigraw, int and safeint arguments. Did you try any of those?

So... I tried making a grub4dos USB build to launch the floppy image and it works :-)
 
But for my purposes I need to use a DVD so I have tried to chainload grub4dos from the isolinux.cfg
 
My isolinux.cfg file reads:

LABEL pccheck
MENU LABEL pccheck
BOOT /grldr


BOOT is usually used for a 512-byte file. Instead, you might try:
LABEL pccheck
  MENU LABEL PC Check (via GRUB4DOS)
  KERNEL grub.exe
But hopefully one of the MEMDISK options works for you.

#6 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 17 December 2012 - 01:01 AM

weird. I have seen strange behaviour when you chainload grldr from isolinux/syslinux. Why not just make a grub4dos ISO rather than a isolinux ISO?

 

Even as a noob I thought that this was weird.  Unfortunately programming my menu with all images is going to be too tough for me I think as I was a complete noob to all this about a month ago.

 

 

MEMDISK accepts the raw, bigraw, int and safeint arguments. Did you try any of those?

BOOT is usually used for a 512-byte file. Instead, you might try:

LABEL pccheck
  MENU LABEL PC Check (via GRUB4DOS)
  KERNEL grub.exe
But hopefully one of the MEMDISK options works for you.

 

Thanks Sha0.  I have used all memdisk arguments and it still won't boot.  Also your chainloader tip just leads to the grub command prompt.



#7 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 17 December 2012 - 03:34 AM

Thanks Sha0.  I have used all memdisk arguments and it still won't boot.  Also your chainloader tip just leads to the grub command prompt.
That would seem to indicate that your grub.exe is choosing not to find the menu.lst file. You can override that behaviour:
LABEL pccheck
  MENU LABEL PC Check (via GRUB4DOS)
  KERNEL grub.exe
  APPEND --config-file="find --set-root /menu.lst; configfile /menu.lst"


#8 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 17 December 2012 - 07:46 AM

@Sha0

>>> find --set-root menu.lst

it is wrong. it should be:

 

find --set-root /menu.lst

  • Sha0 likes this

#9 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 17 December 2012 - 08:20 AM

That would seem to indicate that your grub.exe is choosing not to find the menu.lst file. You can override that behaviour:

LABEL pccheck
  MENU LABEL PC Check (via GRUB4DOS)
  KERNEL grub.exe
  APPEND --config-file="find --set-root /menu.lst; configfile /menu.lst"

 

Once again, thanks! Unfortunately it just leads to the grub command prompt again.



#10 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 17 December 2012 - 09:48 AM

If find does not list any devices even after cdrom --init command, try 

map (                       (and then hit the TAB key to get a list of possible devices).

 

have you tried a real system (IDE or SATA?) as well as QEMU to test the ISO with?



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 17 December 2012 - 11:23 AM

Hey guys, let's start from the beginning, OK? :)

The PC-Check uses it's own "flavour" of DOS, particularly picky, that could well be the reason why memdisk is not working.

 

TheFog omitted some piece of info (needed).

How EXACTLY was the .iso made?

 

What is the output in QEMU, and once to the grub4dos command line of the following commands?

 

 



root (

 

[TAB]

 

Once root has been established to the right device (EXAMPLE):

 

 



root (cd)

[ENTER]

 

What is the output of:

 

 



ls

 

[ENTER]

 

is the wanted file listed?

Remember that on CDFS grub4dos is CaSe SeNsItIvE.

 

:cheers:

Wonko



#12 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 17 December 2012 - 06:14 PM

Thank you everyone for your advice and input, it is greatly appreciated.  I followed Wonko the Sane's final piece of advice and further progress has been made which I will elucidate to shortly.

 

steve6375

If find does not list any devices even after cdrom --init command, try 

map (                       (and then hit the TAB key to get a list of possible devices).

 

have you tried a real system (IDE or SATA?) as well as QEMU to test the ISO with?

 

Just to recapitulate; my ISOLINUX.CFG lines with respect to the floppy image and the whole of my MENU.LST are as follows

 

ISOLINUX.CFG:

 

LABEL pccheck
  MENU LABEL PC Check (via GRUB4DOS)
  KERNEL grub.exe
  APPEND --config-file="find --set-root /menu.lst; configfile /menu.lst"

 

 

MENU.LST:

 

timeout 10

title pccheck
find --set-root /PCCHECK.IMG
map /PCCHECK.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1

 

 

The grub4dos menu launches successfully from the isolinux menu.  Pressing the c key from the grub4dos menu and then typing the following commands produces the following results:

 

grub> find

  (cd)

 

grub> ls

 PCCHECK.IMG (as well as a bunch of other files found within the folder from the extracted sardu.iso)

 

Following Wonko the Sane's advice I renamed the floppy image from 'pccheck.img' to 'PCCHECK.IMG' as you can see above in the menu.lst file.  When I now attempt to launch the program from the grub4dos menu, instead of the file not found error I now receive:

 

 

  Booting pccheck

 

 (cd)

FAT12 BPB found with 0xEB (jmp) leading the boot sector.

 

probed C/H/S = 80/2/18, probed total sectors  = 2880

 

floppies_orig=0, harddrives_orig=0, floppies_curr=1, harddrives_curr=0

_

 

QEMU hangs at the static cursor and the program fails to launch.

 

 

Wonko the Sane

Hey guys, let's start from the beginning, OK? :)

The PC-Check uses it's own "flavour" of DOS, particularly picky, that could well be the reason why memdisk is not working.

 

OK :) I was going to post today that the company - Eurosoft - that created the program does use it's own custom DOS  (EuroDOS.sys)

 

 

Wonko the Sane

TheFog omitted some piece of info (needed).
How EXACTLY was the .iso made?

 

As I have mentioned I am using SARDU to make my multiboot DVD.  I didn't enable any of the default ISO's to be added to the SARDU build.  However I did add an extra ISO from the 'Extra' menu > Add Extra ISO (GRUB) so that when I built my ISO then grub.exe would be included in the final ISO build.  It is irelevant what this 'Extra ISO' is as it's purpose is to simply add grub.exe to the final ISO build.  From the built SARDU ISO I extracted all files. 

 

I then updated the isolinux.cfg file and copied into the folder my successful menu.lst file from the USB build that did work and also the PCCHECK.IMG floppy image.

 

I then used ImgBurn to rebuild the ISO from the extracted SARDU ISO folder.  From the Build menu I selected the default settings of:

 

Data Type:  MODE1/2048

File System:  ISO9660 + UDF     (I have also tried ISO9660 + Joliet)

 

From the Advanced > Bootable Disc > Options tab, I selected:

 

Make Image Bootable (tickbox ticked)

Emulation Type:  None (Custom)

Boot Image:  %extracted ISO folder% \ isolinux.bin

Patch Boot Information Table (tickbox ticked)

 

----

 

Oh, by the way, Steve I will be trying it to a burnt cd later to see if it works from there.


Edited by TheFog, 17 December 2012 - 06:16 PM.


#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 17 December 2012 - 07:00 PM

You don't want UDF, you want ISO9660 (and possibly Joliet) and more likely then not Rockridge and EXCLUSIVELY mkisofs should be used to make the .iso.

Not that IMGBURN is not a very good application, but with mkisofs you have better control on the settings.

I am sure Sha0 will be able to give you appropriate mkisofs parameters for use with Isolinux, cannot say if SARDU uses mkisofs to buid the CD, if it does, you might be lucky and get the proper switches using this:

http://reboot.pro/to...ting-iso-files/

 

The idea with grub4dos is to do tests in command line (interactive) mode, and later try to re-cap the hopefully successful experience into a menu.lst.

Get to command prompt.
Type:
find --set-root /PCCHECK.IMG

[ENTER]

root 

[ENTER]

map --mem /PCCHECK.IMG (fd0)

[ENTER]

map --hook

[ENTER]

 

Now you should be able to plainly root to the device:

root (fd0)

[ENTER]

and list it's contents:

ls

[ENTER]

 

now try:

chainloader +1

[ENTER]

 

do you have any error here?

 

then try:

boot

[ENTER]

 

It is well possible that Eurodos or it's bootsector don't like (like they seemingly don't like MEMDISK) the grub4dos mapping to memory, you can then try again with "direct mapping" (but this is what you were using and that failed :unsure:).

 

Since the .IMA (by convention floppy images use the .ima extension and partitioned images use the .IMG one, but of course you are perfectly free to give them *any* extension) is on a CD it should be contiguous.

There was another related topic here:

http://www.911cd.net...showtopic=23953

but it seems to me like OP there had not issues with Eurodos :dubbio:

 

 

:cheers:

Wonko



#14 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 17 December 2012 - 10:10 PM

You don't want UDF, you want ISO9660 (and possibly Joliet) and more likely then not Rockridge and EXCLUSIVELY mkisofs should be used to make the .iso.

Not that IMGBURN is not a very good application, but with mkisofs you have better control on the settings.

I am sure Sha0 will be able to give you appropriate mkisofs parameters for use with Isolinux, cannot say if SARDU uses mkisofs to buid the CD, if it does, you might be lucky and get the proper switches using this:

http://reboot.pro/to...ting-iso-files/

 

The idea with grub4dos is to do tests in command line (interactive) mode, and later try to re-cap the hopefully successful experience into a menu.lst.

Get to command prompt.
Type:
find --set-root /PCCHECK.IMG

[ENTER]

root 

[ENTER]

map --mem /PCCHECK.IMG (fd0)

[ENTER]

map --hook

[ENTER]

 

Now you should be able to plainly root to the device:

root (fd0)

[ENTER]

and list it's contents:

ls

[ENTER]

 

now try:

chainloader +1

[ENTER]

 

do you have any error here?

 

then try:

boot

[ENTER]

 

It is well possible that Eurodos or it's bootsector don't like (like they seemingly don't like MEMDISK) the grub4dos mapping to memory, you can then try again with "direct mapping" (but this is what you were using and that failed :unsure:).

 

Since the .IMA (by convention floppy images use the .ima extension and partitioned images use the .IMG one, but of course you are perfectly free to give them *any* extension) is on a CD it should be contiguous.

There was another related topic here:

http://www.911cd.net...showtopic=23953

but it seems to me like OP there had not issues with Eurodos :dubbio:

 

 

:cheers:

Wonko

 

Thanks a lot for the tips.  I did get to chainloader +1 without any errors but it just hangs at the cursor after BOOT.  With regards to the link my USB build works fine also, just won't work for an ISO.

 

I burnt the ISO as Steve suggested in case it was an issue with QEMU and still no joy.

 

I did an experiment and tried what Steve suggested and tried to run it straight from grub4dos instead of chainloading grub4dos from isolinux.  Same problem ):

 

I used HBCD customizer to extract the HBCD ISO.  I then updated the menu.lst with my code and added the floopy image and then used the customizer to rebuild the ISO using grub4dos as bootloader.



#15 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 17 December 2012 - 11:03 PM

Maybe you could chainload the bootloader file directly. You need to look for a .sys file in the EuroSoft image and then use

chainloader /xxxxxx.sys

instead of 

chainloader (fd0)+1

 

 

where xxxxx.sys is the file inside the image.



#16 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 17 December 2012 - 11:16 PM

Maybe you could chainload the bootloader file directly. You need to look for a .sys file in the EuroSoft image and then use

chainloader /xxxxxx.sys

instead of 

chainloader (fd0)+1

 

 

where xxxxx.sys is the file inside the image.

 

Yippee I have got the floppy program to load using grub4dos.  The ISO I made using the HBCD customizer had the incorrect filepath in the menu.lst

 

I did try chainloader /EuroDOS.sys and that didn't work using ImgBurn - I found that from your grub4dos tutorial.

 

The HBCD customizer does use mkisofs.exe to rebuild the ISO so I made an ISO with isolinux as bootlaoder and again I tried to chainload grub4dos but yet again it hangs at the boot command from a cd.  Strangely QEMU just crashes with this new ISO build using HBCD instead of ImgBurn.

 

I shall now try your chainloader tip with the HBCD ISO builder Steve instead of ImgBurn and see if that works..............



#17 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 18 December 2012 - 11:39 PM

I am sure Sha0 will be able to give you appropriate mkisofs parameters for use with Isolinux

 

The HBCD ISO creator uses these parameters below from the 'Make ISO' batch file.  I don't know if anyone can make any sense of it.  The HBCD ISO reacts differently to the ImgBurn ISO.  All of this is completely new to me...

 

"mkisofs.exe" -R -D -J -l -joliet-long -duplicates-once -o MyHBCD.iso -b HBCD/grldr -c HBCD/boot.cat -hide-joliet HBCD/boot.cat -hide HBCD/boot.cat -no-emul-boot -N -boot-info-table -V HirensBootCD  -boot-load-size 4 CD


Edited by TheFog, 18 December 2012 - 11:39 PM.


#18 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 19 December 2012 - 12:25 AM

The HBCD ISO creator uses these parameters below from the 'Make ISO' batch file. I don't know if anyone can make any sense of it. The HBCD ISO reacts differently to the ImgBurn ISO. All of this is completely new to me...

"mkisofs.exe" -R -D -J -l -joliet-long -duplicates-once -o MyHBCD.iso -b HBCD/grldr -c HBCD/boot.cat -hide-joliet HBCD/boot.cat -hide HBCD/boot.cat -no-emul-boot -N -boot-info-table -V HirensBootCD -boot-load-size 4 CD
This is quite topical for GRUB4DOS, as this mkisofs invocation produces a GRUB4DOS-booting .ISO.

For ISOLINUX, it'd be a bit different, and probably more appropriate in the Syslinux forum. (So no comment. ;) )

#19 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 19 December 2012 - 08:24 AM

This is quite topical for GRUB4DOS, as this mkisofs invocation produces a GRUB4DOS-booting .ISO.

For ISOLINUX, it'd be a bit different, and probably more appropriate in the Syslinux forum. (So no comment. ;) )

 

Well then all I can do is apologise for starting a thread in the wrong sub-forum.



#20 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 19 December 2012 - 08:57 AM

Well then all I can do is apologise for starting a thread in the wrong sub-forum.
Please: No apology. I was not complaining, nor even suggesting that this was in the wrong forum. As a matter of fact, I'd misread the very top and thought this was in the GRUB4DOS forum, so I was suggesting that it was in the correct forum as a GRUB4DOS-related subject. Sorry for the misunderstanding. :)

#21 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 19 December 2012 - 06:10 PM

No worries my friend! I did find it interesting that the batch file only had settings for grub4dos and not for isolinux even though the HBCD ISO builder gives the option to choose either grub4dos or isolinux as boot loader. It looks like I am going to have to use a grub4dos bootloader if I wish to include this program. Steve's tutorial on making a custom grub4dos menu is very comprehensive and I'm sure I can figure out any code I need to write for launching my tools (with maybe a little help from you guys if I hit any brick walls). I am very appreciative of all help so far.

#22 deaks

deaks

    Newbie

  • Advanced user
  • 22 posts
  •  
    United Kingdom

Posted 14 January 2013 - 01:59 PM

Hi Fog

 

Just seen that you got PC Check running from your bootdvd,  Im having the same problem that you had trying to get it work but mine if from a debian PXE boot server.  I was wondering if any chance you could tell me how you did it if you dont mine.

 

Regards

 

Deaks



#23 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 16 January 2013 - 11:30 PM

Hi Fog

 

Just seen that you got PC Check running from your bootdvd,  Im having the same problem that you had trying to get it work but mine if from a debian PXE boot server.  I was wondering if any chance you could tell me how you did it if you dont mine.

 

Regards

 

Deaks

 

I wanted to chainload grub4dos from isolinux but it doesn't work.   I had to boot it from grub4dos.  However, grub4dos successfully chainloads from syslinux to boot the floppy image



#24 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 17 January 2013 - 08:42 AM

I wanted to chainload grub4dos from isolinux but it doesn't work.   I had to boot it from grub4dos.  However, grub4dos successfully chainloads from syslinux to boot the floppy image

What do you mean "it doesn't work"?  GRUB4DOS should be possible to load and execute from ISOLINUX.  Do you have some observations to share?



#25 TheFog

TheFog

    Newbie

  • Members
  • 27 posts
  •  
    United Kingdom

Posted 17 January 2013 - 05:07 PM

What do you mean "it doesn't work"?  GRUB4DOS should be possible to load and execute from ISOLINUX.  Do you have some observations to share?


Sorry. What I meant to say was if I try to boot the floppy image chainloading grub4dos from isolinux on a DVD it fails to boot the floppy image, hence this thread.

The chainload does work though using syslinux and a pen drive.

Also Sha0 I haven't returned your pm yet for a reason but will do so in due course. Cheers!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users