|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Remote installation of FreeBSD.
I'm completely stuck.
I want to clone a FreeBSD partition including all its slices. Problem is that I do not have access to the destination PC other than a linux rescue system and remote reset. 1. try: Local: Start FBSD live CD, "dd if=/dev/ad0s1 of=./freebsd.img". On the remote PC, I use linux to create a partition with the same size, activate it and copy back the image with "dd" again. Results: Other machine can't boot past the mbr (a technician there told me it was stuck at "F1 FreeBSD"). 2. try: I read on the internet that UFS stores absolute C/H/S values in the superblock and thus cannot be relocated. Live CD again, this time I try to clone ad0 including everything. The head and sector count are the same (16/63). Only the cylinder number differs between the two discs. So on the destination PC I'll correct the partition table later with a hex editor. Local: dd if=/dev/ad0 of=./freebsd.img, remote: dd if=./freebsd.img of=/dev/hda Result: same as above. 3. try: local: dd if=/dev/ad0s1a of=./freebsd.img remote: boot the rescue system, setup partitions and disklabel with linux fdisk. Zeroing mbr, then writing back freebsd mbr, reboot, fdisk to reset partitions, reboot, write back freebsd boot sector, reboot, fdisk to reset slices, reboot. Then I use dd to copy back to the new hda5. Result: It doesn't boot either. (Dunno yet why as the technicians don't answer the phone. Maybe because I called them 15 times in 4 days? No, I hope they're fixing this other problem.) The images were ok. I tested by dd'ing them back to the original drive and they booted. It must be some odd reasons since I have cloned Linux and Windows installations like that before and never encountered any problems like that. Here the source was an 8GB IDE drive (LBA mode) and destination is 40GB IDE (LBA I guess since it's the default) What am I missing? Searched for "unattended FreeBSD installation". No help. Everything involves a CD-Rom and access to the console. Any other ideas to get freebsd installed to my remote server? ![]()
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#2
|
|||
|
|||
|
Hallo Herr Hirsch,
Do you write to the mbr? Try something like the following: dd if=/dev/ad0 of=.../ad0.mbr bs=512 count=1 and then using dd on each of the partitions and later restore with dd if=.../ad0.mbr of=/dev/ad0 was that any help at all? -Steven Last edited by stevengs : December 15th, 2004 at 12:31 PM. |
|
#3
|
|||
|
|||
|
I did write the mbr to hda and also the boot1 loader to hda1. Thus the many reboots above for try #3. Try #2 was a full copy of the first 500 MB of the hard disk thus including both boot sectors. (the rest of the HD is unused for now)
The mbr does load. The machine displayed "F1: FreeBSD" I was told by the technician. But it doesn't go on from there. No error message, it simply locks. So I guessed it can't find stage 1. Since then, I have made a dump of the mbr and partition boot sectors and compared them to my local versions. But they are identical .Still clueless... What is the big difference between Linux and BSD partitions (or filesystem?)? Right now I guess it could be that it does find stage1, but not stage2. Just another guess. The MBR finds the partition to boot by using the "active" flag. I'm currently looking into how stage 2 is being found. But I can't find the sources for stage 1. There is /sys/boot/i386/boot0 and boot2, but no boot1. Well, let's investigate all these other loaders... M. |
|
#4
|
|||
|
|||
|
Quickly off the top of my head - Check your block size on both sides
How do you connect to the remote PC and is local and remote the same type of HDD controller interface? |
|
#5
|
|||
|
|||
|
I am connecting to the remote machine via ssh. I also have got access to a web control panel where I can hard reboot the machine and enable "rescue mode", i.e. it boots a minimal linux image from the network.
Not sure about the block sizes. What kind of blocks do you mean? afaik, a block on a device is always 512b in unix, but to make sure I checked. Both are. Hard disk geometry is the same, only the cylinder count differs since one drive is bigger: 8GB: 16708 C, 16 H, 63 S, 1008 blocks per cylinder 40GB: 77545 C, 16 H, 63 S, 1008 blocks per cylinder Is there some other kind of blocks I can't think of right now? Both are ATA drives. The 8GB is a Seagate, the 40GB a WD. I have put aside this project for now because I had to get this server up before christmas. I switched to Debian Linux, but I am still looking for ways to make a FreeBSD remote installation. I am going to try this again and make some tests with two local machines in a few weeks. I'll post an update about the results then. If I can't make it work this way, I'm going to look into bootstrapping via a DOS partition (like loadlin) or with a modified PXE maybe. I was looking into it earlier, but the ways of booting FreeBSD don't seem to be too flexible ![]() M. |
|
#6
|
|||
|
|||
|
This came up on the freebsd-questions list today and since I had only seen this thread a few days back, thought I might as well put the info on here in case anyone else if looking for a solution.
Haven't looked into it much myself, so not sure how well it works... Depenguinator mailing list thread |
|
#7
|
||||
|
||||
|
Quote:
"Depenguinator" ![]() Thank you very much! This is exactly what I was looking for. I'll be offline for the next few hours... ![]() M. edit: Quote:
Uh, I guess that was my problem when posting originally. What's special about these first 40 MB of the hard disk? Never heard of this before... Last edited by M.Hirsch : January 27th, 2005 at 06:42 AM. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Remote installation of FreeBSD. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|