|
|
Views
Edit history
changed:
-
Creating a bootable PartitionMagic CDROM disc
by Gus Wirth 26 January 2004
PartitionMagic is a commercial utility from "PowerQuest":http://www.powerquest.com (recently bought out by Symantec) that provides the ability to create, resize, convert and merge partitions on a hard drive. It has two modes of operation. One is to run as a Windows program. We won't go there. The other is to create a bootable DOS disk with the appropriate files and boot off the floppy disk. But what happens when your computer doesn't have a floppy disk? Many computers, especially laptops, don't come with floppy drives any more.
But they do have a CDROM drive that is bootable. The solution is to create a bootable CDROM disc that has the necessary files and then boot from that disc to do your hard drive maintenance. Here is what you'll need:
* PartitionMagic
* DOS - I recommend "FreeDOS":http://www.freedos.org. DR-DOS or MS-DOS 6.2 works also. The MS-DOS 7 (Win9x, ME) won't work because it's too big and won't allow all the files to fit on a floppy (Advanced users can get around this but why?) FreeDOS can be used under Linux using "DOSEMU":http://www.dosemu.org . PartitionMagic also has it's own minimal version of DOS but you'll need to get some extra pieces.
* CDROM burner and software - The software must be capable of creating a bootable CDROM image. For Linux users, xcdroast, k3b and others make this easy with a GUI inteface or just use mkisofs and cdrecord directly. For Windows users Roxio (formerly Adaptec) CD Creator or Nero will work.
* Floppy drive and disk - not strictly neccessary but makes things a little easier for the initial run.
Now here are the steps to creating your image:
1) Create a bootable floppy disk using your choice of DOS. This usually means just running SYS A: at the DOS prompt on an empty, formatted floppy disk. Under Windows, you can use the create disks batch file MAKEDISK.BAT found under the R:\ENGLISH\DOSMAKE directory ( choose your language and CDROM location) of the PartionMagic CDROM disc. If you create floppy disks this way, take the first one and delete all the files off of it except for COMMAND.COM (and the hidden *.SYS files). If you create the floppy under MS-DOS, you need to get rid of some extra crap that Microsoft puts on there. MS-DOS puts a hidden file called DBLSPACE.BIN on all their floppies. It is large and unnecessary. To get rid of it, at a DOS prompt do::
ATTRIB -S -H -R A:\DBLSPACE.BIN
DEL A:\DBLSPACE.BIN
This will get rid of the offending file.
2) Copy the appropriate files from the PartionMagic CDROM disc to the floppy. The files are located in /mnt/cdrom/ENGLISH/DOSMAKE/DISK1 and DISK2 (R:\ENGLISH\DOSMAKE\DISK1 and DISK2 for Windows or DOS). The files you need to copy are::
-MOUSE.COM
MOUSE.INI
PMHELP.DAT
PQMAGIC.EXE
PQMAGIC.OVL
PQMAGIC.PQG
PQPB.RTC
zABOUT.PQG
Then from your own version of DOS you need to copy over HIMEM.SYS and a ramdisk utility. For FreeDOS it's TDSK.EXE. You may have to get the full version of FreeDOS for this, or download at least this file. Some packages of DOSEMU don't have it. For MS-DOS this is RAMDRIVE.SYS. The RAMDRIVE.SYS is a DOS driver that creates a drive in memory (ramdisk). The DOS provided by PowerQuest does not have this, but there are lots of these to be found out on the 'net. Try the one from FreeDOS (I haven't tried this combination myself).
3) Create the 'CONFIG.SYS' and 'AUTOEXEC.BAT' files with your favorite text editor (remember that DOS uses CR AND LF! Use the unix2dos util in Linux to convert) and save to the floppy::
CONFIG.SYS
------------------
DEVICEHIMEM.SYS
rem FreeDOS
DEVICEHIGHTDSK.EXE 2028 /E
rem MS-DOS
rem DEVICEHIGHRAMDRIVE.SYS 2048 /E
BUFFERS 16
FILES 32
LASTDRIVE Z
STACKS 9,256
DOS UMB,HIGH
AUTOEXEC.BAT
------------------------
REM Format for loading PartitionMagic
REM Replace C:\ with the ramdisk drive letter
REM PQMAGIC /PQBC:\
4) Test the floppy. Set the write-protect tab to the protect position. This will prevent any writing to the floppy. Boot a test system with the floppy. Observe the screen and pay particular attention to the output from the ramdrive device. It will say what drive letter it has assigned to the ramdisk. Now at the command prompt type::
PQMAGIC /PQBC:\
Replace the 'C:\' with the drive letter you observed when the system booted. See the end for some advanced commentary. The PQB option to PartitionMagic tells the program to keep its temporary batch files in the ramdisk. Normally it would try to save them in the same place that the program was launched from, but since we are going to do this from a read only medium (CDROM or write-protected floppy) we need something writable, hence the ramdisk.
Now do something to the hard drive, like shrink a partition or delete Windows (just kidding) and ensure that PartitionMagic does everything it is supposed to. Once you have a working floppy disk it's time to move on to the next step.
5) Create a bootable CDROM disc from the floppy. Depending on the sofware you use, you may need to dd the floppy to get an image, like so::
$ dd if/dev/fd0 offloppy.img
Windows programs tend to want you to use the floppy disk directly.
Now create a CDROM disc. Yes, it is rather a waste to have all that space on the CDROM to hold only one floppy of data, but CDROM discs are cheap (and there is something we can do about it later). Under Linux you need to create the ISO image file first. Make it bootable by running mkisofs with the -b option and passing it the floppy image you created with dd. See the man page for more details. Windows users are on their own.
6) Test the CDROM disc. Do this the same way you tested the floppy disk.
Additional considerations
A slightly different way to do this this would be to create a floppy disk image that had a minimum DOS with a ramdisk driver and a CDROM driver on it. Then create an ISO image with a full version of DOS and throw in PartitionMagic, other utilities and maybe even Knoppix or disc one of some other distribution. Then you can boot from the CDROM disc, do all your partitioning and then use LOADLIN to boot the CDROM into Linux and do an install all off the same media.
It also turns out the El-Torrito standard for creating bootable CDROMs can accomodate up to 2880KB as the boot image size. If you need the extra space, you can create an image file of the right size (cat two floppy images together), format it with the FAT file system and then treat it like a big floppy. This works well under UMSDOS in Linux. I don't know how you could do it under DOS/Windows without actually having a real 2.88MB floppy drive. Anyone know of a loopback capabilty for DOS/Windows?
I tested this with PartitionMagic 7. I don't have 8 yet and depending on what Symantec does I may never own it :(
P.S. Please do not correct the spelling of disc to disk or from disk to disc. For some weird reason CDROMs are spelled disc (look at a commercial disc sometime) and floppy and hard drives are called disk. One of the exceedingly minor mysteries of the universe.
|
|
«
|
January
2009
|
»
|
| Su |
Mo |
Tu |
We |
Th |
Fr |
Sa |
|
|
|
|
1 |
2 |
3 |
| 4 |
5 |
6 |
7 |
8
|
9 |
10
|
| 11 |
12 |
13 |
14 |
15 |
16 |
17 |
| 18 |
19 |
20 |
21 |
22 |
23 |
24 |
| 25 |
26 |
27 |
28
|
29
|
30 |
31 |
-
General Meeting January 8, 2009
San Diego County Office of Education 6401 Linda Vista Rd Room 301,
2009-01-08
-
Installfest January 10, 2009
National City Adult Education Center: 517 Mile of Cars Way; National City, CA 91950,
2009-01-10
-
Open Source Conference, January 28,29 2009
Ramada Inn & Conference Center
5550 Kearny Mesa Rd.
San Diego, CA 92111,
2009-01-28
-
General Meeting, February 12, 2009
San Diego County Office of Education 6401 Linda Vista Rd Rooms 401 & 401,
2009-02-12
|