Back up your vintage PC and make a CD that restores it by itself (Windows 95/98)

Back up your vintage PC and make a CD that restores it by itself (Windows 95/98)

🌐 Leer en español

For years, restoring an old PC’s disk was a ritual: boot a Linux rescue disc, partition, format, transfer the system from a floppy, unpack the backup, all by hand. While reviving a Pentium 100’s Windows 95 and a 2004 Windows 98, we turned it into a CD that does it all by itself. It works on the real machine (the Pentium, the Compaq) and in a VM.

Step 1: back up the PC

The simplest way is to boot the old PC with any “live” Linux (or take the disk out and connect it to another computer), mount the partition and zip all of it:

sudo mount -t vfat -o ro /dev/sdX1 /mnt/old
cd /mnt/old && zip -r -y ~/my_pc_backup.zip .

That’s all. If the zip was made on Windows, its names will be in cp1252; if it was made on Linux, in UTF-8. The script accepts both.

Step 2: build the CD

./cd_restaura.sh my-pc my_pc_backup.zip utf-8 MYPC --fat16 --cd WIN95:W95/WIN95

The script:

  • repacks the backup without personal data (.PWL passwords, e-mail, cookies, history, My Documents…) and with the names in code page 850, the one DOS understands, so long names keep their accents;
  • puts “Archivos de programa” (Program Files) first in the zip, so its short name is ARCHIV~1, as the registry expects;
  • with --cd it adds the Windows setup folder (the CAB files), so it never asks to “insert the Windows CD”;
  • builds an ISO that boots the Windows 98 SE startup disk in floppy emulation (El Torito, like the good old genisoimage -b floppy.img), with its CD-ROM drivers for real hardware;
  • adds the tools: FreeDOS FDISK (partitions without questions), SMARTDRV (without a disk cache, unpacking crawls at a snail’s pace), DOSLFN (long names in DOS), Info-ZIP UnZip (the DJGPP build, long-name aware), CWSDPMI, CHOICE and FIND;
  • with --fat16 it creates a FAT16 partition of up to 2 GB. We use it for both, Windows 95 and 98 (see below why); without it, FAT32 on the whole disk;
  • with --parche it runs patcher9x at the end, needed for VMs and modern CPUs (not on a Pentium).

Step 3: boot from the CD

On boot it asks. If nobody answers within 15 seconds, it does nothing: no disk gets wiped by accident.

The CD's initial question
The CD's initial question

DOS needs a reboot after creating a partition, so the first time it partitions and asks you to reboot:

Partition created
Partition created

The second time it formats, transfers the system, loads DOSLFN and unpacks:

Format, system, DOSLFN and restore
Format, system, DOSLFN and restore
Restore finished, with patcher9x
Restore finished, with patcher9x

Take the CD out and… the PC as it was (here, with its 3D Text screen saver and the owner’s logon):

The original screen saver at boot
The original screen saver at boot
Windows 95 restored from the CD
Windows 95 restored from the CD

Pitfalls the script already handles

  • FORMAT C: /Q doesn’t work on a never-formatted disk; the script does a full format.
  • FORMAT /S from the CD gave “Insufficient memory to load system files”; the script formats without /S and then runs SYS C:.
  • Without SMARTDRV the restore ran at about 200 KB/s. With a 16 MB cache and write-behind (SMARTDRV C+ 16384 16384), flushed at the end with SMARTDRV /C, it runs almost twice as fast.
  • No FAT32 from DOS. When restoring Windows 98 onto FAT32, the root directory ended up with garbage entries and UnZip couldn’t create a folder. In plain DOS, long names are written by DOSLFN on its own, and when directories grow on FAT32 something gets out of sync. On FAT16 it doesn’t happen: Windows 98 runs the same and the 1 GB backup fits easily in 2 GB. If more space is needed, add a second disk.
  • When replacing IO.SYS and MSDOS.SYS, their system, hidden and read-only attributes have to be removed, then set again afterwards.

Downloads

The scripts, as we used them (bash and Python; free licence, no warranty). Building the ISO needs Linux with genisoimage, mtools, cabextract and Python 3, plus your own Windows 98 SE startup disk and the FreeDOS packages (fdisk, unzip, doslfn) and patcher9x; the README says where to get them.

⬇ Download retroblog-scripts.zip

The package also includes what we used in the other articles: sending keys to and taking screenshots of Proxmox VMs, snapshot reset and the Windows XP factory.

Series "Reviving old PCs in Proxmox": MS-DOS + Windows 3.11 · Windows 95 · Windows 98 SE · Windows XP · Restore CD

Got an old PC, a backup or a question? Tell us in the blog's Telegram group: Telegram group

Enjoyed it? Follow us on social media

We post new things every week: don't miss them.

YouTubeFacebookXInstagramTelegram