On Tue, Dec 05, 2006 at 08:03:56PM -0700, Steve Franks wrote:

> How does one make a 'boot' disk - be it cdrom, harddrive or flash
> (presuming your bios will boot from all those devices, of course)?
> 1.The handbook specifies you need to minimally copy the /bin folder to
> the destination.
> 2. Obviously you want a valid ufs2 partition.
> 3. I've repeatedly tried setting the 'bootable' option in fdisk, and
> the 'A' appears next to the slice, but everytime I reboot it
> dissappears, even after a 'W' command, so I'm going to try to get this
> to go without using sysinstall by a manual copy, if I can.
> 4. Windows partitions need some special files, i.e. ntldr, at a
> special location on the boot partiton - equivalent in bsd? Or does the
> loader just look for /bin and load the kernel from there?
> 5. bootloader seems to work when I put the disk in the new computer -
> get F1 and F2, but nothing else happens.
> Basically I'm trying to make an 'image' - put a fresh disk in my
> working system, format it, make it boot, at least to sysinstall, so I
> can put it in my other system that has no floppy or cdrom to install
> from, and get things rolling over the network card.  I was thinking I
> could just do this with a single partition on the target disk, like
> the install cdrom's do.  I want to turn a harddisk into an install
> cdrom, and then have it install to itself, a dangerous idea, no doubt,
> but it appears that it could work, I just can't get the new disk to
> boot in the new system.

If I understand you, you are trying to install enough of FreeBSD on a disk
that you will then move to another machine to finish the install???

First of all, why don't you just do the complete install on the
disk rather than just a part of it.

Second, did you write the MBR to the disk?  I would suggest this:
   dd if=/dev/zero of=/dev/da1 bs=512 count=32
   fdisk -BI da1
That first dd just makes sure no previous junk on the disk gets in the way.

The fdisk command writes two main things:  The primary slice table
and the MBR.   But, it does not put the boot sector there.   That
is done with bsdlabel.

   bsdlabel -w -B da1s1             will do it

Then, you have to divide that slice you made in the fdisk command
into at least one partition - probably several.
FreeBSD doesn't boot to the slice, but rather needs a real partition
that has been made in to a file system and had needed files written on it.
For that you again use bsdlabel.  The easiest is to use it in edit mode:

   bsdlabel -e da0s1

That puts you in an edit session to edit the partition table for the slice.
Edit it as you prefer.   I posted a long response yesterday that gives
a good example.   

Then, you should install all of what goes in root and preferably also
what goes in /usr before trying to boot.

You can do all this through sysinstall and if you really must only
partially install, then just get really selective on what you tell
it to install rather than just take the general/normal installation.

But, as I said above, just do the whole install at this time.
The only thing you might come out funny on are the device names
it puts in /etc/fstab.    In might name them da1 or ad1 instead of
the da0 or ad0 you need when you move the disk over to the other 
machine.  So, mount up the newroot (on the new disk) and check out
the /newroot/etc/fstab file and edit if necessary before moving
the disk over.


> Thanks,
> Steve
> -- 
> Steve Franks, KE7BTE
> Staff Engineer
> La Palma Devices, LLC
> http://www.lapalmadevices.com
> (520) 312-0089
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to