Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 2009 10:38:55 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Bret Busby <bret@busby.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Question about FreeBSD installation procedure
Message-ID:  <20090928143855.GA15919@gizmo.acns.msu.edu>
In-Reply-To: <Pine.LNX.4.64.0909262129230.12228@bretnewworkstation.busby.net>
References:  <Pine.LNX.4.64.0909262129230.12228@bretnewworkstation.busby.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 26, 2009 at 10:01:18PM +0800, Bret Busby wrote:

> Hello.
> 
> I have been interested in installing FreeBSD on my laptop (HP/Compaq 
> NX5000, 2MB RAM), in a free 20MB partition.
> 
> I noticed that the Linux Format magazine to which I subscribe, in Issue 
> 124, comes with FreeBSD 7.2 on the DVD.
> 
> >From what I understand, FreeBSD (and possibly all BSD) uses hard disc 
> >slices rather than partitions, and therefore cannot
> easily be installed in a free partition, but needs for hard disc slices to 
> be used.
> 
> Is it yet possible to install FreeBSD into a hard disc partition, rather 
> than needing to install into hard disc slices?

I think other responders have handled most of what you need to know.
But, to try and be clear for a newbie;  you are running in to a 
terminology issue here.    MS and FreeBSD use the word partition
to mean different (but related) things.

Generally, in MS, the terms partition and primary-partition often get
used interchangeably.   But, they normally mean primary-partition.
MS does also have and 'extended-partition'  which somewhat corresponds
to the division that FreeBSD calls a partition, but it is implemented
much differently and is not compatible with FreeBSD - although there
are now some FreeBSD utilities that can read a MS extended-partition.

FreeBSD, Linux and MS have primary-partitions, but they call them
different things.   FreeBSD calls them slices.    Too bad MS didn't
follow that pattern.  Things would be more clear.

Anyway a primary-partition/slice is determined by the BIOS, not actually
the operating system,  A standard BIOS allows for 4 main divisions of
a disk hard-drive.  They are numbered from 1..4 even though in computers
it is common to number things from 0..n.    

Each of those are primary-partitions in MS language and slices in FreeBSD 
language.   If I remember right, Linux refers to these as partitions and 
primary-partitions somewhat interchangeably, but I am not so familiar 
with Linux.

Each primary-partition in either MS, FreeBSD or Linux can be subdivided
into chunks.  In MS, they are called extended-partitions, in FreeBSD
they are called partitions and I forgot what Linux calls them.

/FreeBSD has a broader outlook on things and if you are going to use
/a hard-drive only for FreeBSD you can even skip creating a primary
/partition and any subdivisions.  You just have newfs build a filesystem
/right on the disk.  That is called creating a 'dangerously- dedicated' disk.   
/It is not really dangerous.  It is just not compatible with other systems.

Each primary-partition (or the dangerously-dedicated disk) can be made
bootable.   Each has an initial sector(512 byte block) in the initial 
track on the disk that is called the boot sector.   If that contains 
bootup code the system consideres it to be bootable.

In addition, there is a sector-0 on each disk that controls everything.
In general, this sector is normally called the MBR.  It is just enough
code to look for boot sectors and let you select one and then read in
that sector and transfer control to it.   Actually, some fancy MBRs
take advantage of the fact that a whole track is being wasted for the
sake of that one sector and put much more sophisticated code there that
allows more complex choices.  But the original standard was just one
sector.

So, what happens is that the BIOS has a list of devices to look on for
MBRs.  It grabs the first one in the list that it recognizes and starts
to execute it.   That MBR will find boot sectors from those primary-
partitions that it recognizes as bootable and give you a choice of 
which you want to boot from.   Most have a default if you do not make
a selection before a timeout.  FreeBSD MBR defaults to booting the most
recently booted one.

That boot sector is read in and starts executing.  It starts pulling
the rest of the boot code and that begins to put your kernel in along
with its extra modules and starts that running which starts init to 
run and so on.

You can make any of the primary-partitions/slices be FreeBSD, MS or 
Linux and all on the same disk.    Often when you get a machine loaded
with MS, such as XP, only two primaries (slices) are used, but they
are sized to take up the whole disk.    Usually one of those slices
is a hardware vendor diagnostic/maintenance system and the other is
whatever MS you have.   The diagnostic slice is very small and the MS
slice takes up everything else with lots of empty space.  When what
you have to do is get a stand-alone utility that manages disk partitions
and shrink that MS primary-partition and make room for another.  Most of
them are somewhat MS-centric and complain about making more than one
primary-partition, but they will do it.    Just make the newly freed-up
space an unspecified primary partition and then install FreeBSD in to it.

I have used Partition Magic, but the new version (8) is poor.  Use
version 7 if you can get it.   But neither of these work properly
with USB drives.   I had to send PM-8 back for a refund.   

A free utility that works quite well, though with less pretty
graphics is 'gparted'.   Download it and make a boot disk from it.

Boot it up.   Ignore warnings of not being able to book if the 
boot sector is beyond a certain number.   That is archaic.  
Follow the instructions.

A couple of extra things to know.   Most of the free utilities are
a bit old and do not handle MS NTFS file systems properly.
gparted seems to be OK.   That is one thing Partition Magic 7 does
well.    

The other is that I have heard that MS Vista totally screws things up.
It seems to cause problems with MBRs, but I don't know just what they are.
I haven't had to mess with Vista yet and am not wishing to ever see it
on any of my machines.    I have not heard about Win-7 yet and if it
presents any particular problems.

> 
> I have attached a copy of the screenshot showing the partition table; I 
> wanted to install FreeBSD into sda8.


Attachments are not allowed in the list so it was stripped.


> 
> Can this be done.

Well, hopefully you mean 20GB and 2 GB instead of 20 MB and 2 MB.
If you have a free 20 GB primary-partition, sure it can be done.
It is a little small for todays standards, but FreeBSD will install
and run from that much.   Just plop the FreeBSD install CD in the 
drive and boot it up.   You might have to tinker with the BIOS
if the CD is not in the BIOS boot list.

////jerry

> 
> Thank you in anticipation.
> 
> --
> Bret Busby
> Armadale
> West Australia
> ..............
> 
> "So once you do know what the question actually is,
>  you'll know what the answer means."
> - Deep Thought,
>   Chapter 28 of Book 1 of
>   "The Hitchhiker's Guide to the Galaxy:
>   A Trilogy In Four Parts",
>   written by Douglas Adams,
>   published by Pan Books, 1992
> 
> ....................................................
> 
> ---------- Forwarded message ----------
> Date: Sat, 26 Sep 2009 21:28:37 +0800
> From: Bret Busby <bret@busby.net>
> To: bret@mailserver
> Subject: screenshot of partition table of laptop
> 
> 
> -- 
> --
> Bret Busby
> Armadale
> West Australia
> ..............
> 
> "So once you do know what the question actually is,
>  you'll know what the answer means."
> - Deep Thought,
>   Chapter 28 of Book 1 of
>   "The Hitchhiker's Guide to the Galaxy:
>   A Trilogy In Four Parts",
>   written by Douglas Adams,
>   published by Pan Books, 1992
> ....................................................

> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090928143855.GA15919>