Rostislav Krasny
2017-Oct-06 15:17 UTC
Installing amd64 FreeBSD 11.1 in dual-boot with Windows 7 on an MBR partitioned disk
Hi there, I try to install amd64 FreeBSD 11.1 in dual-boot with Windows 7 on an MBR partitioned disk and I can't make it bootable. My Windows 7 uses its standard MBR partitioning scheme (1. 100MB System Reserved Partition; 2 - 127GB disk C partition) and there is about 112GB of free unallocated disk space that I want to use to install FreeBSD on it. As an installation media I use the FreeBSD-11.1-RELEASE-amd64-mini-memstick.img flashed on a USB drive. During the installation, if I choose to use Guided Partitioning Tool and automatic partitioning of the free space, I get a pop-up message that says: =====The existing partition scheme on this disk (MBR) is not bootable on this platform. To install FreeBSD, it must be repartitioned. This will destroy all data on the disk. Are you sure you want to proceed? [Yes] [No] ===== If instead of the Guided Partitioning Tool I choose to partition the disk manually I get a similar message as a warning and the installation process continues without an error, but the installed FreeBSD system is not bootable. Installing boot0 manually (boot0cfg -Bv /dev/ada0) doesn't fix it. The boot0 boot loader is able to boot Windows but it's unable to start the FreeBSD boot process. It only prints hash symbols when I press F3 (the FreeBSD slice/MBR partition number). I consider this as a critical bug. But maybe there is some workaround that allows me to install the FreeBSD 11.1 as a second OS without repartitioning the entire disk? My hardware is an Intel Core i7 4790 3.6GHz based machine with 16GB RAM. The ada0 disk is 238GB SanDisk SD8SBAT256G1122 (SSD).
Karl Denninger
2017-Oct-06 15:42 UTC
Installing amd64 FreeBSD 11.1 in dual-boot with Windows 7 on an MBR partitioned disk
On 10/6/2017 10:17, Rostislav Krasny wrote:> Hi there, > > I try to install amd64 FreeBSD 11.1 in dual-boot with Windows 7 on an > MBR partitioned disk and I can't make it bootable. My Windows 7 uses > its standard MBR partitioning scheme (1. 100MB System Reserved > Partition; 2 - 127GB disk C partition) and there is about 112GB of > free unallocated disk space that I want to use to install FreeBSD on > it. As an installation media I use the > FreeBSD-11.1-RELEASE-amd64-mini-memstick.img flashed on a USB drive. > > During the installation, if I choose to use Guided Partitioning Tool > and automatic partitioning of the free space, I get a pop-up message > that says: > > =====> The existing partition scheme on this disk > (MBR) is not bootable on this platform. To > install FreeBSD, it must be repartitioned. > This will destroy all data on the disk. > Are you sure you want to proceed? > [Yes] [No] > =====> > If instead of the Guided Partitioning Tool I choose to partition the > disk manually I get a similar message as a warning and the > installation process continues without an error, but the installed > FreeBSD system is not bootable. Installing boot0 manually (boot0cfg > -Bv /dev/ada0) doesn't fix it. The boot0 boot loader is able to boot > Windows but it's unable to start the FreeBSD boot process. It only > prints hash symbols when I press F3 (the FreeBSD slice/MBR partition > number). > > I consider this as a critical bug. But maybe there is some workaround > that allows me to install the FreeBSD 11.1 as a second OS without > repartitioning the entire disk? > > My hardware is an Intel Core i7 4790 3.6GHz based machine with 16GB > RAM. The ada0 disk is 238GB SanDisk SD8SBAT256G1122 (SSD). >You have to do the partitioning and then install FreeBSD's boot manager by hand.? It /does /work; I ran into the same thing with my Lenovo X220 and was able to manually install it, which works fine to dual-boot between Windows and FreeBSD-11.? I had to do it manually because the installer detected that the X220 was UEFI capable and insisted on GPT-partitioning the disk, which is incompatible with dual-boot and the existing MBR-partitioned Windows installation. You want the partition layout to look like this: $ gpart show =>?????? 63? 500118129? ada0? MBR? (238G) ???????? 63??? 4208967???? 1? ntfs? (2.0G) ??? 4209030? 307481727???? 2? ntfs? (147G) ? 311690757????????? 3??????? - free -? (1.5K) ? 311690760? 165675008???? 3? freebsd? [active]? (79G) ? 477365768???? 808957??????? - free -? (395M) ? 478174725?? 21928725???? 4? ntfs? (10G) ? 500103450????? 14742??????? - free -? (7.2M) =>??????? 0? 165675008? ada0s3? BSD? (79G) ????????? 0??? 8388608?????? 1? freebsd-ufs? (4.0G) ??? 8388608? 136314880?????? 2? freebsd-ufs? (65G) ? 144703488?? 20971519?????? 4? freebsd-swap? (10G) ? 165675007????????? 1????????? - free -? (512B) MBR has only four partitions; the "standard" Windows (7+) install uses /three. /The "boot"/repair area, the main partition and, on most machines, a "recovery" partition.? That usually leaves partition 3 free which is where I stuck FreeBSD.?? Note that you must then set up slices on Partition 3 (e.g. root/usr/swap) as usual. -- Karl Denninger karl at denninger.net <mailto:karl at denninger.net> /The Market Ticker/ /[S/MIME encrypted email preferred]/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4897 bytes Desc: S/MIME Cryptographic Signature URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20171006/969958f5/attachment.bin>
Eugene Grosbein
2017-Oct-06 17:33 UTC
Installing amd64 FreeBSD 11.1 in dual-boot with Windows 7 on an MBR partitioned disk
06.10.2017 22:17, Rostislav Krasny wrote:> I consider this as a critical bug. But maybe there is some workaround > that allows me to install the FreeBSD 11.1 as a second OS without > repartitioning the entire disk? > > My hardware is an Intel Core i7 4790 3.6GHz based machine with 16GB > RAM. The ada0 disk is 238GB SanDisk SD8SBAT256G1122 (SSD).bsdinstall (current installer) is seriously flawed comparing with sysinstall (previous one) when we talk about installing FreeBSD to a slice within MBR. You still can install FreeBSD by invoking a shell from bsdinstall and using gpart: gpart add -t freebsd -a 4096 ada0 # dedicate all unallocated space for ada0s3 gpart create -s BSD -n 20 ada0s3 # create BSD label able to contain upto 20 partitions gpart bootcode -b /boot/boot0 ada0 # install menu-driven boot manager BootEasy to MBR gpart bootcode -b /boot/boot ada0s3 # install FreeBSD-specific UFS boot code to its slice gpart set -a active -i 1 ada0 # make sure MBR has exactly one active partition gpart add -t freebsd-swap -s 4G -i 2 # allocate 4G for a swap ada0s3b (choose size of your like) gpart add -t freebsd-ufs -s 2G # allocate 2G for root partition ada0s3a newfs -L root /dev/ada0s3a gpart add -t freebsd-ufs -s 1G # allocate 1G for read-only /usr partition ada0s3d newfs -L usr /dev/ada0s3d gpart add -t freebsd-ufs -s 4G # allocate 4G for /var ada0s3e newfs -L var /dev/ada0s3e gpart add -t freebsd-ufs -s 10G # allocate 10G /usr/local: future installed ports & packages newfs -L usrl /dev/ada0s3f gpart add -t freebsd-ufs # allocate all other space for /home newfs -L home /dev/ada0s3g Then you will have mount new ada0s3a, create mount points for other partitions there, create etc/fstab, extract *.txz from distibution media and it will boot just fine.