SUMM: Obliterating "part" of a disklabel

From: Guy Dallaire <dallaire_at_total.net>
Date: Wed, 07 May 1997 11:52:11 -0400

I posted a question about how to change the fstype of a partition with the
disklabel utility. A DEC engineer told me that all you could change with
the disklabel -e switch was the size ond offset of the partitions, and that
disklabel ignored all other changes.

It is NOT the case, you can also change the fstype to 'unused' (or
whatever) but you have to be very careful not to change anything else
(unless you know what you're doing) because you could mess up your disk
partitions.

Thanks to all the repliers, in particular to Alan Rollow, Steve Thompson
and Michael Matthews

Here are the answers:

---- Alan -------------------

I have doubts that editing the label won't let you change the fstype,
but if that is the case, use newfs to overwrite the particular
partition. If the partition doesn't overlap others that will be
safe and it change the fstype to 4.2BSD (or something close). On
V4 you might be able to make it a page/swap area and swapon may
change it. Addvol may also change it.

And if all else fails, the disklabel I/O controls are documented.
If you have a development license, you can write a program to
read, edit and write back the disklabel you want. That's all
disklabel(8) is doing. It just may have stupid rules about what
it will let you change.

--------- Michael ---------------

Just disklabel the disk and edit the filesystem type. If you don't
change anything else (most importantly, numbers and type on in-use
partitions), nothing will be harmed.

In fact, disklabel won't LET you change anything on an active partition.

Mike

---------- Steve ----------------

You -can- use 'disklabel -e' and change the type field from LSMsimp to
'unused'. This does work, provided that you change to a meaninful value;
I have done it many times.

-steve

Guy Dallaire
dallaire_at_total.net

"God only knows if god exists"
Received on Wed May 07 1997 - 18:17:43 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT