Date: Mon, 14 Aug 2000 06:21:12 -0400 From: Tony <tony@cemail.net> To: freebsd-questions@FreeBSD.ORG Subject: make a new boot disk from old boot disk Message-ID: <4.2.0.58.20000814061709.00b855e0@198.175.15.214>
next in thread | raw e-mail | index | archive | help
--=====================_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" <html> <font size=3>The problem I have Im sure is common one but I have found no<br> answers to this in the handbook.<br> <br> situation: have a server with boot drive thats getting old, want to copy <br> the entire boot drive and boot records to the new drive and replace the drive.<br> I can not take the server down to do the dos program drive image or ghost.<br> ( I want to do this with having to use any dos programs, free myself from bill )<br> the problem is the server Im going to clone is in a different location than I am<br> I want to have everything ready to just walk in and add the drive.<br> so this is what I have done. <br> <br> made a dump file of the old boot drive<br> dump -0ua -f /tmp/backup/boot.dump /dev/wd0s1a<br> gzip boot.dump and ftp'd it to my local workstation.<br> ( I would have liked to done dump | retore over tcp but I dont know to )<br> <br> I then added a new hd to my workstation.<br> cd /stand<br> sysintall<br> post configuration<br> fdisk<br> I selected the new drive on mine was ( ad2 )<br> in the fdisk menu I picked "a" ( entire disk )<br> then I picked "s" ( make bootable)<br> picked "w" to write the info to the disk<br> I picked standard boot manager<br> disk label <br> picked "c" create new slice<br> added /dev/ad2s1b none swap<br> /dev/ad2s1e /mnt ufs<br> "w" wrote the update, it ran fsck and mounted my new drive to /mnt<br> I then<br> cd /mnt<br> cp /tmp/boot.dump.gz .<br> gunzip boot.dump<br> restore -rf boot.dump /dev/ad2s1e<br> after restore was done I went and changed the /mnt/etc/fstab<br> commented out the other drive from the old server and add<br> /dev/ad0s1b none swap <br> /dev/ad0s1e / ufs<br> then did a shutdown and removed new hard drive, put the drive in<br> a new system and booted it.<br> the screen says<br> invalid partition<br> invalid partition<br> no /boot/loader<br> <br> defualt: 0:ad(0,a)/kernel<br> boot:<br> invalid partition<br> no /kernel<br> <br> so I type this in<br> 0:ad0(0,e)/kernel<br> <br> panic: rslock: cpu: 0, addr: 0x02c3770, lock: 0x00000001<br> mp_lock = 00000001; cpuid = 0; lapic.id = 0000000<br> automatic reboot in 15 sec<br> <br> the kernel was for a multi cpu server and I was trying to boot on a single<br> cpu. so I tried <br> 0:ad0(0,e)/kernel.old<br> <br> and it booted with the old single cpu kernel.<br> ( I will be using the multi cpu kernel when I install the new hd back <br> into the real server)<br> now Im lost at how to change it so it boots to<br> 0:ad(0,e)/kernel when it picks ad(0,a)<br> I though I do it with command fdisk but I didnt understand what I should <br> do.<br> <br> If there is something I have not done correctly please let me know.<br> or if there is a better and faster way to do this.<br> once I know how all of this works and fits together I would like to<br> get it added to the How-to to help other people and credit who help<br> in completion of this.<br> <br> Thank you for your help<br> <br> Tony<br> </font><br> </html> --=====================_90163238==_.ALT-- 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?4.2.0.58.20000814061709.00b855e0>