# Newbie wanting to learn about FreeBSD



## freddo63 (Jan 12, 2013)

I just got rid of Windows, and switched to linux, but want to put FreeBSD on my laptop as well, to occasionally use for the purpose of getting to know it, what it's for and so on. I don't know much about it, other than that it's based on UNIX, which is my real learning goal. Anyways, I would like to find out whether what I am doing is a good idea, or FreeBSD is completely out of my league. I'd prefer not to do a virtualization of it, because then I'll probably never look at it. Anyways, I have a Compaq CQ56-115DX laptop with an AMD V140 64bit processor http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c02542735. I've tried googling and searching the support sections of the .org website, but couldn't find any information about V-series processors. Can anyone tell me either whether FreeBSD supports my system (or vice versa), or if I should just try an install and find out or how I can find this out?

Thanks in advance!


----------



## wblock@ (Jan 13, 2013)

It should work.  If you're expecting a GUI, it's somewhat easier to install PC-BSD.  Back up first, of course.

We had a Compaq user a couple of days ago that swore it "bricked" his hard drive.  Then he fixed it, neglecting to mention how, but did have time to complain about the "useless" help we offered.

So it might be worth reconsidering that VM usage.


----------



## freddo63 (Jan 13, 2013)

Cool! Thanks! I have no idea how he could possibly brick his HDD, but I would guess it was the only computer he had on hand, and no way to rewipe the drive and get something operable on it. At least that's how I might possibly brick my drive until I get access to another computer at work. Do you have a link to the thread he posted on?

Also, I went and got the amd64 image for memstick (USB flash drive), and used unetbootin in my Ubuntu desktop. However, when I booted it, it had something that looked more like unetbootin than the photos shown in the install guide, and it stops at some point asking me to give it a root mount, if I'm not mistaken. My options were ? for a list of partitions or slices if you will, blank and it would reboot, and then there was one more option, which I don't remember trying or what it was. Anyways, I have a feeling that I didn't do it correctly, and thus it didn't boot properly. Should I be using dd from ubuntu for making the image, or some other image creator? The MD5 checked out!

Oh and you're right I was expecting a GUI, but I don't mind learning to use a commandline OS. But if you were just referring to the installation process, well I'm used to command line installs.


----------



## wblock@ (Jan 13, 2013)

See Thread 36712.

Don't use Unetbootin.  Why do people keep doing that?  Use dd(1) on Linux or FreeBSD to write the image directly to the memory stick.  Make sure you are writing to the correct device, or it will ruin your day.

FreeBSD does not install xorg or a desktop environment by default.  They are available, but setting everything up requires time and commitment.


----------



## freddo63 (Jan 13, 2013)

wblock@ said:
			
		

> See Thread 36712.
> 
> Don't use Unetbootin.  Why do people keep doing that?  Use dd(1) on Linux or FreeBSD to write the image directly to the memory stick.  Make sure you are writing to the correct device, or it will ruin your day.
> 
> FreeBSD does not install xorg or a desktop environment by default.  They are available, but setting everything up requires time and commitment.



Heheheh! We use Unetbootin because that's one of ubuntu's defaults for creating a USB. I suppose people assume Linux coming from UNIX makes it quite likely that things in Linux work for UNIX, although I can see how that logic is a bit flawed. Anyways, I suppose that's what I was thinking when I used Unetbootin. I couldn't find instructions for making the boot drive on the FreeBSD site using Ubuntu OS. So when I googled, most things that came up were ubuntu boot drives. Oh yeah, I've heard dd is a DoomsDay device for those that don't know how to use it properly and don't take care.

Well I suppose installing xorg or some sort of GUI will be my first learning task. Does reboot or shutdown work as a command to turn off FreeBSD properly?


----------



## wblock@ (Jan 13, 2013)

The dd(1) command used on Ubuntu is the same as the one shown in the Handbook except for the output device.  Instead of /dev/da0, it will be /dev/sdb or /dev/sdc depending on your system.

For stopping or restarting, shutdown(8) is preferred over reboot(8).  It gives services a chance to stop.


----------



## freddo63 (Jan 13, 2013)

Well it looks like I have it all setup. Might have to go back and look at the network 
settings again, because it wouldn't download the handbook. 

It automatically rebooted on finishing the install, but it looks like it didn't set up a new bootloader, so I won't be booting FreeBSD for a while... hahahaahaha. I suppose that's my last question, and I hope it's not wrong to hijack my own thread? Either, is there a way to setup a bootloader from FreeBSD (which'd be sweet, since GRUB is looking kinda old and boring), or can you link me to a way to update GRUB so that it has FreeBSD? 

I've seen a certain post on that on the Ubuntu forums, but I've also noticed Ubuntu treats FreeBSD stuff almost as if it were alien, even the flash drive wouldn't show up properly as a file system. It did show up in gparted as one partition. 

Oh and thank goodness I didn't have any problems with my BIOS/booting.


----------



## freddo63 (Jan 13, 2013)

Oh and thank you so much for all you've told me so far! It's been incredibly helpful!


----------



## fbsduser (Jan 13, 2013)

go to a terminal window in the Linux OS and type 
	
	



```
lspci -v > lspci.txt
```
, 
	
	



```
sudo lsusb -v > lsusb.txt
```
 and 
	
	



```
sudo lshw > lshw.txt
```
. And post the lspci.txt, lsusb.txt and lshw.txt files (those 3 files contain the information you need about your hardware devices (your wireless card is the device that will probably give you the most trouble. The video card may need the propietary AMD drivers).

Also to add FreeBSD to the Linux bootloader (I'm assuming you use grub2, it will need to be adjusted if you use grub) make a new file in /etc/grub.d (I call mine 15_bsd to make it be parsed after the linux OS and before the memtest and os probing routines) and add this

```
#!/bin/bash

echo "Found FreeBSD system" >&2
cat << EOF
menuentry "FreeBSD 9.1 i686" {
        insmod ufs2
        set root=(hdx,y,a)
        kfreebsd /boot/loader
         }

EOF
```
where "_x_" and "_y_" are the disk and partition where FreeBSD was installed (disk numbering starts in 0 and partition numbering starts in 1), then make the file executable (sudo chmod ugo+x /etc/grub.d/_bootscript_)
and run 
	
	



```
sudo update-grub
```
 or 
	
	



```
sudo grub-mkconfig -o /boot/grub/grub.cfg
```
. Also, in case you are interested in the aestetic aspect of the boot managers (which is a silly, but perfectly valid opinion), this is how grub2 looks like with themes (http://i.imgur.com/1XvN5.png, http://www.javipas.com/wp-content/uploads/2009/08/Theme_winter_menu.jpg, http://apebox.org/wordpress/wp-content/gallery/grubtheme/grubthemes-00000010.png) and this is how the FreeBSD boot manager looks like (first stage: http://s60.radikal.ru/i170/1204/87/b729ec276bef.png, second stage: http://www.fleth.net/articles/images/01-freebsd.jpg)


----------



## wblock@ (Jan 13, 2013)

It's best to start new threads for new subjects.  A single subject gets the most attention and the correct type of attention, by people who know about the subject.


----------



## freddo63 (Jan 13, 2013)

Ok, i won't self-hijack after this anymore.
I've attached the suggested lists of hardware, and will edit about my success (or lack thereof) with updating my grub once I've tried those.


----------



## wolfspam (Jan 13, 2013)

> Anyways, I would like to find out whether what I am doing is a good idea, or FreeBSD is completely out of my league.



I just thought I'd share my experience with the system, maybe it'll help.

After a brief brush with pfSense and a frustrating a six months with Windows server 2003, I decided to just install FreeBSD as a headless server. It took me, a windows only user, roughly a month (of nonconsecutive work) to get everything I needed running (including a custom kernel, zfs only install etc) and a couple of months to get really comfortable working on the system. And that's without asking a single question to the community, just with google and the manuals. So I don't believe it to be out of the league of anyone with a little time to spare and sufficient drive.

Most of what I had to learn it seems you already know: how to partition, install a bootloader, edit config files, deal with devfs, write Bourne Shell scripts, compile from source etc.

My advice would be to first get a grip on how FreeBSD does things, like updating, ports/packages management, the rc scripts, which as I understand are different from linux, and then build up. If I had taken more time with the basics instead of rushing to get my apps working I would have avoided a lot of grief, like realizing some hacks were not sustainable after updates, that there was a lot of garbage from botched installs/updates etc.


----------



## freddo63 (Jan 13, 2013)

fbsduser said:
			
		

> go to a terminal window in the Linux OS and type
> 
> 
> 
> ...



Well i happen to have Grub2 so I put the following in my /etc/grub.d/40_custom file to give an extra entry in the menu.

```
menuentry "FreeBSD 9.1" {
        insmod ufs2
        set root='(hd0,1,a)'
        kfreebsd /boot/loader
}
```
Then I ran *sudo update-grub* but it doesn't show as detecting FreeBSD and I wonder if that's because Xubuntu doesn't see the FreeBSD filesystem. Anyways I rebooted just to see what would happen, and it says something along the lines of invalid partition, or partition not found or something of that sort. I know it's there because Gparted shows an ~8gb though it doesn't recognize it as any specific type of filesystem, which I believe, once again, is because xubuntu doesn't recognise ufs2 by default. Please remember that whatever commands you give me, I'm inputting them via Xubuntu.

Thank you wolfspam!! I like hearing about your experience, although I must admit I've never run servers before, so I really have little idea what administering a server is like, though I expect running microsoft must be the worst thing to try in the world! I'm glad you found it so easy to learn FreeBSD! I'll probably be taking it slowly learning a little at a time in my spare time!


----------



## freddo63 (Jan 13, 2013)

Oh and I found this, which I think can help me, if I knew how to substitute my own drive and partition labels as well as uuid and such, I'd be able to use these instructions, but since I can't see ufs2 from xubuntu, I can't get the uuid it seems. https://help.ubuntu.com/community/Grub2%20Other%20Os#FreeBSD


----------



## wolfspam (Jan 14, 2013)

Admittedly I find sysutils/grub2 a little alien and could not get it to work when first trying to multi-boot FreeBSD, so take anything I say with a grain of salt.

First, grub2 has UFS/UFS2 support, as evidenced by it's manual: http://www.gnu.org/software/grub/manual/grub.html, which could help you. Ubuntu also supports UFS2 although only mounts it read-only, read-write support must be added in the kernel. 

As for getting that information on your BSD partitions, you could just run gpart(8) from the live cd option of the FreeBSD install media, since ubuntu's gpart doesn't seem to support UFS2 even though it's mount does, as evidenced by it's manual page: mount(8) ubuntu. The command would look something like: `$ sudo mount -t ufs -r -o ufstype=ufs2 /dev/sda3 /mnt/FreeBSD`
Taken from ubuntu forums http://ubuntuforums.org/showthread.php?t=1645298


----------



## freddo63 (Jan 30, 2013)

Thanks for the help guys! I'm sure what you've given me will do the trick wolfspam, but I haven't had the chance to try it out, particularly because of time, and especially today because of some serious bank trouble I'm having. I'll let you guys know how the multibooting FreeBSD thing works out as soon as I've gotten into it. I just wanted to say that to let you guys know I appreciate you're input, so that you're not left hanging, wondering whether or not you're help was useful.


----------



## freddo63 (Feb 21, 2013)

I've had some problems running gpart from the liveUSB I created. I couldn't seem to get the UUID from gpart, it just showed me start and end points of the various slices. Would it hurt my two linux distros to just reinstall FreeBSD and GRUB2? I'm hoping that it will just see all three systems and set up GRUB2 accordingly.


----------



## wblock@ (Mar 3, 2013)

Well, that escalated quickly.  Let's start a new thread for new topics.

Edit: six off-topic messages deleted.


----------

