View Single Post
  #1   (View Single Post)  
Old 26th July 2008
corey_james corey_james is offline
Uber Geek
 
Join Date: Apr 2008
Location: Brisbane, Australia
Posts: 238
Default FreeBSD Install Without Sysinstall

I was bored and thought i'd do a freebsd installation without the "aid" of sysinstall. Here's some instructions if anyone else wishes to do it

Here's how to do it:

Required materials :
FreeBSD install ISO
A hard drive
A current install of FreeBSD ( or a live cd )

1. Boot you freebsd installation
2. mount the ISO image
Code:
# mkdir /mnt/iso
# mdconfig -a -t vnode -f /path/to/iso -u 0
# mount -r /dev/md0 /mnt/iso
3. Create a slice on your drive ( assume /dev/da0 is the new freebsd drive ).
Code:
# sudo fdisk -i /dev/da0
Ensure your slice is marked as active
4. Create the partitions with bsdlabel. It's easier to use your current partition table and just edit. Here is the bsdlabel file i made
Quote:
# size offset fstype [fsize bsize bps/cpg]
# / - offset of the root partition MUST be zero else the system wont boot
a: 1g 0 4.2BSD
# swap
b: 1g * swap
c: * * unused
#/usr
d: 20g * 4.2BSD
# /tmp
e: 2g * 4.2BSD
# /var
f: 2g * 4.2BSD
# ZFS /home ( does not need a partition type but make it anyway )
g: * * 4.2BSD
5. newfs all your partitions
Code:
# newfs /dev/da0s1a
....
6. mount all your partitions
Code:
# mkdir /mnt/install
# mount /dev/da0s1a /mnt/install
# cd /mnt/install
# mkdir usr var tmp
# mount /dev/da0s1d /usr
# mount /dev/da0s1e /tmp
# mount /dev/da0s1f /var
7. untar all the files onto the drive. The freebsd installation is simple, all it does is boots up a mini OS and runs a few shell scripts that do the untarring. All you'll have to do here is run them manually
Code:
# cd /mnt/iso 
# ls
7.0-RELEASE     HARDWARE.HTM    README.TXT      boot            docbook.css
ERRATA.HTM      HARDWARE.TXT    RELNOTES.HTM    boot.catalog    floppies
ERRATA.TXT      README.HTM      RELNOTES.TXT    cdrom.inf       packages
# cd  7.0-RELEASE
# ls
base            doc             kernels         ports
catpages        games           lib32           proflibs
dict            info            manpages        src
Now, you need to export your installation directory so that the install.sh scripts will know where to untar the files.
Code:
# export DESTDIR=/mnt/install
Now run the 'install.sh' scripts in each of the directories. You will need to specify arguments for 'kernels/install.sh' and 'src/install.sh'. These arguments are quite self explanatory and explained when you run the script.
If you are really lazy you can do the following:
Code:
# for i in `ls | grep -v kernel | grep -v src`; do cd $i; ./install.sh; cd ..; done
Then run kernels/install.sh and src/install.sh with appropriate args.
7. That's it !
__________________
"No, that's wrong, Cartman. But don't worry, there are no stupid answers, just stupid people." -- Mr. Garrison

Forum Netiquette
Reply With Quote