Jump to content











Photo
- - - - -

Chainloading AUTOEXEC/COMMAND.COM?


  • Please log in to reply
36 replies to this topic

#26 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 29 July 2010 - 12:34 PM

Ooops, must have missed that in my reading....


No prob :), missing point is now only the actual tests (by delicatepc) on the machines that do have problems.
To sum up, in Qemu almost anything works:
  • the diagnostic seem to work if loaded by DOS 7.1
  • the image (both .img and .iso) works in grub4dos as a mapped image
  • the .bss chainloading works from both Syslinux and grub4dos

The only thing that didn't work was to restore the original bootsector after having SYSed the drive with DOS 7.1, which means that Icecube is right the placement of the system files is important, since grub4dos does not "recognize" the DELLBIO.BIN as valid chainloadable kernel, direct chainloading is also not possible.

:cheers:
Wonko

#27 geneC

geneC

    Newbie

  • Members
  • 12 posts
  •  
    United States

Posted 01 August 2010 - 04:45 PM

Alright, with some help and advice from Icecube :dubbio:, I've been able to tweak chain.c32 to chainload DELLBIO.BIN properly and I will be posting the patch for HPA to review shortly.

@delicatepc
What's your results with using Syslinux 4.02 and memdisk with int, raw, or bigraw? I was able to get those working on an E6400 I have at work.

#28 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 03 August 2010 - 03:54 AM

I build a webpage to which you can upload a DELL Diagnostics hard disk image.
It will install Syslinux to the image and it will add gCumm's chain.c32.
It will boot DELLBIO.BIN like this:
LABEL 1

COM32 chain.c32

APPEND swap drmk=dellbio.bin
Please test as many different DELL Recovery images as possible (they don't always have the same DELBIO.BIN file).
http://ubcdcreator.s...s/delldiags.php

#29 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 August 2010 - 08:34 AM

Can't you just list the steps involved?

That would help us understand. :D

I mean why can't it be made locally?

:D
Wonko

#30 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 03 August 2010 - 11:12 AM

It is a small variation on the instructions in my post #18.

Create a hard disk image for the DELL Diagnostics with the exe from DELL.

In Linux, you can create a DELL Diagnostics image with Syslinux and chain.c32 (which can load DELLBIO.BIN) with the following commands:

First you need to figure out at which sector the first partition begins in you image. The first partition starts at sector 32 or 63 for the images I have seen:

$ file ./dell-syslinux/diags-syslinux.img
./dell-syslinux/diags-syslinux.img: x86 boot sector; partition 1: ID=0x4, active, starthead 1, startsector 63, 9009 sectors, code offset 0xfc

If you have an image with another value for startsector, change "63" in the following commands to that number.

Save the partition boot sector of the diags.img disk image, if you want to have the option to boot the original boot sector too (in case chainloading DELLBIO.BIN doesn't work with chain.c32):
dd if=/dell-syslinux/diags-syslinux.img of=/dell-syslinux/dell.bss skip=63 bs=512 count=1
Install Syslinux to the first parition inside the diags.img hard disk image:
./syslinux-4.02/mtools/syslinux --install --offset $((512*63)) ./dell-syslinux/diags-syslinux.img
"--offset" isn't supported in the windows version of the installer, so you need to get syslinux installed to the first partition of the hard disk image in another way. You can do that in a VM, or maybe in combination with imdisk.

Create or edit the file .mtoolsrc for manipulating the hard disk image with mtools:
drive x: file="/home/icecube/dell-syslinux/diags-syslinux.img" partition=1
Create a syslinux.cfg file:
DEFAULT 1

TIMEOUT 100

PROMPT 1



SAY 1) Boot DELL Diagnostics with chain.c32 (default: 10 seconds)

SAY 2) Boot DELL Diagnostics with original boot sector



LABEL 1

COM32 chain.c32

APPEND swap drmk=dellbio.bin



LABEL 2

COM32 chain.c32

APPEND swap file=dell.bss
Copy all needed files (chain.c32, syslinux.cfg and dell.bss) inside the disk image with mtools:
mcopy ./dell-syslinux/chain.c32 x:CHAIN.C32

mcopy ./dell-syslinux/syslinux.cfg x:SYSLINUX.CFG

mcopy ./dell-syslinux/dell.bss x:DELL.BSS
Get chain.c32 from: http://ubcdcreator.s...diags/chain.c32 (until the next Syslinux build comes out.

