Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2017 01:49:46 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Manish Jain <bourne.identity@hotmail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Is it possible to install FreeBSD on a single MBR slice with ZFS ?
Message-ID:  <20170418014946.fa114b49.freebsd@edvax.de>
In-Reply-To: <VI1PR02MB120024156110981D6A3B4C80F6060@VI1PR02MB1200.eurprd02.prod.outlook.com>
References:  <VI1PR02MB12004B1D8A87B3E247FC1A66F6040@VI1PR02MB1200.eurprd02.prod.outlook.com> <e2f76fb0-05e0-5a53-1730-a5a64291c407@holgerdanske.com> <VI1PR02MB120024156110981D6A3B4C80F6060@VI1PR02MB1200.eurprd02.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Apr 2017 13:45:25 +0000, Manish Jain wrote:
> >>AFAIK, the FreeBSD 11.0 installer wants the whole disk <<
> 
> Hi David,
> 
> That appears to be my impression too : it simply is not possible
> to install FreeBSD on an MBR disk
> (unless one is willing to use the entire disk).

That's not correct.

If you go with MBR, you usually need _one_ slice unoccupied. This
is where you install FreeBSD partitions to (which then carry the
file systems or act as swap space).

Example:

ada0		= the whole disk
ada0s1		= 1st slice, contains some "Windows"
ada0s2		= 2nd slice, contains maybe DOS
ada0s3		= 3rd slice, contains FreeBSD
ada0s3a		= FreeBSD / file system
ada0s3b		= FreeBSD swap space
ada0s3[d-h]	= some more FreeBSD file system
ada0s4		= 4th slice, still empty

This example of course applies to UFS. If you use ZFS, it should
be possible to give ada0s3 to FreeBSD ZFS, but of course there would
not be any BSD partitions inside.



> That is a fairly serious inconvenience : I hate the idea of having
> to use GPT on my disk because I cannot use the Boot Easy manager
> (boot0cfg) under GPT. Plus GPT inevitably leads to reckless
> partitioning.

Do not confuse MBR and GPT. Both can be used for "whole disk as a
whole" or "many small partitions". But you are right that there may
be situations where multiboot-environments require specific hacks
to get working.

For comparison, check this article:

http://www.wonkity.com/~wblock/docs/html/disksetup.html



> For disks under and upto 2 TB, MBR is supremely better.

Or GPT - it actually does not matter. Today, GPT is advised unless
you have a good and valid reason to use MBR.

Or you use _none_ of them, no GPT, no MBR. This approach is called
"dedicated" and does not involve any disk partitioning, only BSD
partitions (ada0[a-h] to follow the example provided above). This
of course is not really a good idea for multiboot environments.



> I did manage to get ZFS though, courtesy a spare slice available
> on my disk.

That is a fully valid approach.



> I installed FreeBSD using UFS on ada0s2 and migrated the setup
> to a ZFS tank under ada0s3 using the rsync strategy
> brilliantly detailed at :
> 
> https://imil.net/blog/2016/04/28/Migrate-FreeBSD-root-on-UFS-to-ZFS/

That "UFS to ZFS" approach is also possible if you can't (or don't
want to) install ZFS right from the start.



> But following the migration, I have made a serious error. I used
> Windows (ada0s1) to delete ada0s2 :
> Windows has rearranged the MBR table to make ada0s3 -> ada0s2.

Sounds like something OS/2 has done to me many years ago. :-)



> I am now struggling to fix the MBR table.

Of course.



> If you have any tips, that shall be wonderful

Do not and never use "Windows" to deal with lower level aspects of
your disk. It will for sure mess things up, and in worst case, you
need to reinstall everything from scratch. Of course you don't, as
you have a working backup you can rely on. ;-)

It's not as easy anymore to fix partition table entries with a simple
handheld calculator and "Norton Disk Editor" started from a handy DOS
boot floppy. :-)

For the future: Bootable CDs like UBCD or PartEd Magic provice
excellent tools to deal with re-partitioning. You can use FreeBSD's
editor as well, especially if all you want to do is delete some
MBR slices. It's the first thing you do in the installer, then
follow to create new slices as you need them, and go on with the
installation process.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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