moving to larger drive

Jerry McAllister jerrymc at clunix.cl.msu.edu
Sun Sep 12 17:36:26 PDT 2004


> 
> >
> > Use fdisk to slice and do the mbr.
> > In 4.xxx use disklabel to do disk labeling (partitioning) and boot block.
> > In 5.xxx use bsdlabel to do disk labeling and boot block.
> >
> > Then use newfs to create filesystems in the partitions created
> > with disklabel/bsdlabel.
> >
> > >
> > > manually
> > > ?
> > > i know how to do it in NetBSD, but here it's a bit different.
> > >
> > > i need to move everything from one disk to another.
> >
> > Once you create the new drive, then, in single user, dump(8) | restore(8)
> > from the old partitions/file systems to the new ones.
> 
> that is what i know but fdisk/bsdlabel i do not.
> 
> is fdisk compulsory?

If you want to do what you say you want to do, yes, well,,, mostly...

fdisk writes the main label that makes the slices on the disk.
It also writes the MBR if you tell it to.
You can tell it to make one large slice for the whole disk or
up to 4 slices named 1..4.

So, on a second SCSI disk (eg disk 1) slice 1 would look like /dev/da1s1... 

Then disklabel writes the partition label within any one those slices.
which divides the slice (not the whole disk) up in to as many as 8 partitions
named a..h with a, b, c, d sort of special cased by convention and expectation
of some software.   'a' is root if you are booting on thee drive, 'b' is
usually used for swap,  'c' is normally reserved for special accessing
the entire disk in some special places and 'd' is something historical.
'a', 'b' and probably 'd' can be used for other things if not being 
used for their conventional thing, but I usually skip over them if I
don't need them.
disklabel also writes the boot block for the given slice, if you tell it to.

So, on our second SCSI disk with slice 1 divided in to partitions 
then partition 'a' (typically root) would look like  /dev/da1s1a.

Filesystems are built in those partitions.

You can create what is often, in the docs, referred to as a dangerously
dedicated disk and do a disklabel on a whole disk without the slices.
But, I think you still need fdisk or another main label writing utility
(can't remember the name at the moment) to write that MBR you want.   
Actually, you can even get along without that if you never want to access 
the disk in any other way.  I have never used it that way.  It is usually 
suggested not to do it that way and it only uses up a few bytes of disk 
space, so do the fdisk.

Just try it out and then ask more questions if needed.  It actually
does work just like the documentatino says.

////jerry

> 
> in NetBSD i don't create fdisk partition table at all just bsd label
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 



More information about the freebsd-questions mailing list