You can also add a Syslinux MBR to the image (not necessary):
dd if=./syslinux-4.02/mbr/mbr.bin of=./dell-syslinux/diags-syslinux.img conv=notrunc
In Windows, you can copy the files (chain.c32, syslinux.cfg and dell.bss) to the partition, when you mount the first partition of the image with imdisk.

Edit: fixed some mistakes.

#31 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 August 2010 - 11:53 AM

I don't get where from comes the DELL.BSS file. :unsure:
Is it the diags.bss renamed?


Also, I seem to understand that this is to modify the actual disk image so that it boots with Syslinux. :D


But wasn't the original question more or less:
"How to add any number of DELL diagnostics .img or .iso so that they can be assempled in a multiboot USB stick (like through memdisk or grub4dos mapping)?"
:D

:D
Wonko

#32 geneC

geneC

    Newbie

  • Members
  • 12 posts
  •  
    United States

Posted 03 August 2010 - 01:35 PM

dd if=/dell-syslinux/diags-syslinux.img of=/dell-syslinux/diags.bss skip=63 bs=512 count=1

./syslinux-4.02/mtools/syslinux --install --offset 32256 ./dell-syslinux/diags-syslinux.img


Except that the HDD images I extracted from the CDs of Diags versions 1265, 1280, and 1295 are all at sector 32 not 63 (the number of sectors per track). Any of the following will show you:

sfdisk -G _IMAGE_

fdisk -l _IMAGE_

The sfdisk command will be more concise and only show geometry from the partition table.

#33 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 03 August 2010 - 06:18 PM

I don't get where from comes the DELL.BSS file. :D
Is it the diags.bss renamed?

Fixed in my previous post (some copy/paste/replace problem).

Also, I seem to understand that this is to modify the actual disk image so that it boots with Syslinux. :o

Yes, it modifies the orignal image.
It is meant to be used to test if the patched chain.c32 can chainload DELLBIO.BIN correctly in all DELL Diagnostics images. If that works fine, chain.c32 can be used for chainloading DELLBIO.BIN from USB. But you better first test it in the original images.

@ gCumm
My script did handle those cases well. But we now know that it is due to a bug in syslinux + DELL images that it won't work atm.
Added the instructions to my previous post for clarity.

Note: Hard disk images of DELL Diagnostics with starting sector of 32, won't work at the moment with the online version (bug in mtools installer of syslinux and/or invalid FAT16 partitions of the image). The bug is been tracked down atm.

#34 geneC

geneC

    Newbie

  • Members
  • 12 posts
  •  
    United States

Posted 03 August 2010 - 09:10 PM

Note: Hard disk images of DELL Diagnostics with starting sector of 32, won't work at the moment with the online version (bug in mtools installer of syslinux and/or invalid FAT16 partitions of the image). The bug is been tracked down atm.


Tracked down. Apparently, the image was incorrectly created and is "corrupt" (too many clusters for the FAT). At the same time, there was a bug in both mtools/syslinux and libfat. Patches submitted upstream.

Trying to work on a resolution for the "corrupt" image still.

#35 geneC

geneC

    Newbie

  • Members
  • 12 posts
  •  
    United States

Posted 05 August 2010 - 04:44 PM

Trying to work on a resolution for the "corrupt" image still.


Done. Twice, even. I made a tweak to libfat that will allow it to work and made a tool that will correct the issue.

@IceCube: I've tested it for myself and both work. I've used dosfsck against the filesystem after making the fix and it's all good for my tests. :dubbio:

#36 delicatepc

delicatepc

    Member

  • Members
  • 42 posts
  •  
    United States

Posted 23 August 2010 - 03:49 PM

hi mates,

Looks like quite a bit has went on here since I last visited (last couple weeks of office have been hell :) )

It looks like there needs to be some testing that needs to be done with the trouble machines.

How can I help? I currently have a Dell E6400 that was having trouble with some of the diagnostic images but I do get to occasionally test out on other systems. Looked over the thread but im not exactly sure on the next step here.

Is there a new chainloading process we are attempting to test or are we looking to modify each and every Dell Diagnostics Package with a custom syslinux bootloader?

Apologies for anything i missed and the response delays,
dpc

My Dell menu listing looks like this:
#Dell Diagnostics Menu File



MENU INCLUDE /ubcd/menus/syslinux/defaults.cfg

UI /boot/syslinux/menu.c32



LABEL -

MENU LABEL ..

	COM32 /boot/syslinux/menu.c32

	APPEND /ubcd/menus/syslinux/main.cfg



LABEL -

MENU LABEL Dell Diagnostics CW1354A1

