# How to install pre-packaged software from DVD FreeBSD 9.1



## john999 (Jan 7, 2013)

Hi,

I installed the FreeBSD 9.1 Base from DVD withour problems. How can I install the pre-packaged software from the same media? With bsdinstall or sysinstall is not working.

Regards
John999


----------



## SirDice (Jan 7, 2013)

Mount the CD/DVD, change directory to where the packages are and use pkg_add(1).


----------



## john999 (Jan 10, 2013)

Thanks, is work!


----------



## TroN-0074 (Jan 11, 2013)

I would like to do the same but,what am I doing wrong? I mounted the dvd by typing


```
# mount_cd9660 /dev/cd0 /cdrom
```

Then I do

```
# cd /cdrom/packages/ && pkg_add -r gnome
```

and I get 



> Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.1-release/Latest/gnome.tbz: File unavailable (e.g., file not found, no access)
> pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.1-release/Latest/gnome.tbz' by URL



I would appreciate it. I actually wanted to install Xfce but since I am getting way too many errors compiling it I thought to install Gnome from the DVD.
I will appreciate all advice, thanks


----------



## wblock@ (Jan 11, 2013)

pkg_add(1):


```
-r, --remote
             Use the remote fetching feature.  This will determine the appro-
             priate objformat and release and then fetch and install the pack-
             age.
```


----------



## SirDice (Jan 11, 2013)

Yep, remove the -r (remote) option and pkg_add(1) the file that's on the DVD.


----------



## Beastie (Jan 11, 2013)

And don't forget that when using pkg_add(1) locally, you must pass it full filenames, e.g.:
`# pkg_add gnome2-2.32.1_4.tbz`
Or whatever is currently on the DVD.


----------



## TroN-0074 (Jan 11, 2013)

Thank you, it was good.
I have Gnome now on my desktop enviroment, I wanted Xfce but it is fine for now. The packages are in the directory /packages/All 

Again Thank you!


----------



## piggy (Jan 13, 2013)

john999 said:
			
		

> Hi,
> 
> I installed the FreeBSD 9.1 Base from DVD withour problems. How can I install the pre-packaged software from the same media? With bsdinstall or sysinstall is not working.


I remember long ago FreeBSD had a basic install able to install packages too and not just the bare base system. I'm surprised they even dismissed this basic then valuable feature, especially for new users. In this actual conditions, who want to try FreeBSD? Just Masoch disciples would


----------



## john999 (Jan 14, 2013)

To install the packages from DVD/ISO image executed these steps:

If you use a iso file:
`#  mdconfig -a -f /path/to/iso/FreeBSD-9.1-RELEASE-i386-dvd1.iso` to create a new device. In the console the name of the new device ca be md0 or md1 or md2 ...
`#  mount_cd9660 /dev/md0 /mnt/iso` to mount the device md0 into /mnt/iso. /mnt/iso must exist.

If you use the DVD distribution:
`#  mount_cd9660 /dev/cd0 /mnt/dvd` to mount the device cd0 into /mnt/dvd. /mnt/dvd must exist. The name of the device (cd0) unit appear in the /var/log/messages. You can use "*tail -f /var/log/messages*" before you insert the DVD to identify the device name. A external USB unit can be very well identified as "cd1".

After you have mounted the DVD/ISO: 
`#  cd /mnt/iso/packages/All` switch into this directory
`# pkg_add <full_name of_package>` to install the new package
For example: `# pkg_add gnome2-2.32.1_4.tbz` In this way we can install gnome2 with all dependencies
You can install so many packages as you wish, the dependencies are automatically resolved. But, the DVD/ISO contain only a small "repository" of packages, more packages are only available online or from ports. To install new packages from internet repository use "*pkg_add -r <package_name>*" (you don't need to use a full name of the packages). At this moment (Jan. 2013), the FreeBSD team reorganise the structure of the repositories and no packages are available online for the FreeBSD 9.1 distribution.

After installation:
`#  umount /mnt/iso`
to umount the iso file
`#  mdconfig -d -u md0` to delete the device
or 
`#  umount /mnt/dvd` to umount the DVD


If some software are not present on the dvd/iso, you must install it using the ports.
For example we wish to install hiawatha web server. 
`#  portsnap fetch` --> to get the ports files
`#  portsnap extract` --> to extract the ports files
or execute only
`#  portsnap update` --> if you have the ports files dowloaded and only a update is necessary

`#  cd /usr/ports` --> to change to ports directory
`#  make search name="hiawatha"` --> I got the path "/usr/ports/www/hiawatha"
`#  cd /www/hiawatha` --> go into directory
`#  make install clean` --> install from source

The compiled software is under /usr/local (user space) installed.

I wish you much fun
John999


----------



## fonz (Jan 14, 2013)

piggy said:
			
		

> I remember long ago FreeBSD had a basic install able to install packages too and not just the bare base system.


Not that long ago, actually. I suspect it was dropped when _sys_install was replaced with _bsd_install in 9.0-RELEASE.


			
				piggy said:
			
		

> I'm surprised they even dismissed this basic then_[sic]_ valuable feature, especially for new users.


Speaking for myself, I haven't used it since I started using ports instead of packages, which was a long time ago. But nevertheless I do find it somewhat surprising that this feature has been dropped.

Fonz


----------

