Re: Protecting the partition table.

Richard B. Johnson (root@chaos.analogic.com)
Wed, 31 Dec 1997 08:24:48 -0500 (EST)


On Tue, 30 Dec 1997, Ajay Rai wrote:

> Hi,
> I'm writing some kernel code and due to the fact that there is the inevitable Null pointer exception in my code, the kernel crashes.(I wish I could write error free code the first time(sigh) :) )
>
> Most of the time just a reboot let's me continue with my work but sometimes the partition table gets trashed. When this happens, it's a 3 hour recovery time for me.
>
> Is there a way to protect the partition table so that it does not get trashed when the kernel crashes???
>
> Thank you..
>
> Ajay Rai
>
In your HD Driver, just prevent writes to the first N sectors. N depends
upon your drive configuration. Easy code just pretends it wrote.

Cheers,
Dick Johnson
***** FILE SYSTEM MODIFIED *****
Penguin : Linux version 2.1.70 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.