Re: FreeBSD 7.0 fdisk issue during installation

2008-11-22 Thread Jonatan Evald Buus
Thank you both for the very detailed description.
It's nice to get my suspicion about boot sequencing confirmed :-)

When I installed the system yesterday (I think I'll try a re-install today
based on your input) I observed however that all the slices I made appeared
to be bootable.
As originally mentioned I managed to get the system to boot when I only had
4 slices which resulted in the system only wanting to boot through the
FreeBSD Boot Manager. The Boot menu listed 4 menu items, each called
FreeBSD.
If I only used the MBR to boot however, then the machine would fail with
Invalid Partition Table during startup.

I'm quite confident that I had only specified a single slice (/) as being
bootable through fdisk in sysinstall but apparently all 4 of them were made
bootable anyway.
I took a picture of my fdisk screen which can be found at
http://demo.ois-inc.com/freebsd_fdisk.jpg
From the picture it appears (to me anyway) that only the first slice should
be bootable as indicated by the A flag?

Not sure what to make of this observation as you both indicate that I
wouldn't have had these problems if I only had made 1 slice bootable.
Does sysinstall make all slices bootable automatically?

Appreciate any input you may have to this observation.

/Jona

On Fri, Nov 21, 2008 at 11:58 PM, Jerry McAllister [EMAIL PROTECTED] wrote:

 On Fri, Nov 21, 2008 at 10:41:07PM +0100, Jonatan Evald Buus wrote:

  Hi Jerry,
  Thank you for the swift and very thorough response.
 
  If I understand you correctly, then I should only create 1 slice of the
  entire disk (seeing as FreeBSD will be the only OS) using fdisk and then
  partition the slice using bsdlabels from sysinstall?

 Yes.   Or you don't have to use sysinstall.  You can do it
 manually.   But, using sysinstall makes it easy.

 You don't absolutely have to slice or bsdlabel it.
 You can either just newfs the device /dev/da0 or you can create a slice
 and just newfs that /dev/da0s1.   Then you get that 'dangerously dedicated'
 disk which FreeBSD can use, but nothing else can including some non-FreeBSD
 boot managers.   Some people do that to save a couple thousand bytes of
 space, but on a multi-gigabyte drive, who cares about a couple thousand
 bytes.

  Previously I was aiming for 5 slices, each of which had a single
 partition
  as described below.

 Yup.   That won't work.

  From your explanation I take it that slices are what Windows refers to
 as
  Primary Partitions?
  If that's the case then I understand the behaviour I experienced.

 Yes.   There is that conflict of terminology.
 But, FreeBSD has called it slices from the beginning.

  Is it possible to make a slice non-bootable?

 Yes.   Just don't put in an MBR and don't mark it bootable in
 the fdisk stage.

  And would there be any benefits (less fragmentation, faster access time
  etc.) in using slices rather than partitions to layout the harddrive or
  should slices only be used to represent a physical harddrive?

 There is no advantage in making a slice non-bootable, except you might
 be able to save a few bytes of storage - storage that is not normally
 used anyway.   There is no advantage in speed or access time and
 fragmentation is only a MS worry.   It is not an issue in superior
 UNIX filesystems - at least in FreeBSD's.

 I don't understand the last line of that paragraph.
 Pretty much everything is virtual in disk drive addressing nowdays.
 It doesn't matter which level you refer to.

 The slice and its limit to 4 is a feature of standard BIOS basically.
 All the other things, partitions, extended partitions, etc are ways
 of getting around the limits.The only real reason nowdays to
 have more than one slice on a drive in FreeBSD is if you want to put
 more than one bootable system on the drive.   For example, the machine
 I am typing on has MS-XP and FreeBSD, plus a Dell diagnostic slice -
 so three slices are used.   I could squish those slices down and add
 one more, say for Linux or a different version of FreeBSD if I wanted,
 but I don't.

 Generally, when I make a machine intended only for FreeBSD, I put all
 the disk in one bootable slice.   Then I partition that slice to
 suit me.  My pattern is usually:
   a   /  (root)
   b   swap (125% of memory size)
   c   defines the slice - not a real partition
   d   /tmp (used as scratch space by many utilities)
   e   /usr
   f   /var (size depends on logging and databases which live here)
   g   /home(user home directories, plus I put some of the things
 that can grow unexpectedly such as /var/mail,
 /var/spool
 /usr/ports, /usr/local  here and make symlinks to them)

 Some people make just one big partition for root plus some for swap.
 I like the control I have over things my way a little better and I
 can get by with backing up and restoring more manageable chunks my way.

 If the machine is to be a dual boot as this one is,  I carve it up in
 to slices - one 

FreeBSD 7.0 fdisk issue during installation

2008-11-21 Thread Jonatan Evald Buus
Greetings,
I tried to install FreeBSD 7.0 on an old server earlier today and ran in to
a number of issues related to slicing and labeling the disk using fdisk.
The drive in the machine is a 40GB Seagate Barracude (ST34001A) installed as
a Secondary Master on the IDE bus using LBA.
The BIOS reports that the drive has 16 sectors pr block, but little else.

When accessing fdisk during install, fdisk complains that the disk geometry
is invalid and sets it to the default geometry for 40GB:
Cylinders: 4865
Heads: 255
Sectors: 63
I've tried with the following configuration based on what was reported by
the BIOS:
Cylinders: 19150
Heads: 255
Sectors: 16
Looking in the manual:
http://www.seagate.com/support/disc/manuals/ata/cuda7200pm.pdf, Seagate is
specifying the following logical characteristic:
Cylinders: 16383
Read / Write heads: 16
Sectors pr track: 63
Which of these settings should be the correct one for the fdisk geometry?

Additionally I encountered problems during installation if splitting the
disk into more than 4 slices. This would cause the following error to be
thrown during prior to the install files being copied (when sysinstall was
executing the newfs commands):
Error mounting /mnt/dev/X on /mnt/usr. No such file or directory
Using only 4 slices seems to have solved this error, however I'd like the
disk layout to use 5 slices as follows:
/ = 512MB
swap = 2048MB (the machine has 1024MB RAM)
/tmp = 512MB
/var = 2048MB
/usr = whatever remains
I noticed that when having 5 slices, the last slice (/usr) would be named X
rather than ad2s5 as I'd expect (the drive was detected as ad2).
Is this behaviour related to the error in any way?
Also, is the above disk layout good for a server intended to run both a web
server (Apache) and a database server (PostGreSQL) ?

Finally after installation (using only 4 slices) the system will only boot
if the FreeBSD boot manager is used.
This in turn causes a 4 menu options, all of them named FreeBSD to appear
during startup despite only the / slice having been set as bootable in fdisk
which appears to be indicated by an A in the flag column.
Selecting the first menu item by pressing F1 will make the system boot as
expected.
It seems rather silly though to use a boot manager when FreeBSD is the only
operating system that is installed (and ever will be installed) on the
machine.
If the FreeBSD boot manager is not used however and only the MBR is set
during installation, the system will fail at startup with error Invalid
Partition Table.
Is this because the harddrive is installed as the Secondary Master on the
IDE bus?

Appreciate any input on this

Cheers
Jona
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 7.0 fdisk issue during installation

2008-11-21 Thread Jerry McAllister
On Fri, Nov 21, 2008 at 08:03:58PM +0100, Jonatan Evald Buus wrote:

 Greetings,
 I tried to install FreeBSD 7.0 on an old server earlier today and ran in to
 a number of issues related to slicing and labeling the disk using fdisk.
 The drive in the machine is a 40GB Seagate Barracude (ST34001A) installed as
 a Secondary Master on the IDE bus using LBA.
 The BIOS reports that the drive has 16 sectors pr block, but little else.
 
 When accessing fdisk during install, fdisk complains that the disk geometry
 is invalid and sets it to the default geometry for 40GB:
 Cylinders: 4865
 Heads: 255
 Sectors: 63
 I've tried with the following configuration based on what was reported by
 the BIOS:
 Cylinders: 19150
 Heads: 255
 Sectors: 16
 Looking in the manual:
 http://www.seagate.com/support/disc/manuals/ata/cuda7200pm.pdf, Seagate is
 specifying the following logical characteristic:
 Cylinders: 16383
 Read / Write heads: 16
 Sectors pr track: 63
 Which of these settings should be the correct one for the fdisk geometry?

Let the system set it and just go with what it does. 
Geometry is virtual nowdays.   Except in some unusual situations
(on IDE) Cylinders, heads and sectors most often do not mean what 
they used to.   The system drivers have it all figured out.  The
important thing for you is the total number of blocks/sectors. 

If that doesn't work, you will have to do some diagnosis, but in
about 10 out of 9 times, accepting how FreeBSD sets it is correct
and works.


 Additionally I encountered problems during installation if splitting the
 disk into more than 4 slices. This would cause the following error to be
 thrown during prior to the install files being copied (when sysinstall was
 executing the newfs commands):

You cannot have more than 4 slices.
The system limits you to 4 slices, identified by numbers 1..4

Once you divide in to slices, each can be further divided in to
up to 8 partitions, although it is really 7 because partition 'c' has
special meaning and is not really available to be a real partition.
Partitions are identified with alpha letters a..h - with 'c' being
used to identify the whole slice.

