Modified BOOTCD.IMG with XP recovery disk on USB drive?

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby jimhabegger » Sun May 06, 2012 2:01 pm

Toshiba Satellite A45-S150
XP SP3
Toshiba Recovery and Applications/Drivers DVD (Installs XP SP1)
no floppy drive
non-working internal DVD drive
diy USB DVD drive, TSSTcorp TS-L633C

The BIOS does not support booting from a USB device, and I don't know when I'll have money to replace the internal DVD drive.

Hypothetical situation: XP stops working, but the MBR, boot.ini, and my grub2 loader still work.

Question: How can I modify BOOTCD.IMG from the Recovery DVD, to be able to re-install the system, in the hypothetical situation above?

Background:
My internal DVD drive has died, and I bought a USB DVD drive, partly for the price and some conveniences, but mainly because the internal drive on my wife's laptop has died also, and I wanted it for both of us. The question of booting from it didn't even cross my mind at the time. Recently I've been wanting to switch to a more civilized OS like Debian or Ubuntu, but I want to be able to restore my XP system in case anything goes wrong.

If the MBR, or anything else required to get to my grub2 loader, is corrupted, the only way I see to restore the system is a net install. On the other hande, from my research so far, I have an idea that if I can still get to my grub2 loader, and my memdisk and modified BOOTCD.IMG from the recovery disk are still intact, I can boot from the USB DVD drive using those. The question is what drivers to use, and what to add where to the config.sys and autoexec.bat on the image.

I followed some booting trails through all kinds of twists and turns, for days, before I even had any idea what I was looking for. As I understand it now, I'm looking for DOS USB drivers. I might not need any special drivers for the DVD drive itself. At first I thought I had to have USB2 drivers, because all my USB ports work with USB2, but as I understand it now (thanks to Bret), they will also work with UHCI drivers.

All the trails I've found lead to DUSE (from Cypress), USBASPI (from Panasonic and Iomega), DI1000DD (from Novac), and Bret's drivers. I would rather use Bret's drivers, because I'm not sure about the legality of using the other ones, and I'm really finicky about that, but it looks like I will need to spend a few more hours studying the docs to find out how to use them.
jimhabegger
 
Posts: 5
Joined: Sun May 06, 2012 1:46 pm

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby Bret » Tue May 08, 2012 2:55 am

jimhabegger wrote:The BIOS does not support booting from a USB device, and I don't know when I'll have money to replace the internal DVD drive.

Hypothetical situation: XP stops working, but the MBR, boot.ini, and my grub2 loader still work.

Question: How can I modify BOOTCD.IMG from the Recovery DVD, to be able to re-install the system, in the hypothetical situation above?


I'm not sure my drivers will be able to help you much with this, at least directly. The drivers are indeed DOS drivers, but don't help with booting -- they are only used after the computer has already booted (to DOS). In some cases, they can help you create a bootable disk (a USB flash drive or external hard drive) by allowing you to modify the appropriate boot-related sector(s) and copying the appropriate boot-related files to the disk. But, they don't allow you to boot from a USB disk if the BIOS doesn't support it.

In addition, the drivers currently do not support CDs or DVDs -- only flash drives, hard drives, and floppies. A future version will include such support, but the current version does not. However, there are utilities floating around that will let you boot from a USB flash drive or hard drive and load an .ISO image into memory, which allows you to indirectly load a CD/DVD image with a multi-step process. This is the way the FreeDOS installation disks currently work.

I think your best bet may be to install a multi-boot loader, and have both XP and at least one other OS (DOS and/or *nix) on the same machine. If XP gets corrupted for some reason, you can boot to the other OS and may be able to get things straightened out. The advantage of DOS over *nix is that you would only need a very small partition to boot and store a few utilities, but *nix in general has a better selection of modern utilities to pick from for this kind of thing. There are some free multi-boot loaders around, but I personally use a commercial program called BootIt.

