Reply to post: Re: His job didn't involve changes to the print queue did it?

Rookie's code couldn't have been so terrible that it made a supermarket spontaneously combust... right?

Peter Gathercole Silver badge

Re: His job didn't involve changes to the print queue did it?

Ah, lp0. A bit of a diversion, but it brought this to mind.

I've related this tale before, but back in the depths of time, I was working in single user mode (as root) on a PDP-11/34 (actually a SYSTIME 5000E) trying to get something like the 22-bit memory, or it may have been the Calgary buffer mods for UNIX Edition 6 or 7 working.

Being in single user mode, the printer daemon was not working, so I got into the habit of cat'ing files directly to /dev/lp0 to print them. This worked fine, but on one time, through force of habit, I typed rp0 instead of lp0...

You can already tell, can/t you. We had RP03 disks (well actually emulations to drive SMD disks), and rp0 happened to be the device file for the root filesystem at the beginning. Wiped out the boot sector, the superblock and the first few dozen inodes for the root filesystem.

It would not really have mattered too much if it had not been my development disk pack (removable disks back in those days), and contained several weeks of work trying to get the extended features of the SYSTIME system working, without a backup (we had too few disk packs, and no tape drive at that time).

I reasoned that the first couple of hundred files on the disk would not have changed since I cloned the disk from the live system disk a few weeks before (back in the days of UNIX Edition 6 and 7, filesystems, especially the root filesystem, did not change that much), so I took the gamble of just overwriting the corrupted portion of the disk with a copy from the backup of the live disk.

It was a relief when it fixed and then passed icheck, dcheck, ncheck and I think fsck (fsck only appeared on the Edition 7 addendum tape). The biggest surprise was that it was able to fix the beginning of the free list, although identifying the beginning of the free list was always something that had to be fixed during a normal system crash (the pointer to the beginning of the linked-list of free blocks on the filesystem was held in the filesystem superblock, which was frequently re-written when blocks were peeled off the list to be used, making losing the beginning of the free list the most common filesystem corruption).

You learn by your mistakes...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon