Mount a harddisk, change password, and set default gateway in FreeBSD

How to mount a harddisk in FreeBSD

We want to access the data from a harddisk drive or an USB memory. Then we need to mount it on FreeBSD. This is done by mount the device onto an empty directory. After that is done we should be able to see what’s on that drive inside of that directory after the mount process.

First step is to create an empty directory. So imagen that user foo wants to mount the harddisk on a new folder named photos. First he need to create an directory inside of hes home directory.

1
2
3
# creates a new directory
mkdir /home/foo/photos

Next step is to mount the harddisk on the mounting point. All devices on your system can be found under /dev/ directory. In my case, I want to mount my device /dev/da1 on /home/foo/photos/ directory. So then I use this command.

1
mount /dev/da1 /home/foo/photos

You should now be able to see all the files in /home/foo/photos

How to mount other filesystems

In case we are having an USB memory device with Fat32 filesystem, we are in a situation when we have to tell FreeBSD to use a foreign filesystem. Here you have the mount command for fat/fat32.

So when I mount my usbmemory onto the /home/foo/photos/ directory I do like this.

1
mount -t msdosfs /dev/da1s1 /home/foo/photos/

For more information about which foreign filesystems are being supported by FreeBSD project, visit FreeBSD website by clicking here

How to unmount a filesystem

Let’s say that you want to remove the mounting of an device. This could be for several reasons, the most common is that you might want to erase a disk or move it over to another mount point. In case of un mounting an device do as this.

1
umount /home/foo/photos/

Make sure you are not standing inside the directory you try to unmount else it wont work.

In case you wish to mount drives on startup then we need to alter the /etc/fstab file.

http://bsdtutorial.org/freebsd/mount-a-harddisk

———————————————–

Set default gateway in FreeBSD – IPv4

The default gateway is the address to the first gateway (router) you will reach in your network from your machine. In case you’ve set IP and DNS correct but your packages cannot reach, it might be because you’ve not set the default gateway address which means that your packages don’t know where to be sent from the machine to the first router.

So let’s set the default gateway in /etc/rc.conf so it remains after every reboot of the machine. Then edit the /etc/rc.conf file and add this line.

1
defaultrouter="192.168.0.1"

And thats it, after a reboot your machine will have that address as default router.

How to remove default router and add a new one

1
2
route delete default
route add default 192.168.0.1

http://bsdtutorial.org/freebsd/set-default-gateway 

————————————————

How to change password in FreeBSD

There are two type of users, root and normal users. The user root is able to change the password on normal users and the normal users can only change their own password.

If you are logged in as root and want to change password on user flouken then do like this.

1
passwd flouken

After that command you will be asked to enter a new password for the user.

In case you’re a normal user and want to change your own password then do like this.

1
passwd

And you will be asked to enter a new password.

http://bsdtutorial.org/freebsd/change-password

BSDFan, a simple fan control utility for ThinkPads

FreeBSD user clod89 created a utility to control your ThinkPad’s fan:

If you’ve ever used FreeBSD (or any other BSD for that matter) on a ThinkPad you might have noticed the loud and erratic behavior of the fan. I’ve written a small utility as per title to manage the fan and improve silence, coolness and battery life. If anyone finds it useful I’ll make a port for it.

Be careful when playing with fan levels and temperatures.

Have fun.

https://github.com/darklightclod/bsdfan

Check out the original post here: https://forums.freebsd.org/threads/bsdfan-a-simple-fan-control-utility-for-thinkpads.48836/

AsiaBSDCon 2015

AsiaBSDCon is a conference for users and developers on BSD based systems. The next conference will be held in Tokyo, in 12-15 March, 2015. The conference is for anyone developing, deploying and using systems based on FreeBSD, NetBSD, OpenBSD, DragonFlyBSD, Darwin and MacOS X. AsiaBSDCon is a technical conference and aims to collect the best technical papers and presentations available to ensure that the latest developments in our open source community are shared with the widest possible audience.

For more information head on over to their website: http://2015.asiabsdcon.org/

FreeBSD 10.1-RC4 now available

