Hello.
After have done with lot of success a ISO bootable CD-ROM with mfsBSD,
I want to copy this distro to a hard disk.
First I did use
It works, the image is transferred, but with same partition size of the CD-ROM.
This is not what I want, I want to use the entire hard disk.
So I googled to find a other solution.
I find this =>
It seems to be perfectly what I want.
So, for formatting the hard disk I use that script (and it works) =>
OK, I have a bootable hard-disk.
But for next step, how to re-install the boot loader?
Thanks.
Fre;D
After have done with lot of success a ISO bootable CD-ROM with mfsBSD,
I want to copy this distro to a hard disk.
First I did use
dd if=/myimage.img of=/dev/da0It works, the image is transferred, but with same partition size of the CD-ROM.
This is not what I want, I want to use the entire hard disk.
So I googled to find a other solution.
I find this =>
Code:
...
While you can use dd to copy a disk like that, doing so has a number of drawbacks:
The destination must be exactly the same size or larger than the source.
After copying, you will need to resize the partitions to use any additional space.
You will waste time copying free space.
Any fragmentation present in the old disk is preserved.
You can also simply format the new disk, mount it, and copy all of the files over
with cp -ax ( as root ), and then reinstall the boot loader on the new drive.
This method does not suffer from any of the above drawbacks.
So, for formatting the hard disk I use that script (and it works) =>
Code:
#!/bin/sh
echo "This will format and add FreeBSD system to /dev/da0 (main disk)"
echo "..."
echo "Blank out the first chunk of the disk to destroy any MBR partition tables that might exist."
umount /media/disk
dd if=/dev/zero of=/dev/da0 bs=1m count=128
echo "Done ..."
echo "Creating a single (bootable/active) partition spanning the entire main disk."
fdisk -B /dev/da0
echo "Done ..."
echo "Writing a standard (bootable) freebsd disk label to the 1st partition."
echo "The standard label has the entire space usable as 'a'"
bsdlabel -w /dev/da0s1
echo "Done ..."
echo "Formating the disk for FreeBSD."
newfs -O2 -U /dev/da0s1a
echo "Done ..."
echo "Mounting the disk."
mount /dev/da0s1a /media/disk
echo "All done ..."
echo "You may access the disk in /media/disk."
echo "..."
echo "Press [Enter] to quit."
read something
But for next step, how to re-install the boot loader?
Thanks.
Fre;D