As an FYI, one of the big advantages of my DOS drivers over the others is that it is extensible and can be used to create drivers for any type of USB device, not just disks. Most BIOS's will support some subset of USB disks, mice, and keyboards (some BIOS's support all of those, some none, and some only one or two of them). DOS drivers like USBASPI only support disks. If all you care about are USB disks, then you actually have lots of options, and my drivers probably aren't even the best choice. If you care about keyboards and mice and printers and joysticks and ..., and want them to be hot-pluggable, my drivers are your only viable option in DOS.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby jimhabegger » Tue May 08, 2012 3:38 pm

:D Bret, thank you for the information and ideas!

Actually I'm doing this more for my education than for my hypothetical situation. If my XP stops working before I find the money to buy a new internal drive, I imagine that's when I'll find the money!

I already have Ubuntu on another partition, so that option would already be available to me in my hypothetical situation. Before I experiment with other DOS drivers, I want try to find a way to use yours, because I like your project, and because the legality of using your drivers looks less questionable to me than using the others I've seen.

I've been able to start the boot process using grub2, memdisk, and BOOTCD.IMG from the Toshiba recovery disk. Of course it fails to find the USB DVD, and drops into a Windows 98 DOS command line.

I've studied your documentation, and I'm a long way from understanding everything, but I see a possibility of using your USBUHCI to enable the USB, and David Woodhouse's DEVLOAD to load the CD-ROM driver from the recovery disk, after the USB is enabled. Is that possible, or does the CD-ROM driver have to be written specifically for your USB driver?

If that's possible, then the next question is whether the driver from the recovery disk will work with my external drive.
When a customer loads a TOSHIBA internal CD-ROM on his system and wishes
to access the CD-ROM driver from DOS, it is important to note the CD-ROM's speed
with the proper driver. Toshiba calls all it's CD-ROM DOS drivers TOSCDROM.SYS.
The only way to check for the correct driver is to note it's size and date.

Internal: Toshiba DVD-ROM SD-R2412: 8X

USB: TSSTcorp DVD+-RW TS-L633C: 8X

I was able to boot to the recovery disk from the SD-R2412 when it was working, so the driver should be good for the TS-L633C. Just in case, I downloaded some other CD-ROM driver for laptops from Toshiba.
jimhabegger
 
Posts: 5
Joined: Sun May 06, 2012 1:46 pm

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby Bret » Wed May 09, 2012 2:55 am

jimhabegger wrote:Actually I'm doing this more for my education than for my hypothetical situation. If my XP stops working before I find the money to buy a new internal drive, I imagine that's when I'll find the money!


At least if you can't find a way to use the external drive somehow. ;)

jimhabegger wrote:Before I experiment with other DOS drivers, I want try to find a way to use yours, because I like your project, and because the legality of using your drivers looks less questionable to me than using the others I've seen.


All of the others I've seen are indeed questionable in terms of legality, though from a purely practical standpoint I don't think you would ever have any issues. From a purely technical perspective, I think mine are far superior to any of the others (like hot-plugging), though mine are still a long ways from being complete.

jimhabegger wrote:I've studied your documentation, and I'm a long way from understanding everything, but I see a possibility of using your USBUHCI to enable the USB, and David Woodhouse's DEVLOAD to load the CD-ROM driver from the recovery disk, after the USB is enabled. Is that possible, or does the CD-ROM driver have to be written specifically for your USB driver?


It requires a USB-specific driver. Loading a CD or DVD in DOS usually requires two separate programs: a low-level, hardware-specific driver (like TOSCDROM.SYS), and then a separate program that converts that into a DOS drive letter (MSCDEX or one if its many clones, like SHSUCDX). The TOSCDROM.SYS will probably only work with a disk attached through an ATA/IDE bus, and won't work with one attached through a USB bus. The hardware protocols are completely different.

I think there are some "legally questionable" drivers out there that will let you use a USB CD/DVD from DOS, though I've never tried any of them myself so am not even sure what they are called (I think one combination might be USBASPI.SYS & USBCDROM.SYS, but am not positive about that). There will eventually be a CD/DVD driver for my drivers also, but nothing yet. When the driver finally exists, it should (at least theoretically) work with almost any USB CD/DVD from any manufacturer -- it won't be specific to Toshiba or anybody else.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby jimhabegger » Wed May 09, 2012 4:15 am