freebsdlogoThe fourth RC build of the 10.1-RELEASE release cycle is now available
on the FTP servers for the amd64, armv6, i386, ia64, powerpc, powerpc64
and sparc64 architectures.

This is anticipated to be the final RC build of the 10.1-RELEASE cycle.

The image checksums follow at the end of this email.

Installer images and memory stick images are available here:

ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/

If you notice problems you can report them through the Bugzilla PR
system or on the -stable mailing list.

If you would like to use SVN to do a source based update of an existing
system, use the “releng/10.1″ branch.

A list of changes since 10.0-RELEASE are available here:

https://www.freebsd.org/releases/10.1R/relnotes.html

Check out the official announcement here: https://lists.freebsd.org/pipermail/freebsd-stable/2014-November/080872.html

FreeBSD turns 21

freebsd-birthday-20-yearsOn November 1, 1993, the first official production version of FreeBSD was released, 1.0. FreeBSD is now officially 21 years old. Cheers!

From: jkh@whisker.lotus.ie (Jordan K. Hubbard)
Newsgroups: comp.os.386bsd.announce
Subject: FreeBSD 1.0 RELEASE now available
Date: 1 Nov 1993 16:12:20 -0800

The first “official” release of FreeBSD 1.0 is now available, no more greek letters – this is the “production” release.

While a fair number of bugs were also whacked between EPSILON and RELEASE, the following additional features deserve special mention:

  • A dynamic buffer cache mechanism that automagically grows and shrinks as you use the memory for other things. This should speed up disk operations significantly.
  • The Linux sound driver for Gravis UltraSound, SoundBlaster, etc. cards.
  • Mitsumi CDROM interface and drive.
  • Updated install floppies.
  • More fail-safe probing of devices on the ISA bus. This makes it much harder for devices to conflict with each other.
  • Advance syscons support for XFree86 2.0.

Check out the original announcement here: https://www.freebsd.org/releases/1.0/announce.html

Installing Drupal on FreeBSD

logo-drupalThis tutorial by Enrico Crisostomo shows us how to install Drupal on FreeBSD.

Drupal ports have been available on FreeBSD since quite a long time, and binary packages can be installed very quickly. However, manual setup is required to connect Drupal to the database and have Apache serve the Drupal website. In this post I’ll describe the setup procedure of Drupal 7 on FreeBSD 10.0. The process will not be very different if different versions of Drupal or FreeBSD are used.

Check out the full tutorial here: http://www.javacodegeeks.com/2014/10/installing-drupal-on-freebsd.html

FreeBSD 10.1-RC3 now available

freebsdlogoThe third RC build of the 10.1-RELEASE release cycle is now available
on the FTP servers for the amd64, armv6, i386, ia64, powerpc, powerpc64
and sparc64 architectures.

The image checksums follow at the end of this email.

Installer images and memory stick images are available here:

ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/

If you notice problems you can report them through the Bugzilla PR
system or on the -stable mailing list.

If you would like to use SVN to do a source based update of an existing
system, use the “releng/10.1″ branch.

A list of changes since 10.0-RELEASE are available here:

https://www.freebsd.org/releases/10.1R/relnotes.html

Check out the full release notes here: http://lists.freebsd.org/pipermail/freebsd-stable/2014-October/080701.html

How to Install Nano/Pico on FreeBSD

http://geeksterminal.com/wp-content/uploads/2011/05/Nano-Edito.png

This tutorial by techtipz.biz shows us how to install Nano/Pico on FreeBSD from the ports collection.

I’ve  never got to grips with using ‘vi’ to edit files from the command line. So one of the first things I need to do is configure the nano/pico text editor so I can properly edit and save out files. Here’s a nice and simple howto get nano running on a FreeBSD server.

Sudo to root and then execute the following command:

  1. cd /usr/ports/editors/nano && make install clean

Thats it.

If you have people who can’t stop themselves typing ‘pico’ to bring up the text editor then you can symlink to the new nano binary as follows:

  1. ln -s /usr/local/bin/nano /usr/local/bin/pico
  2. rehash
  3. pico

Job done!

Check out the official post here: http://techtips.biz/howto-install-nanopico-on-freebsd-from-ports-collection/