You use fdisk to create the slices (and write the MBR and set 
the bootable flag).

Then you use bsdlabel (formerly called disklabel) to create the
partitions within a slice (plus write the slice boot block.

Typically, you want to make partition 'a' be the root (/) filesystem
and 'b' be swap space on a bootable system slice.   Some things assume 
these designations.

Then you newfs partitions a, d, e, f, g, h or as many as you use.
But don't touch c and don't newfs b if it is to be swap.

jerry

 Error mounting /mnt/dev/X on /mnt/usr. No such file or directory
 Using only 4 slices seems to have solved this error, however I'd like the
 disk layout to use 5 slices as follows:
 / = 512MB
 swap = 2048MB (the machine has 1024MB RAM)
 /tmp = 512MB
 /var = 2048MB
 /usr = whatever remains
 I noticed that when having 5 slices, the last slice (/usr) would be named X
 rather than ad2s5 as I'd expect (the drive was detected as ad2).
 Is this behaviour related to the error in any way?
 Also, is the above disk layout good for a server intended to run both a web
 server (Apache) and a database server (PostGreSQL) ?
 
 Finally after installation (using only 4 slices) the system will only boot
 if the FreeBSD boot manager is used.

That is probably because you have created what is referred to in the
documentation as a dangerously dedicated disk.   You can make it
work that way.  FreeBSD can handle it.   But other systems will not 
play nicely with it.

 This in turn causes a 4 menu options, all of them named FreeBSD to appear
 during startup despite only the / slice having been set as bootable in fdisk
 which appears to be indicated by an A in the flag column.

Again, because you tried to do it the wrong way.   You created 4 FreeBSD
slices, probably each with an MBR and so the BIOS and the first MBR think
they are all bootable.


 Selecting the first menu item by pressing F1 will make the system boot as
 expected.
 It seems rather silly though to use a boot manager when FreeBSD is the only
 operating system that is installed (and ever will be installed) on the
 machine.

You can put in the other non-boot manager block during installation
if you want and it will only boot FreeBSD.   But, something is needed.
I forget what they call it in the sysinstall screen, but you might just
as well put in the FreeBSD boot manager (MBR).  

 If the FreeBSD boot manager is not used however and only the MBR is set
 during installation, the system will fail at startup with error Invalid
 Partition Table.
 Is this because the harddrive is installed as the Secondary Master on the
 IDE bus?

No, it is because you did not create any partition table (with bsdlabel).

jerry

 
 Appreciate any input on this
 
 Cheers
 Jona
 ___
 freebsd-questions@freebsd.org mailing list
 

Re: FreeBSD 7.0 fdisk issue during installation

2008-11-21 Thread Jonatan Evald Buus
Hi Jerry,
Thank you for the swift and very thorough response.

If I understand you correctly, then I should only create 1 slice of the
entire disk (seeing as FreeBSD will be the only OS) using fdisk and then
partition the slice using bsdlabels from sysinstall?
Previously I was aiming for 5 slices, each of which had a single partition
as described below.

From your explanation I take it that slices are what Windows refers to as
Primary Partitions?
If that's the case then I understand the behaviour I experienced.

Is it possible to make a slice non-bootable?
And would there be any benefits (less fragmentation, faster access time
etc.) in using slices rather than partitions to layout the harddrive or
should slices only be used to represent a physical harddrive?

Appreciate the clarification

Cheers
Jona

On Fri, Nov 21, 2008 at 8:55 PM, Jerry McAllister [EMAIL PROTECTED] wrote:

 On Fri, Nov 21, 2008 at 08:03:58PM +0100, Jonatan Evald Buus wrote:

  Greetings,
  I tried to install FreeBSD 7.0 on an old server earlier today and ran in
 to
  a number of issues related to slicing and labeling the disk using fdisk.
  The drive in the machine is a 40GB Seagate Barracude (ST34001A) installed
 as
  a Secondary Master on the IDE bus using LBA.
  The BIOS reports that the drive has 16 sectors pr block, but little else.
 
  When accessing fdisk during install, fdisk complains that the disk
 geometry
  is invalid and sets it to the default geometry for 40GB:
  Cylinders: 4865
  Heads: 255
  Sectors: 63
  I've tried with the following configuration based on what was reported by
  the BIOS:
  Cylinders: 19150
  Heads: 255
  Sectors: 16
  Looking in the manual:
  http://www.seagate.com/support/disc/manuals/ata/cuda7200pm.pdf, Seagate
 is
  specifying the following logical characteristic:
  Cylinders: 16383
  Read / Write heads: 16
  Sectors pr track: 63
  Which of these settings should be the correct one for the fdisk geometry?

 Let the system set it and just go with what it does.
 Geometry is virtual nowdays.   Except in some unusual situations
 (on IDE) Cylinders, heads and sectors most often do not mean what
 they used to.   The system drivers have it all figured out.  The
 important thing for you is the total number of blocks/sectors.

 If that doesn't work, you will have to do some diagnosis, but in
 about 10 out of 9 times, accepting how FreeBSD sets it is correct
 and works.


  Additionally I encountered problems during installation if splitting the
  disk into more than 4 slices. This would cause the following error to be
  thrown during prior to the install files being copied (when sysinstall
 was
  executing the newfs commands):

 You cannot have more than 4 slices.
 The system limits you to 4 slices, identified by numbers 1..4

 Once you divide in to slices, each can be further divided in to
 up to 8 partitions, although it is really 7 because partition 'c' has
 special meaning and is not really available to be a real partition.
 Partitions are identified with alpha letters a..h - with 'c' being
 used to identify the whole slice.

 You use fdisk to create the slices (and write the MBR and set
 the bootable flag).

 Then you use bsdlabel (formerly called disklabel) to create the
 partitions within a slice (plus write the slice boot block.

 Typically, you want to make partition 'a' be the root (/) filesystem
 and 'b' be swap space on a bootable system slice.   Some things assume
 these designations.

 Then you newfs partitions a, d, e, f, g, h or as many as you use.
 But don't touch c and don't newfs b if it is to be swap.

 jerry

  Error mounting /mnt/dev/X on /mnt/usr. No such file or directory
  Using only 4 slices seems to have solved this error, however I'd like the
  disk layout to use 5 slices as follows:
  / = 512MB
  swap = 2048MB (the machine has 1024MB RAM)
  /tmp = 512MB
  /var = 2048MB
  /usr = whatever remains
  I noticed that when having 5 slices, the last slice (/usr) would be named
 X
  rather than ad2s5 as I'd expect (the drive was detected as ad2).
  Is this behaviour related to the error in any way?
  Also, is the above disk layout good for a server intended to run both a
 web
  server (Apache) and a database server (PostGreSQL) ?
 
  Finally after installation (using only 4 slices) the system will only
 boot
  if the FreeBSD boot manager is used.

 That is probably because you have created what is referred to in the
 documentation as a dangerously dedicated disk.   You can make it
 work that way.  FreeBSD can handle it.   But other systems will not
 play nicely with it.

  This in turn causes a 4 menu options, all of them named FreeBSD to
 appear
  during startup despite only the / slice having been set as bootable in
 fdisk
  which appears to be indicated by an A in the flag column.

 Again, because you tried to do it the wrong way.   You created 4 FreeBSD
 slices, probably each with an MBR and so the BIOS and the first MBR think
 they are all bootable.


  Selecting the first menu 

Re: FreeBSD 7.0 fdisk issue during installation

2008-11-21 Thread Polytropon
On Fri, 21 Nov 2008 22:41:07 +0100, Jonatan Evald Buus [EMAIL PROTECTED] 
wrote:
 If I understand you correctly, then I should only create 1 slice of the
 entire disk (seeing as FreeBSD will be the only OS) using fdisk and then
 partition the slice using bsdlabels from sysinstall?

Yes, that's the usual way. Sysinstall suggest this way, too,
but you can use fdisk and bsdlabel manually, if you want.



 Previously I was aiming for 5 slices, each of which had a single partition
 as described below.

Not neccessary, as you see.

By the way, if you would want to have one disk (harddisk) for
your home directories, you wouldn't make any slice on it, you
could create just one partition there, for example:

/dev/ad0s1b = swap
/dev/ad0s1a = /
/dev/ad0s1d = /tmp
/dev/ad0s1e = /var
/dev/ad0s1f = /usr
/dev/ad2= /home



 From your explanation I take it that slices are what Windows refers to as
 Primary Partitions?

Yes.



 If that's the case then I understand the behaviour I experienced.

You understood it correctly.



 Is it possible to make a slice non-bootable?

Yes, by not setting the bootable flag in the slice editor.



 And would there be any benefits (less fragmentation, faster access time
 etc.) in using slices rather than partitions to layout the harddrive or
 should slices only be used to represent a physical harddrive?

I don't think it will give you any speed gains when you
have, let's say, /dev/ad[0s[12345]c instead of /dev/ad0s1[adefg].
Speed limitations usually occur according to the order harddisks
are placed on the (P)ATA bus and how you copy data from one
partition to another, for example, a master - slave copy usually
is slower than a master - master copy; copies between partitions
on the same drive tend to be slower than copies between two
physical drives. In daily use, I don't think your suggestion
would be of a significant benefit - if it was, it would have been
done this way for years already. :-)



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 7.0 fdisk issue during installation

2008-11-21 Thread Jerry McAllister
On Fri, Nov 21, 2008 at 10:41:07PM +0100, Jonatan Evald Buus wrote:

 Hi Jerry,
 Thank you for the swift and very thorough response.
 
 If I understand you correctly, then I should only create 1 slice of the
 entire disk (seeing as FreeBSD will be the only OS) using fdisk and then
 partition the slice using bsdlabels from sysinstall?

Yes.   Or you don't have to use sysinstall.  You can do it 
manually.   But, using sysinstall makes it easy.

You don't absolutely have to slice or bsdlabel it.
You can either just newfs the device /dev/da0 or you can create a slice
and just newfs that /dev/da0s1.   Then you get that 'dangerously dedicated'
disk which FreeBSD can use, but nothing else can including some non-FreeBSD
boot managers.   Some people do that to save a couple thousand bytes of
space, but on a multi-gigabyte drive, who cares about a couple thousand
bytes.

 Previously I was aiming for 5 slices, each of which had a single partition
 as described below.

Yup.   That won't work.

 From your explanation I take it that slices are what Windows refers to as
 Primary Partitions?
 If that's the case then I understand the behaviour I experienced.

Yes.   There is that conflict of terminology.  
But, FreeBSD has called it slices from the beginning.

 Is it possible to make a slice non-bootable?

Yes.   Just don't put in an MBR and don't mark it bootable in 
the fdisk stage.

 And would there be any benefits (less fragmentation, faster access time
 etc.) in using slices rather than partitions to layout the harddrive or
 should slices only be used to represent a physical harddrive?

There is no advantage in making a slice non-bootable, except you might
be able to save a few bytes of storage - storage that is not normally
used anyway.   There is no advantage in speed or access time and
fragmentation is only a MS worry.   It is not an issue in superior
UNIX filesystems - at least in FreeBSD's.

I don't understand the last line of that paragraph.
Pretty much everything is virtual in disk drive addressing nowdays.
It doesn't matter which level you refer to.

The slice and its limit to 4 is a feature of standard BIOS basically.
All the other things, partitions, extended partitions, etc are ways
of getting around the limits.The only real reason nowdays to
have more than one slice on a drive in FreeBSD is if you want to put
more than one bootable system on the drive.   For example, the machine
I am typing on has MS-XP and FreeBSD, plus a Dell diagnostic slice - 
so three slices are used.   I could squish those slices down and add
one more, say for Linux or a different version of FreeBSD if I wanted, 
but I don't.

Generally, when I make a machine intended only for FreeBSD, I put all
the disk in one bootable slice.   Then I partition that slice to 
suit me.  My pattern is usually:
   a   /  (root)
   b   swap (125% of memory size)
   c   defines the slice - not a real partition
   d   /tmp (used as scratch space by many utilities)
   e   /usr 
   f   /var (size depends on logging and databases which live here)
   g   /home(user home directories, plus I put some of the things
 that can grow unexpectedly such as /var/mail, /var/spool
 /usr/ports, /usr/local  here and make symlinks to them)

Some people make just one big partition for root plus some for swap.
I like the control I have over things my way a little better and I 
can get by with backing up and restoring more manageable chunks my way.

If the machine is to be a dual boot as this one is,  I carve it up in
to slices - one for each bootable system.If it already has some
MS thing loaded, I use some tool such as Gparted or Partition Magic
to shrink the MS primary partition and create two or three or four
of them.   Then I use fdisk to set up the FreeBSD slice to be bootable
and bsdlabel to partition that slice.   
By the way, 'dual boot' is kind of a generic term referring to any
number of bootable slices more than one.   So, it could refer to two,
three or four actual bootable systems on the drive.

Except for something like the hidden Dell diagnostic slice (HP and
probably other vendors like to do that as well), MS must be in the first 
slice because it doesn't like to play well with other systems.   But, it 
does overlook the 'hidden' slices OK.  That 'hidden' attribute is ignored 
by FreeBSD.   But, since it doesn't care which slice it is in, that is 
no problem. 

When I have a second (or third, etc) disk on the machine, I generally
do not make those disks bootable.   I make them just one plain slice 
each and generally, since they mostly get used as mass data storage,
I create just one partition in that slice.   But, I have created 
more when it was useful.   One I am thinking about, it was useful to
make more partitions in the second drive because I was using it to
build a system to distribute to other machines and I could isolate
that in one separate partition that