*BSD News Article 9355


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA5622 ; Fri, 01 Jan 93 01:51:14 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!spool.mu.edu!agate!tfs.com!tfs.com!julian
From: julian@tfs.com (Julian Elischer)
Subject: Re: [386BSD] adding a new partition.
Message-ID: <1992Dec27.231625.4482@tfs.com>
Organization: TRW Financial Systems
References: <CC-MAIL+12_23_92_1#c#29PM+#091#386BSD#093#_adding_a_new_partition.*_S=BLANSFIE_OU=EM-01_O=CCMGW_PRMD=GOV+USDOE.G02_ADMD=ATTMAIL_C=US_@mailgw>
Date: Sun, 27 Dec 1992 23:16:25 GMT
Lines: 54

In article <CC-MAIL+12_23_92_1#c#29PM+#091#386BSD#093#_adding_a_new_partition.*_S=BLANSFIE_OU=EM-01_O=CCMGW_PRMD=GOV+USDOE.G02_ADMD=ATTMAIL_C=US_@mailgw> /S=BLANSFIE/OU=EM-01/O=CCMGW/PRMD=GOV+USDOE.G02/ADMD=ATTMAIL/C=US/@mailgw.er.doe.gov writes:
>     I have a 200 MB hard disk that I has 2 partitions, on the first I have 
>     386BSD and on the other I have DOS.  I want to wipe the DOS partition 
>     and add it to 386BSD.  What would be the way to proceed?  Should I 
>     back-up all my files and reinstall or is there an easier, faster way?
>     
>     Any help appreciated.
>     
>     Mike
>     blansfie@mailgw.er.doe.gov
This known as the "pulling the rug out from under your own feet" trick.
I have actually done worse (shifted the root partition while running on it )
SO YES, IT CAN BE DONE.

your first job is to get a copy of the 386bsd version of fdisk
and it's man page (both installed on ref.tfs.com)

write a copy of the disktab entry which has all the partitions
exactly where they are now, but has another  partition covering
what used to be the dos Partition. (to be safe you could define the
new partition to not cover the first cylinder)
Note that partition d remains the whole disk, but c expands down
to cover the new unix partition size.

whether you define the first cylinder to be part of the unix
partition or not decides if your DOS MASTER BOOT RECORD will
be overwritten by disklabel. (if you want to boot straight
to unix fine, overwrite it).

Using fdisk (the 386bsd fdisk) ("fdisk -u /dev/rwd0d")
redefine the 386bsd partition to cover all the disk.

using disklabel -r -w wd0 <disktab> <label> <xxboot> <bootxx>
drop on the new label.

check the new disklabel with:
disklabel -r wd0

if it seems ok, and there are no overwritten partitions:
newfs wd0x (where x is the new partition) 

mount the new partition.


take backups before yopu try all this 8-)

julian
+----------------------------------+       ______ _  __
|   __--_|\  Julian Elischer       |       \     U \/ / On assignment
|  /       \ julian@tfs.com        +------>x   USA    \ in a very strange
| (   OZ    ) 2118 Milvia st. Berkeley CA. \___   ___ | country !
+- X_.---._/  USA+(510) 704-3137(wk)           \_/   \\            
          v