I think I get it now. There's no way to use a USB DVD drive without a driver written for USB.

I think I have a pretty complete collection now of all the drivers that might work. I might have every version there ever was of usbaspi, di1000dd, and duse. If I decide to use them, I might go so far as to try to get permission.

My next experiment will be to copy all the files from the recovery disk to a flash drive, boot into my floppy image, and try to start the install/recovery console from there. It looks like this is all I will need to do:

usbuhci
usbdrive
(set paths after I verify the drive letter)
install.exe

(later)

It seems to have found the flash drive, but when I tried to list the contents, it said it wasn't ready.

Here are the status reports:

Code: Select all
USBDRIVE 0.18, (C) 2007-2009, Bret E. Johnson.
DOS Driver for up to 8 SCSI-compatible USB Mass Storage Devices.


Initialization Delay: 0 seconds
DOS Version:          7.10
Max Bytes per Sector:  512
Mount FAT32 Volumes:   Yes
Max Sectors per Xfer:    1


   USB INFO                       DISK/LUN                        DOS DRIVE
   ÍÍÍÍÍÍÍÍÍ  ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ  ÍÍÍÍÍÍÍÍÍÍÍ
I                  R W                                          D
n  H   A  I    INT m r                                          r
d  o   d  n  L 13h v P            Sect Byte                     i
e  s   d  t  U Dsk M r Num   Num  Per  Per    Total    Approx   v   Approx
x  t   r  f  N Num d t Head  Cyl  Cyl  Sect  Sectors  Capacity  e  Capacity
ÄÄ ÄÄ ÄÄÄ ÄÄ  Ä ÄÄÄ Ä Ä ÄÄÄÄ ÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ  ÄÄ ÄÄÄÄÄÄÄÄ
0  0   3  0  0 81h . .  255   975   63  512 00EF1800h  8022 MB 

Unused USB Dvc/Intf Indexes: 1-3
Unused INT 13h Disk Numbers: 82h-88h
Unused DOS Drive Letters:    E:-L:

Resident USBDRIVE has been updated with new information.

Code: Select all
USBDRIVE 0.18, (C) 2007-2009, Bret E. Johnson.
DOS Driver for up to 8 SCSI-compatible USB Mass Storage Devices.

D
r  INT
i  13h            Partition                       Byte
v  Dsk ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ   Boot    Per    Total    Approx
e  Num  Sector   Idx        Type         Sector   Sect  Sectors  Capacity
ÄÄ ÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄ

Unused DOS Drive Letters:    E:-L:

Resident USBDRIVE has been updated with new information.

Code: Select all
USBDRIVE 0.18, (C) 2007-2009, Bret E. Johnson.
DOS Driver for up to 8 SCSI-compatible USB Mass Storage Devices.

  INQUIRY RESPONSES FROM COMPATIBLE SCSI DISKS
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

DSK                                 ANSI    DATA
NUM  VENDOR      PRODUCT      REV  VERSION FORMAT
ÄÄÄ ÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ ÄÄÄÄÄÄÄ ÄÄÄÄÄÄ
81h Teclast  CoolFlash        1.00 SCSI-2  SCSI-2
jimhabegger
 
Posts: 5
Joined: Sun May 06, 2012 1:46 pm

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby Bret » Thu May 10, 2012 4:39 am

Are you sure the disk is formatted in FAT12, FAT16, or FAT32, and not NTFS or some other "foreign" format? USBDRIVE won't automatically mount non-FAT drives, since DOS can't read them directly.

Do a "USBDRIVE F" to show you the internal buffers of USBDRIVE -- that may tell us what's wrong, if you're sure it's formatted in FAT.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby jimhabegger » Sat May 12, 2012 12:30 pm

>usbdrive F

