Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2001 18:52:43 -0600 (CST)
From:      Brad Carlson <carlson@tcfreenet.org>
To:        Christoph Sold <christoph.sold@server.i-clue.de>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Setting Up new disk the hardway
Message-ID:  <Pine.BSF.4.10.10101031821010.21305-100000@tcfreenet.org>
In-Reply-To: <3A53B6A7.F0250501@i-clue.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Jan 2001, Christoph Sold wrote:

> Why did you try it the hard way? 

I had a similar need, but needed the setup of the new disk to be
automated: a lab tech plugs a BSD floppy into a new PC, the floppy boots
FreeBSD, mounts an NFS server, sets-up partitions and boot-blocks on the
HD, untars the filesystems, and reboots the newly-configured BSD box.  I
didn't see how /stand/sysinstall could be auotmated.

> freebsd schrieb:
> > I want to move my entire drives contents to another drive so that I
> > can take the old drive out for a different machine.
...
> > 1) setup the new drive
...
> > So far, after about an hour playing with it, I can't even get past step
> > one.
...
> >     # dd if=/dev/zero of=/dev/rda1 bs=1k count=1
> >     # fdisk -BI da1 #Initialize your new disk
> >     # disklabel -B -w -r da1s1 auto #Label it.
> >     # disklabel -e da1s1
> >     # mkdir -p /1
> >     # newfs /dev/da1s1e # Repeat this for every partition you created.

I had problems doing this by hand as-well (probably just not enough
experience on my part, since it looks like it should work).  I ended-up
cheating so I didn't have to bother with fdisk or disklabel: all our lab
PCs are identical hardware, so I took a snapshot of one of the installed
PCs (dd if=/dev/rda1 of=/mnt/nfs/bootblocks.dd count=1024) and saved to an
NFS server, along with the tar files of the partitions' contents.

Our cheaters' automated BSD install script now does:

A) Boot new PC with boot/install floppy in the drive (a human does this)
B) NFS server is mounted as /mnt/nfs
C)  cd /mnt/nfs
D)  dd if=bootblocks.dd of=/dev/rda1
E)  for i in rda1s1? 
     do newfs $i; mkdir /mnt/$i; mount $i /mnt/$i ; tar -C /mnt/$i -xf $i
    done
  (tar files are stored on NFS server with names matching their partition)

F) boot/install floppy is ejected and system reboots

The whole process takes about 5 minutes.

Heisan, Hoppsan!
Karlsson paa Nettet



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10101031821010.21305-100000>