Using Claude Code to Modernize a 25-Year-Old Kernel Driver Dmitry Brant shares his experience updating the ftape Linux kernel driver, originally developed nearly 25 years ago, for reading data from legacy floppy-controller-based tape drives (notably QIC-80 tapes). These tapes were popular as backup media in the 1990s but rely on a now-obsolete and poorly supported hardware driver. --- Background Tape Type: QIC-80 tapes, read by tape drives connected to PC floppy controllers. Challenge: Floppy controllers were used as a cost-saving hack, not originally designed for tape drives, limiting data rates (~500 Kbps) and requiring complex, non-standard protocols. Legacy Driver: ftape kernel driver enabled access on Linux but was last supported around 2000 and only works on very old kernels (e.g., Linux 2.4). Current Workflow: Brant boots an old CentOS 3.5 system with the original ftape driver to read tapes, but this is cumbersome and outdated. --- Modernization Effort with Claude Code (AI Coding Assistant) Goal: Modernize the ftape driver to compile and run on modern Linux kernels (up to version 6.8), and make it a standalone loadable kernel module (.ko). Process: Asked Claude Code for help updating deprecated functions and kernel APIs in the driver code. Claude iteratively fixed compilation errors by analyzing compiler messages and updating code. Created a build system to compile the module out-of-tree without copying to the main kernel source. Initial compiled module loaded but failed to communicate with hardware reliably. Manually tested module, collected dmesg logs, and iteratively fed these logs back to Claude for diagnostics. Claude identified misconfigurations (e.g., incorrect default I/O addresses causing detection failures). Outcome: Successfully achieved a working kernel module capable of detecting the tape drive and dumping tape contents on a modern Linux system. --- Lessons and Reflections on Using AI Coding Tools Collaboration: Using Claude felt like working with an enthusiastic junior engineer—helpful but requiring human oversight, domain knowledge, and decision-making. Specificity: Clear, domain-specific prompts improved results greatly. Task Suitability: Understanding what tasks AI can handle smoothly (e.g., code modernization) helps manage expectations. Skill Multiplier: Claude accelerated work that would have taken weeks to relearn and implement manually. Rapid Onboarding: Such tools aid quick learning and experimentation with unfamiliar software frameworks or languages. Manual Verification: Essential to verify and test all AI-generated changes thoroughly. --- Current Status and Future The ftape driver repository is now updated and maintained on modern kernels: https://github.com/dbrant/ftape. It supports floppy-controller and parallel-port tape drives. Running on Xubuntu 24.04 instead of legacy CentOS, the setup modernizes data recovery workflows for legacy tape media. Further tweaks and new feature additions are ongoing. --- Summary Dmitry Brant successfully leveraged Claude Code to revive a long-abandoned Linux kernel driver, enabling modern support for vintage tape drives. The effort highlights the promise and limitations of AI-assisted coding and the enduring need for human expertise in complex software tasks. --- Published September 7, 2025 Author: Dmitry Brant Categories: Daily Events, Programming --- Related Links QIC Tape Wikipedia Blog: How To: Tape Backup and Recovery Personal Collection: Media Inventory