BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old December 15th, 2004, 10:31 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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.

Reply With Quote
  #2  
Old December 15th, 2004, 12:21 PM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
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.

Reply With Quote
  #3  
Old December 15th, 2004, 12:44 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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.

Reply With Quote
  #4  
Old January 15th, 2005, 01:19 AM
goggie goggie is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 5 goggie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #5  
Old January 15th, 2005, 07:27 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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.

Reply With Quote
  #6  
Old January 26th, 2005, 07:11 PM
Charlie_Root Charlie_Root is offline
root@*.*
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: London, UK
Posts: 15 Charlie_Root User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 35 m 6 sec
Reputation Power: 0
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
Comments on this post
M.Hirsch agrees: [++] Depenguinator *g

Reply With Quote
  #7  
Old January 27th, 2005, 06:33 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by Charlie_Root
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

"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:
Make sure that the first 40MB of space on your hard drive is not being actively used. If the first partition on your hard drive is being used for swap, run swapoff to disable it; otherwise, move your partitions around so that this is the case. Update: I have been told that, if you have partitions in the first 40MB which are mounted as ext2 (not ext3!) and you reboot -nf, then this might work. It didn't work for me.

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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Remote installation of FreeBSD.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway