-1

I am trying to add a 4 TB external hard disk to my Freebsd server connected to a USB3 port and i am facing the following problem.

I am able to format this disk using :

sudo gpart create -s GPT da1
sudo gpart add -t freebsd-ufs da1
sudo newfs -U /dev/da1p1
sudo mkdir /backup
sudo chmod 775 /backup

Then, I test it with a manual mount :

sudo mount /dev/da1p1 /backup

This works as I am able to create a file (touch /backup/foo)

Then, I unmount it and add a new line in /etc/fstab

/dev/da1p1      /backup         ufs    rw      0       3

Which I test with :

sudo mount -a

and it works as well.

The problem is when I reboot the machine, there is a systematic error during boot with following error :

FreeBSD EFI Boot Block
Loader path : /boot/loader.efi

I have then to delete the line I have added in /etc/fstab in order for it to start.

If I understand correctly, the 'mount -a' command is using the content of /etc/fstab which indicates the file content is ok (no hidden characters or wrong syntax). So, why doesn't it work during boot ?

Thanks for your help

Michał Szkudlarek
  • 1,443
  • 1
  • 21
  • 35
Thierry
  • 192
  • 1
  • 10

1 Answers1

1

It seems to be a bug: EFI loader picks up the first available UFS filesystem and tries to load loader.efi from there. In your case , seemingly, it picks up your backup drive. You might find comments on this problem report useful: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192184

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • I tried to add 'later' and 'noauto' in /etc/fstab for this external disk but the loader is still crashing... I don't understand, am i the only one trying to set up an external disk for backup with FreeBSD ? – Thierry Jun 22 '15 at 06:30
  • The problem is not with external disk but a EFI loader. AFAIK, booting with EFI is relatively new feature in FreeBSD. – arrowd Jun 22 '15 at 08:50
  • After so many tries, I finally ended up with the following, yet far to be perfect solution (but it works) : I delete da1 device, restart the server with the disk connected and in my crontab task, I first create da1 and da1p1, then do my backup stuff, than delete da1p1 and da1... – Thierry Jul 20 '15 at 14:44