Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!spdcc!ima!minya!jc From: jc@minya.UUCP (John Chambers) Newsgroups: comp.unix.wizards Subject: Re: Panic button SCSI disk reformat! [Summary] Message-ID: <60@minya.UUCP> Date: 8 Nov 89 14:43:24 GMT References: <1989Oct27.222806.28576@genisco.uucp> <1989Nov5.183341.27545@world.std.com> Organization: home Lines: 38 > >You can then do something like: > > > ># format -d sd0 << XXX > >format > >y > >XXX > > > >and format will start crunching away! (I expected the system to crash, > >but it didn't! It even verified the disk, and then let me relabel it.) > > You should add some relatively simple code to unmount it. Otherwise > buffers being held in memory might be written back which could make > sensitive data re-appear if that area of the disk has already been > reformatted. OK, maybe I'm giving away my non-wizard status, but I can't quite see how you persuade the kernel (Sys/V or BSD) to umount the root partition. Is it really "relatively simple"? If so, how do you do it? As an alternative, I suppose you could do a sync or three before the format, to flush out the buffers. Too bad there doesn't seem to be a good (portable) way to know that a sync has completed. [To satisfy the line counter] -- #echo 'Opinions Copyright 1989 by John Chambers; for licensing information contact:' echo ' John Chambers <{adelie,ima,mit-eddie}!minya!{jc,root}> (617/484-6393)' echo '' saying