Discussion:
Booting from 3TB drive (UFS, BIOS)
(too old to reply)
Oliver Fromme
2012-08-14 13:24:00 UTC
Permalink
Hi,

I've got a small PC that currently has two disks: The
first one is 1 TB with a standard MBR, used to boot FreeBSD,
and the second one is 3 TB with GPT, used as data disk for
FreeBSD (the BIOS doesn't have to care about this one at all
because it's not used for booting).

Now I would like to replace the first disk with a 3 TB one,
too. However, will I be able to boot from it? The PC is
not exactly a new one (ASRock A330GC with Atom 330 processor,
a few years old) and has a standard BIOS (dated 07/16/2009).

I understand that I will have to use GPT in order to be able
to use the full capacity of 3 TB, and that I will have to
install a pmbr to enable the BIOS to detect the disk as
bootable. Is this correct? Will that work? (Assuming that
the boot partition will have to be within the first 2 TB of
the drive, of course.)

If everything else fails, I'd consider using an additional
drive for booting, probably an SSD. But I'd like to avoid
this if possible.

Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd

"The scanf() function is a large and complex beast that often does
something almost but not quite entirely unlike what you desired."
-- Chris Torek
John Baldwin
2012-08-15 15:53:16 UTC
Permalink
Post by Oliver Fromme
Hi,
I've got a small PC that currently has two disks: The
first one is 1 TB with a standard MBR, used to boot FreeBSD,
and the second one is 3 TB with GPT, used as data disk for
FreeBSD (the BIOS doesn't have to care about this one at all
because it's not used for booting).
Now I would like to replace the first disk with a 3 TB one,
too. However, will I be able to boot from it? The PC is
not exactly a new one (ASRock A330GC with Atom 330 processor,
a few years old) and has a standard BIOS (dated 07/16/2009).
I understand that I will have to use GPT in order to be able
to use the full capacity of 3 TB, and that I will have to
install a pmbr to enable the BIOS to detect the disk as
bootable. Is this correct? Will that work? (Assuming that
the boot partition will have to be within the first 2 TB of
the drive, of course.)
If everything else fails, I'd consider using an additional
drive for booting, probably an SSD. But I'd like to avoid
this if possible.
A GPT boot should work, and the boot partition can even be
above 2 TB. (GPT booting only uses the EDD BIOS interface
which uses 64-bit LBAs, and the GPT boot code will use all
64-bits of the LBAs stored in GPT, etc.)
--
John Baldwin
Oliver Fromme
2012-09-17 12:42:04 UTC
Permalink
Post by John Baldwin
Post by Oliver Fromme
I've got a small PC that currently has two disks: The
first one is 1 TB with a standard MBR, used to boot FreeBSD,
and the second one is 3 TB with GPT, used as data disk for
FreeBSD (the BIOS doesn't have to care about this one at all
because it's not used for booting).
Now I would like to replace the first disk with a 3 TB one,
too. However, will I be able to boot from it? The PC is
not exactly a new one (ASRock A330GC with Atom 330 processor,
a few years old) and has a standard BIOS (dated 07/16/2009).
I understand that I will have to use GPT in order to be able
to use the full capacity of 3 TB, and that I will have to
install a pmbr to enable the BIOS to detect the disk as
bootable. Is this correct? Will that work? (Assuming that
the boot partition will have to be within the first 2 TB of
the drive, of course.)
A GPT boot should work, and the boot partition can even be
above 2 TB. (GPT booting only uses the EDD BIOS interface
which uses 64-bit LBAs, and the GPT boot code will use all
64-bits of the LBAs stored in GPT, etc.)
(I'm sorry for the late reply; I still haven't gotten around
to upgrade the disks ...)

Problem is, the machine doesn't have an EFI BIOS and does
*not* support GPT. So it will use the compatibility MBR
of the GPT, I assume. And MBR isn't able to represent
addresses beyond 2 TB, so the slice containing the boot
partition will have to be within the first 2 TB of the
drive, right?

I tried to research the issue, but Google mostly returns
pages concerning Linux that advise to use disks > 2 TB as
data disks only while using a separate disk <= 2 TB for
booting, unless you have an EFI BIOS that supports GPT
natively.

Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd

"The most important decision in [programming] language design
concerns what is to be left out." -- Niklaus Wirth
John Baldwin
2012-09-17 15:17:18 UTC
Permalink
Post by Oliver Fromme
Post by John Baldwin
Post by Oliver Fromme
I've got a small PC that currently has two disks: The
first one is 1 TB with a standard MBR, used to boot FreeBSD,
and the second one is 3 TB with GPT, used as data disk for
FreeBSD (the BIOS doesn't have to care about this one at all
because it's not used for booting).
Now I would like to replace the first disk with a 3 TB one,
too. However, will I be able to boot from it? The PC is
not exactly a new one (ASRock A330GC with Atom 330 processor,
a few years old) and has a standard BIOS (dated 07/16/2009).
I understand that I will have to use GPT in order to be able
to use the full capacity of 3 TB, and that I will have to
install a pmbr to enable the BIOS to detect the disk as
bootable. Is this correct? Will that work? (Assuming that
the boot partition will have to be within the first 2 TB of
the drive, of course.)
A GPT boot should work, and the boot partition can even be
above 2 TB. (GPT booting only uses the EDD BIOS interface
which uses 64-bit LBAs, and the GPT boot code will use all
64-bits of the LBAs stored in GPT, etc.)
(I'm sorry for the late reply; I still haven't gotten around
to upgrade the disks ...)
Problem is, the machine doesn't have an EFI BIOS and does
*not* support GPT. So it will use the compatibility MBR
of the GPT, I assume. And MBR isn't able to represent
addresses beyond 2 TB, so the slice containing the boot
partition will have to be within the first 2 TB of the
drive, right?
No.
Post by Oliver Fromme
I tried to research the issue, but Google mostly returns
pages concerning Linux that advise to use disks > 2 TB as
data disks only while using a separate disk <= 2 TB for
booting, unless you have an EFI BIOS that supports GPT
natively.
We support booting from GPT without EFI. It will work fine. The BIOS will
see a PMBR that does indeed only cover 2TB, but that doesn't matter. The
whole point of the PMBR is to fool BIOSs. :) Tools that understand GPT (such
as gpart) will see the GPT table and it's partitions. FreeBSD's GPT bootstrap
code (/boot/pmbr and /boot/gptboot) will see the GPT and use 64-bit LBAs for
all I/O, so they can handle the partition being anywhere on the disk.
--
John Baldwin
Oliver Fromme
2012-09-17 15:29:05 UTC
Permalink
Post by John Baldwin
Post by Oliver Fromme
Problem is, the machine doesn't have an EFI BIOS and does
*not* support GPT. So it will use the compatibility MBR
of the GPT, I assume. And MBR isn't able to represent
addresses beyond 2 TB, so the slice containing the boot
partition will have to be within the first 2 TB of the
drive, right?
No.
[...]
We support booting from GPT without EFI. It will work fine. The BIOS will
see a PMBR that does indeed only cover 2TB, but that doesn't matter. The
whole point of the PMBR is to fool BIOSs. :) Tools that understand GPT (such
as gpart) will see the GPT table and it's partitions. FreeBSD's GPT bootstrap
code (/boot/pmbr and /boot/gptboot) will see the GPT and use 64-bit LBAs for
all I/O, so they can handle the partition being anywhere on the disk.
Ok, now I got it.
Thanks for bearing with me. :)

Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd

"Share your knowledge. It is a way to achieve immortality." -- The Dalai Lama
Loading...