From owner-freebsd-questions Mon Aug 14 3:23:10 2000 Delivered-To: freebsd-questions@freebsd.org Received: from radius.cyberosity.com (radius.cyberosity.com [198.175.15.214]) by hub.freebsd.org (Postfix) with ESMTP id A0DF137B9C5 for ; Mon, 14 Aug 2000 03:22:57 -0700 (PDT) (envelope-from tony@cemail.net) Received: from kohsamui (bhutton9.wb.mvl.cfw.com [216.12.31.253]) by radius.cyberosity.com (8.9.2/8.9.2) with ESMTP id FAA03067 for ; Mon, 14 Aug 2000 05:22:54 -0500 (CDT) Message-Id: <4.2.0.58.20000814061709.00b855e0@198.175.15.214> X-Sender: tony@198.175.15.214 (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Mon, 14 Aug 2000 06:21:12 -0400 To: freebsd-questions@FreeBSD.ORG From: Tony Subject: make a new boot disk from old boot disk Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_90163238==_.ALT" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --=====================_90163238==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed The problem I have Im sure is common one but I have found no answers to this in the handbook. situation: have a server with boot drive thats getting old, want to copy the entire boot drive and boot records to the new drive and replace the drive. I can not take the server down to do the dos program drive image or ghost. ( I want to do this with having to use any dos programs, free myself from bill ) the problem is the server Im going to clone is in a different location than I am I want to have everything ready to just walk in and add the drive. so this is what I have done. made a dump file of the old boot drive dump -0ua -f /tmp/backup/boot.dump /dev/wd0s1a gzip boot.dump and ftp'd it to my local workstation. ( I would have liked to done dump | retore over tcp but I dont know to ) I then added a new hd to my workstation. cd /stand sysintall post configuration fdisk I selected the new drive on mine was ( ad2 ) in the fdisk menu I picked "a" ( entire disk ) then I picked "s" ( make bootable) picked "w" to write the info to the disk I picked standard boot manager disk label picked "c" create new slice added /dev/ad2s1b none swap /dev/ad2s1e /mnt ufs "w" wrote the update, it ran fsck and mounted my new drive to /mnt I then cd /mnt cp /tmp/boot.dump.gz . gunzip boot.dump restore -rf boot.dump /dev/ad2s1e after restore was done I went and changed the /mnt/etc/fstab commented out the other drive from the old server and add /dev/ad0s1b none swap /dev/ad0s1e / ufs then did a shutdown and removed new hard drive, put the drive in a new system and booted it. the screen says invalid partition invalid partition no /boot/loader defualt: 0:ad(0,a)/kernel boot: invalid partition no /kernel so I type this in 0:ad0(0,e)/kernel panic: rslock: cpu: 0, addr: 0x02c3770, lock: 0x00000001 mp_lock = 00000001; cpuid = 0; lapic.id = 0000000 automatic reboot in 15 sec the kernel was for a multi cpu server and I was trying to boot on a single cpu. so I tried 0:ad0(0,e)/kernel.old and it booted with the old single cpu kernel. ( I will be using the multi cpu kernel when I install the new hd back into the real server) now Im lost at how to change it so it boots to 0:ad(0,e)/kernel when it picks ad(0,a) I though I do it with command fdisk but I didnt understand what I should do. If there is something I have not done correctly please let me know. or if there is a better and faster way to do this. once I know how all of this works and fits together I would like to get it added to the How-to to help other people and credit who help in completion of this. Thank you for your help Tony --=====================_90163238==_.ALT Content-Type: text/html; charset="us-ascii" The problem I have Im sure is common one but I have found no
answers to this in the handbook.

situation:  have a server with boot drive thats getting old, want to copy
the entire boot drive and boot records to the new drive and replace the drive.
I can not take the server down to do the dos program  drive image or ghost.
( I want to do this with having to use any dos programs, free myself from bill )
the problem is the server Im going to clone is in a different location than I am
I want to have everything ready to just walk in and add the drive.
so this is what I have done. 

made a dump file of the old boot drive
dump -0ua -f /tmp/backup/boot.dump /dev/wd0s1a
gzip boot.dump and ftp'd it to my local workstation.
( I would have liked to done dump | retore over tcp but I dont know to )
      
I then added a new hd to my workstation.
cd /stand
sysintall
post configuration
fdisk
   I selected the new drive on mine was ( ad2 )
   in the fdisk menu I picked "a" ( entire disk )
   then I picked "s" ( make bootable)
   picked "w" to write the info to the disk
   I picked standard boot manager
disk label  
   picked "c" create new slice
   added /dev/ad2s1b none swap
         /dev/ad2s1e /mnt ufs
      "w" wrote the update, it ran fsck and mounted my new drive to /mnt
I then
   cd /mnt
   cp /tmp/boot.dump.gz .
   gunzip boot.dump
   restore -rf boot.dump /dev/ad2s1e
after restore was done I went and changed the /mnt/etc/fstab
  commented out the other drive from the old server and add
  /dev/ad0s1b   none swap   
  /dev/ad0s1e   /    ufs
then did a shutdown and removed new hard drive, put the drive in
a new system and booted it.
the screen says
 invalid partition
 invalid partition
 no /boot/loader
 
 defualt: 0:ad(0,a)/kernel
 boot:
 invalid partition
 no /kernel
 
so I type this in
0:ad0(0,e)/kernel

 panic: rslock: cpu: 0, addr: 0x02c3770, lock: 0x00000001
 mp_lock = 00000001; cpuid = 0; lapic.id = 0000000
 automatic reboot in 15 sec

the kernel was for a multi cpu server and I was trying to boot on a single
cpu. so I tried
0:ad0(0,e)/kernel.old

and it booted with the old single cpu kernel.
( I will be using the multi cpu kernel when I install the new hd back
into the real server)
now Im lost at how to change it so it boots to
0:ad(0,e)/kernel  when it picks ad(0,a)
I though I do it with command fdisk but I didnt understand what I should
do.

If there is something I have not done correctly please let me know.
or if there is a better and faster way to do this.
once I know how all of this works and fits together I would like to
get it added to the How-to to help other people and credit who help
in completion of this.

Thank you for your help

Tony
 

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