Code: Select all
USBDRIVE 0.18, (C) 2007-2009, Bret E. Johnson.
DOS Driver for up to 8 SCSI-compatible USB Mass Storage Devices.

                 CONTENTS OF INQUIRY BUFFER
ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ   ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000  00 80 02 02 1F 00 00 00-54 65 63 6C 61 73 74 20    €      Teclast
0010  43 6F 6F 6C 46 6C 61 73-68 20 20 20 20 20 20 20   CoolFlash       
0020  31 2E 30 30                                       1.00


             CONTENTS OF FORMAT CAPACITY BUFFER
ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ   ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000  00 00 00 08 00 EF 18 00-00 00 02 00 00 00 00 00        ï         
0010  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0030  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0050  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0070  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0080  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00F0  00 00 00 00 00 00 00 00-00 00 00 00                           


                CONTENTS OF CAPACITY BUFFER
ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ   ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000  00 EF 17 FF 00 00 02 00                            ï ÿ   


               CONTENTS OF MODE SENSE BUFFER
ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ   ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000  03 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0010  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0030  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0050  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0070  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0080  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   


           CONTENTS OF SECTOR (00000000h) BUFFER
ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ   ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
0000  01 00 0B FE FF CE 3F 00-00 00 D0 00 EF 00 00 00      þÿÎ?   Ð ï   
0010  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0030  00 00 00 00 00 00 00 00-00 00 00 00 00 00 55 AA                 Uª
0040  55 53 42 53 00 00 00 00-00 02 00 00 00 00 00 00   USBS           
0050  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0070  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0080  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
00F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0100  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0110  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0120  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0130  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0140  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0150  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0160  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0170  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0180  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
0190  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
01A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
01B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
01C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
01D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
01E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   
01F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00                   


Resident USBDRIVE has been updated with new information.


I checked the properties in Windows, and it says it's FAT32.

I tried another 8G flash drive, and it got a drive letter, so maybe this one is flaky.

(later)
Success!
I tried a different flash drive. I copied the startup files from the Toshiba recovery disk to the flash drive, and used grub2, memdisk and the boot floppy image from the recovery disk to boot into the Windows 98 Dos 7.01 command line. I started usbuhci and usbdrive, and I was able to run the Toshiba startup program from the flash drive.

I'm satisfied now that in my hypothetical situation, re-install my XP system from a copy of the Toshiba recovery disk files on a flash drive, using your drivers to access the flash drive. I'm glad because I didn't want to get into a legal limbo with the other drivers. I actually started writing to the companies to ask for permission.

I will try the trial version of DOSUSB though, just for my education.
jimhabegger
 
Posts: 5
Joined: Sun May 06, 2012 1:46 pm

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby Bret » Sun May 13, 2012 2:48 am

Congratulations! It's good to try some different things, even if it is just for educational purposes. Expanding your horizons by learning new things you didn't know before is never a bad thing.

The Teclast drive is indeed "flaky". This is indicated by the "USBS" that is in the last buffer -- that shouldn't be there. I'm working on new versions of all the drivers, and hopefully the new version of USBDRIVE will fix this problem and work with your Teclast disk. I'm working on a new version of USBDRIVE now that should fix this, and also will work with disks formatted with GPT partitions (the new thing that's replacing MBR partitions), disks with 4k sectors (many new large disks, especially if they're bigger than 2 TB, have those), 64-bit LBA (also for really large disks), and CD/DVD drives. The new drivers can also use less memory than the existing drivers, at least in certain situations.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Modified BOOTCD.IMG with XP recovery disk on USB drive?

Postby jimhabegger » Sun May 13, 2012 1:12 pm

Actually both of the 8G drives are flaky. The one that works with usbdrive seems to be a 1.3GB drive rigged up to look like 8GB to the system. It pretends to write past 1.3GB, but when I eject it and put it back in, I see that some files have been deleted to make room for the new ones. No matter how much it appears to be writing, when I run Windirstat on it, the total is never more than 1.3GB.

As I understand it now, anything I would want to do on this laptop with a bootable CD or DVD, I can do by copying all the files from the CD or DVD onto a flash drive, as long as I can boot into a floppy image with the right DOS and drivers.
jimhabegger
 
Posts: 5
Joined: Sun May 06, 2012 1:46 pm


Return to Programs

Who is online

Users browsing this forum: No registered users and 2 guests

cron