# Installing on Samsung SSD 850 EVO



## stig (Jul 1, 2015)

Dear Community I am in need of your help.

I have just changed the harddrive on my machine to a Samsung SSD. I have tried to install ZFS via the auto config but neither GPT nor mbr installation boots after the reboot. 

I am pretty  sure it is something with the boot loader that isn´t working since the machine used to work with the old drive.

I have tried to set the boot active via:
`gpart set -a active /dev/ada0`
`gpart set -a bootme -i 1 /dev/ada0`

It is probably some small thing but I simply can´t figure it out :-(

All help is appreciated

Regards Stig


----------



## SirDice (Jul 1, 2015)

Please post the output of `gpart show ada0`


----------



## stig (Jul 1, 2015)

Thanks for looking at it SirDice 

The output of `gpart show ada0` gives the following result:

```
=>           34   234441581  ada0  GPT (112G)
                           34                  6           - free -          (3.0K)
                           40             1024        1 freebsd-boot (512K)
                       1064        4194304        2 freebsd-zfs    (2.0G)
                  4195368        4194304        3 freebsd-swap (2.0G)
                  8389672    226051936        4 freebsd-zfs     (108G)
               234441608                  7           - free -           (3.5K)
```


----------



## tingo (Jul 1, 2015)

Try `gpart bootcode ...` (see man page for details)


----------



## wblock@ (Jul 2, 2015)

What version of FreeBSD did you install?  Some older installers were buggy about ZFS booting.


----------



## jrm@ (Jul 2, 2015)

What system are you using the drive in?  I just installed the exact same drive [1] in a Lenovo X220 and I can confirm it works, but there is a quirk.  There is a bug in the Lenovo's BIOS that affects both Linux and FreeBSD.  Following this mailing list post got the system to boot with ZFS on root and a GPT partition scheme.  This was with 10-STABLE, but I know the same is required with CURRENT and I'm pretty sure with 10.1-RELEASE.

[1] Actually, I installed two.  One SATA and one mSATA and set up a ZFS mirror. 

ADDED: Even though the subject of the post says "EFI", this works with legacy booting as well.


----------



## stig (Jul 3, 2015)

Thanks for your replies  Sorry for the late answer.

tingo I have tried `gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0`
and `gpart bootcode -p /boot/gptboot -i 1 ada0` with no luck.

wblock@ To be sure it wasn´t a problem with the install media/version of FreeBSD I downloaded the newest amd64 iso from the website (tried both 10.1 and current). Funny thing is that OpenBSD and the full PC-BSD installs and boots without a problem. I simply don´t get what I am doing wrong with FreeBSD  

jrm It is good to know it can be done. I have a HP HPE H8 1132.sc. I have tried to apply the solution described in the mailing list with no luck. Nice setup you have by the way.

Hope one of you have a idea what to do since I am all out of ideas.


----------



## kpa (Jul 4, 2015)

If you have a ZFS pool that is supposed to be bootable the bootcode must be /boot/gptzfsboot, not /boot/gptboot.


----------



## jrm@ (Jul 4, 2015)

But the installer should take care of that.  I see in /var/log/bsdinstall_log `gpart bootcode -b "/boot/pmbr" -p "/boot/gptzfsboot" -i 1 "ada0"`.

Have you tried the installer with UFS, just to see if the problem is specific to ZFS?  You might want to post to the questions@ mailing list to attract the attention of the bsdinstall developers.  If that doesn't help, you might file a bug report.


----------



## stig (Jul 4, 2015)

Hi all - thanks for your replies.

I have verified that the bsdinstall(8) runs `gpart bootcode -b "/boot/pmbr" -p "/boot/gptzfsboot"`

To be sure I tried running `gpart bootcode -b "/boot/pmbr" -p "/boot/gptzfsboot" -i 1 "ada0"`

I will try UFS again since I didn´t look at the /var/log/bsdinstall_log last time I tried (I really like ZFS). If that doesn´t work I will try the mailing list.

Again thanks for your input


----------

