Okay,
Here's the rough draft of the instructions for hacking the Compaq recovery
CD. Please let me know how it works out for anyone who tries it. I'll be
sending a copy today to Michael Rolig to incorporate into his site (
<http://linux-tablet-pc.dhs.org/> http://linux-tablet-pc.dhs.org/).
-Clay Risenhoover
Background:
The HP/Compaq TC1000 TabletPC comes with a factory recovery CD that restores
the hard drive to its "factory new" state. The problem for most Linux users
is that the recovery CD is destructive - it overwrites the entire hard
drive, including any Linux partitions on the drive.
While I have had good luck with NTFSresize on other Linux installations, it
wasn't doing what I needed when I decided to install Debian Linux 3.0 on my
TC1000. I decided that I would be better off partitioning the drive the way
that I wanted it - leaving free space at the beginning for my Windows XP
installation. In order to do this, I had to "fix" the recovery CD to install
just into the free space on the drive, rather than deleting all partitions
and overwriting the drive with one large partition.
The recovery CD uses a PowerQuest drive imaging program to restore a copy of
a drive image to the disk. The operation of this program is controlled by a
script in the "tools" directory called "qrestore.scr." This document
describes how I rebuilt the factory recovery CD with an edited qrestore.scr,
to install only into the first free space on the disk.
Prerequisites:
In order to follow this guide, you will need the following:
1. To have already partitioned the drive with whatever partitions are
desired for Linux. Leave free space (an area of the drive with no partitions
defined) for the Windows XP install, as the new CD will install into this
free space. You may install Linux before or after using the recovery CD.
2. A Linux box with loopback file system support (either as a module or in
the kernel) and ISO file system tools. Specifically you need the binary
"mkisofs."
3. ISO image of recovery CD #1. I made mine on a Windows box, but it could
be done on a Linux box using mkisofs.
4. A copy of the boot floppy image from the CD. You can extract this using a
number of ISO manipulation tools. I have also posted one at
http://www.sosu.edu/netop/boot.img <http://www.sosu.edu/netop/boot.img>
This 1.4 MB file is a binary image of a DOS (actually Win98, I think) boot
floppy with a bunch of CDROM drivers on it. (This image can also be used to
make a handy boot floppy. I used it when installing debian. I had the debian
install files on my FAT32 partition: I booted the floppy, changed to the C:
drive (or whatever drive was created for the FAT32 partition), switched to
the Debian "install" directory and ran boot.bat. It boots a 2.2.20 kernel
and begins the install process.)
Making the CD:
1. Copy the ISO image of the recovery CD to your Linux box. Mount the ISO
image to a directory: i.e. "mount RecoveryCD.iso /cdrom -o loop"
2. Copy the files from the mounted ISO image to a new directory. Then you
can edit the PowerQuest restore script. (Use your favorite editor in the
place of "edit" in the last line)
mkdir recCD
cd recCD/
cp -R /cdrom/* .
cd tools/
edit qrestore.scr
"qrestore.scr" is the script that tells powerquest DriveImage how to recover
the drive. From the factory it is set to delete all partitions and overwrite
the entire drive. I wanted it to overwrite only the first freespace that it
finds. I changed the file to read:
SELECT DRIVE 1
SELECT FREESPACE FIRST
SELECT IMAGE 1
RESTORE
SELECT PARTITION 1
SET ACTIVE
3. Make a "boot" directory under the recCD directory. Place the boot.img
file in this directory. You will use it when making the bootable ISO image
later.
4. Make the new ISO image:
mkisofs -b boot/boot.img -l -r -J -V "Compaq Recovery CD By Clay :-)"
-hide-rr-moved -v -o recCD.iso /root/recCD/
5. Burn the ISO to a CD. Again, I did mine on my Windows laptop, but you
could use CDRECORD on Linux to do it. Just read the man page...
6. Start a restore using your new CD. Windows will be installed into the
first unallocated space that the restore program finds on the disk.
Received on Tue Jul 01 22:45:04 2003
This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:54:24 EDT