Subject: Re: Removing SILO From A SPARCStation LX
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Gary Gale <spam@vicchi.org>
List: port-sparc
Date: 05/21/2004 10:14:43
On Fri, 21 May 2004, der Mouse wrote:

> >> My guess would be that your boot blocks (sectors 1-15 of your boot
> >> drive)
> (I actually should have written "boot partition" here)
> >> are untouched from the sparclinux install, and either they contain
> >> SILO themselves or they're loading SILO from elsewhere, some
> >> "elsewhere" that didn't get overwritten during the NetBSD install.
> > From what you've said, it seems to imply that the process of
> > formatting and partition creation that the installer does, doesn't
> > revamp all of the disk.
> 
> The installer doesn't actually format the disk[%]; it just overwrites
> certain pieces of it (partition table, filesystem overhead blocks,
> and enough data blocks to hold the installed data.  It ought to install
> bootblocks too, and in most <port,version> cases it does, but it
> appears in your case it didn't.
> 
> [%] It _does_ make a filesystem, which Windows - and DOS before it -
>     have caused a lot of people to confuse with formatting.  (On some
>     versions of Windows, and DOS before them, make-filesystem command
>     was called FORMAT.  This is probably a legacy of the days of
>     floppy-disk OSes; then and now, FORMAT *applied to floppies*
>     generally _does_ format the disk.)
> 
> > If that's the case, would dd'ing from /dev/zero to the entirety of
> > the disk do the trick?
> 
> Yes.
> 
> > It may be a sledge hammer to crack a nut
> 
> Yes. :-)
> 
> > but I'm assuming that if I drop down to a shell from the installer,
> > _prior_ to actually performing the install and do something along the
> > lines of
> > # dd if=/dev/zero of=/dev/sd0c bs=1024k count=whatever
> > this would zap the entire disk contents?
> 
> Yes - or at least, the entire host-accessible disk contents, which is
> what matters here.
> 
> It is severe overkill, and you will have to redo your partition table
> afterwards, but in the process of razing the city it _will_ demolish
> the shed you want torn down. :-)

Crikey - you're up early, assuming of course, that you're based in Canada 
8-)

Couple of points. You say I'll have to "redo" my partition table; will the 
installer do this for me?

If so, then it looks like the way forward is

1) Re-install (again!) and at the end of the install, drop down to a shell 
rather than rebooting, mount and chroot my root filesystem, say to 
/tmp/root

2) Ensure that /tmp/root/usr/mdec/boot has been copied to /tmp/root (note 
I'm using the non-chroot'ed paths here just so I can be sure in my mind 
where the files will reside)

3) Install the bootstrap onto the filesystem with:
installboot /dev/rsd0c /usr/mdec/bootxx /boot

points 2 & 3 are copied almost verbatim from the 1.6.2 man page for 
installboot (8).

4) Reboot, cross fingers, hope and pray.

5) If it works, break out the beer. If it doesn't determine how big 
exactly the OS _thinks_ my drive is and work out the count param for dd 
and severely overkill the disk then start again at point 1.

No prizes for guessing what I'll be doing this weekend

Thanks for the help - much appreciated.

Cheers

Gary

-- 
"There are two major products that came out of Berkeley; LSD and UNIX.
We don't believe this to be a coincidence."

BOFH Excuse #76: Unoptimised hard drive.

Linux, because eventually, you grow up enough to be trusted with a fork()