TEXT HELP

 Supports Inspiron 535MT/ST, 545MT/ST, 546MT/ST

 Latitude E4200/4300/5400/5500/6400/6500, D630, XT, XT2

 Optiplex 160/360/760/FX160/755

 Studio 1909/540/540s/140G,435MT, 435T/9000

 Vostro 1310/1320/1510/1520/1710/1720/2510/A840/A860,A90

ENDTEXT

	LINUX /boot/syslinux/memdisk

	INITRD /ubcd/dell/CW1354A1.img

	APPEND



LABEL -

MENU LABEL Dell Diagnostics CW1337A0

TEXT HELP

 Supports Inspiron 1420, 1525, 1526, 1720, 1721

 Latitude XT, D430, D530/1, D630/1, D830, E4200/4300/5400/5500/6400/6500

 Optiplex 330, 745, 775 - XPS M1330/M1530/M1730

 Precision 390, 490, 690, M2300/M2400/M4300/M4400/M6300 T5400/T7400

 Studio 1535, 1536, 1735

 Vostro 500/1000/1200/1310/1400/1500/1510/1700/1710/2510

ENDTEXT

	LINUX /boot/syslinux/memdisk

	INITRD /ubcd/dell/CW1337A0.img

	APPEND



LABEL -

MENU LABEL Dell Diagnostics CW1364A0

TEXT HELP

 Supports Dimension 1000

 Optiplex 360, 740, 760, 960

 Studio 1450

 Vostro 220, 220s, 420

ENDTEXT

	LINUX /boot/syslinux/memdisk

	INITRD /ubcd/dell/CW1364A0.img

	APPEND raw

	

LABEL -

MENU LABEL Dell Diagnostics CW1374A0

TEXT HELP

 Supports Inspiron 300/400 (Zino/HD), 580/S

 Latitude XT2, 2100, E4200/E4300/E5400/E5500/E6400/E6500

 Optiplex XE, 360, 380, 760, 780

 Precision R5400, T5500, M2400/M4400/M6400,M6500

 Vostro 1014, 1088, 1220, 1320, 1520, 1720, V13 

ENDTEXT

	LINUX /boot/syslinux/memdisk

	INITRD /ubcd/dell/CW1374A0.img

	APPEND

	

LABEL -

MENU LABEL Dell Diagnostics CW1349A2 (NEW - NOT MERGED YET)

TEXT HELP

 Supports Inspiron 535MT/ST, 545MT/ST, 546MT/ST

 Latitude XT, XT2, 2100, E4200/E4300/E5400/E5500/E6400/E6500, D630 XFR

 Optiplex 160, FX160, 360, 755, 760 

 Studio 1909, 540, Slim 540s, 140G, XPS 435MT, 435T/9000

 Vostro 1310, 1320, 1510, 1520, 1710, 1720, 2510, A840, A860, A90

ENDTEXT

	LINUX /boot/syslinux/memdisk

	INITRD /ubcd/dell/CW1349A2.img

	APPEND raw


#37 geneC

geneC

    Newbie

  • Members
  • 12 posts
  •  
    United States

Posted 23 August 2010 - 04:20 PM

hi mates,

Looks like quite a bit has went on here since I last visited (last couple weeks of office have been hell :) )


Sorry to hear.

It looks like there needs to be some testing that needs to be done with the trouble machines.

How can I help? I currently have a Dell E6400 that was having trouble with some of the diagnostic images but I do get to occasionally test out on other systems. Looked over the thread but im not exactly sure on the next step here.

Is there a new chainloading process we are attempting to test or are we looking to modify each and every Dell Diagnostics Package with a custom syslinux bootloader?


Well, I think there were two things going on.

1) At first, you were trying memdisk to load the HDD images. I'm uncertain on the status of this as I haven't tested it yet. Have you tried using Syslinux 4.02 for this yet? (MEMDISK of course with SYSLINUX if FAT or ISOLINUX if CD)

2) The discussion on chainloading DRMK (specifically the dellbio.bin file) from a FAT formatted image (ie USB thumb drive) using SYSLINUX and chain.c32. For this, I've been successful so far and the patches have been submitted upstream but I still need to pull out an E6400 and test it.

Apologies for anything i missed and the response delays,
dpc

My Dell menu listing looks like this:


1) LABEL statements should be unique. They are intended to be used on the command line. I also recommend sticking to lower case letters, numbers, hyphen and underscore (easier to type). Something simple like "prevmenu", "cw1354a1", etc is advisable.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users