Subject: Re: NetBSD/sparc re-partitioning disks
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sparc
Date: 12/21/1994 15:01:01
> I've just installed NetBSD-1.0 on a 2nd disk, and I want to
> repartition the original disk to hold a copy of 1.0A src so I can
> compile & install it. Can I do this under NetBSD?
Yes, barely.
- dd if=/dev/rsd0c bs=512 count=1 of=old-label
- cp old-label new-label
- edit new-label with a binary file editor, according to
/sys/arch/sparc/scsi/sun_disklabel.h (1.0 release location), to
repartition as you wish
- go single-user
- sync
- dd if=new-level bs=512 count=1 of=/dev/rsd0c
- L1-A
- reboot
I've done this under SunOS, using adb as the binary file editor. I
can't see any reason it wouldn't work under NetBSD, though of course
you'd have to find something other than adb to use as a binary file
editor. (I really miss adb in recent systems, not as a debugger but as
a binary file editor.) You probably can use halt instead of sync/L1-A;
I was paranoid about my changes getting overwritten.
I've been meaning to write a tool to do most of it for you, in
particular the recomputation of the checksum (though NetBSD doesn't
care, according to my reading of sun_disklabel.c), but haven't gotten
around to actually doing so yet.
> Would there be any chance of including in the distrib/notes/sparc
> some approximate indication of what disk space is required to do a
> source compile (will 300Mb be enough? - ie a 300Mb partition for the
> source alone)
My 1.0 /usr/src, after a "make build" (ie, with all .o files and
executables and everything, even one kernel) takes up 391988k according
to du, or just barely over 382.8 megs.
> Also - is there a file somewhere that tells me how to do a full
> source compile then install?
cd /usr/src
make build
That's how I do it. In some upgrade cases, it may be more complicated;
for example, I recall someone saying recently that there was some
situation where you had to build ld first, or nothing else would link.
der Mouse
mouse@collatz.mcrcim.mcgill.edu