IPv4 Address:-
IPv6 Address:-
Service Provider:-
SSL Information:-
HTTP Protocol:-
Database:-
Web:-
Blog Menu


Search articles:
 

Recent articles (showing 61-69 out of 69):

 
Booting FreeBSD from GPT (for large disks) [10/Jan/2011]   Switching from MD5 to Blowfish/SHA512 password hashes in FreeBSD     Windows 7 IPv6 auto-assignment fix  

WARNING: This post has been marked as obsolete and may be incorrect. It is kept for archival purposes only. This is how to make freebsd boot from a GPT volume (needed for large RAID arrays etc).  The freebsd installer doesn't support anything exotic so we have to do this manually.

NOTE: FreeBSD 9.0 installer supports GPT by default now, so these instructions are for 8.x only

First, grab yourself a copy of DVD1 iso or the memory stick image and boot from it.  No other boot image will work – it MUST be the DVD or memory stick image!

Once you've booted into the installer and chosen your country and keyboard layouts, go to the Fixit menu and choose either CDROM/DVD or USB depending on the installation media you used.  This will open up a terminal window into a live filesystem booted from the DVD/USB.

Here, I'm going to use an Adaptec RAID disk (/dev/aacd0) which is multi-TB.  I will create a 100GB boot drive, and mount the remaining disk into /data using GPT all the way.

First, we need to remove any existing GPT partition info from the disk – ignore the 'invalid argument' message if you get it at this stage:

gpart destroy aacd0 Copy

Now we need to initialise the GPT partitions on the disk:

gpart create -s gpt aacd0 Copy

We will now make a boot (64KB), swap (4GB) and two UFS (100GB + remaining space) partition on the disk:

gpart add -s 128 -t freebsd-boot aacd0
gpart add -s 4G -t freebsd-swap -l swap aacd0
gpart add -s 100G -t freebsd-ufs -l boot aacd0
gpart add -t freebsd-ufs -l data aacd0 Copy


And now we have to install the protected MBR boot code into the drive:

gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 aacd0 Copy

Ok, now we've made our UFS partitions, we need to format and mount them:

newfs -O2 -U /dev/gpt/boot
newfs -O2 -U /dev/gpt/data
mount /dev/gpt/boot /mnt Copy


Now we're ready to install FreeBSD onto the new UFS partition.  We're going to install the base, manual pages, ports, all sources and a generic kernel – this takes some time so be patient...

cd /dist/8.1-RELEASE/
export DESTDIR=/mnt
for dir in base manpages ports ; do (cd $dir ; ./install.sh) ; done
cd src ; ./install.sh all
cd ../kernels ; ./install.sh generic
cd /mnt/boot ; cp -Rlp GENERIC/* /mnt/boot/kernel/ Copy


And now we're ready to configure the installation.  To make things easier, we will chroot into the environment:

chroot /mnt Copy

Set your root password:

passwd root Copy

And configure your timezone:

tzsetup Copy

And setup a dummy aliases file for sendmail to keep it quiet 😉

cd /etc/mail
make aliases Copy


You can do other configuration here, like adding a user etc – but when you’re done we can exit the environment:

exit Copy

We now add our UFS and swap devices to the /etc/fstab file as follows:

echo '/dev/gpt/boot / ufs rw 0 0' > /mnt/etc/fstab
echo '/dev/gpt/data /data ufs rw 1 1' >> /mnt/etc/fstab
echo '/dev/gpt/swap none swap sw 0 0' >> /mnt/etc/fstab Copy


And finally, create the mountpoint for the data partition:

mkdir /mnt/data Copy

Now we can exit the fixit shell, remove the media and reboot the computer.

Once it's booted, you can login and run sysinstall to configure other options like networking and startup programs (like SSH!)

Enjoy!

  Switching from MD5 to Blowfish/SHA512 password hashes in FreeBSD     Windows 7 IPv6 auto-assignment fix  
Copyright © 2024 Daniel Austin MBCS.
Proudly hosted using the FreeBSD operating system.
 
E-mail me
PGP Key
E-mail me
LOGGED IN
Login
padlock icon
LOGIN ERROR#123: random error here