Solved Installing FreeBSD from recovery mode

Hello!

I just signed up here and I hope I am posting my question to the right place. I am trying to install FreeBSD from recovery mode because my provider doesn't provide FreeBSD in their templates (sadly). I followed the instructions from here: https://www.freebsd.org/doc/en/articles/remote-install/article.html#preparation. While trying to build the mfsBSD image (make BASE=DIST) I get this:
Code:
Makefile:85: *** missing separator.  Stop.

Am I doing something wrong? Any help is much appreciated.

Thank you!
 
Hi! Thank you for replying.

Can you please tell me how can I install FreeBSD using the mfsBSD image? Do I need to mount the iso image and then type make BASE=path_to_distribution? I am new to this I don't really know how to install it. Please help.

Thank you.
 
I spent 2 days trying to figure this out and I think I will give up. I have no idea why this doesn't work. I booted mfsBSD but I can't login. I edited the password in loader.conf and then on the mfsBSD it says the default password is mfsroot. None of the passwords seem to work.

I have access to a recovery console which is Linux based (the server I wanted to install FreeBSD on). I copied the .img file here, I did dd onto /dev/sda but I must have done something wrong for not being able to log in. I wish this was easier...

Anyway, thank you for your help.
 
On stock mfsBSD, the username is root, and the password is mfsroot. Using dd(1) to copy that onto the target disk... well, I'm not sure what you're trying to do. Maybe you have multiple disks, but if that's the main disk, all you'll end up with is the system booting into mfsBSD.

Changing passwords in mfsBSD might be tricky, because it uses a memory file system that is an image file on the mfsBSD disk image. If you can boot mfsBSD into single user mode (no password), I think bsdinstall would work from there.
 
I'm sorry if what I say doesn't make much sense. English is not my primary language. I am trying to install FreeBSD remotely as described here: https://www.freebsd.org/doc/en/articles/remote-install/article.html.

I have a server with 2 disks where I can enter into a recovery mode.

On an existing FreeBSD server: I downloaded the mfsBSD iso but I don't know how to use it although I read the instructions many times.

I then downloaded mfsBSD-2.2.tar.gz, modified the conf files, mounted the FreeBSD-10.3 ISO into /cdrom, went to the mfsBSD directory, typed make BASE=/cdrom/src/freebsd-inst. I then copied the generated img (mfsbsd-10.3-STABLE-amd64.img) to the server onto which I want to install FreeBSD and typed dd if=/root/mfsbsd-10.3-STABLE-amd64.img of=/dev/sda bs=1M.

I rebooted the server but couldn't login with any password. I don't know what else to do.
 
I then downloaded mfsBSD-2.2.tar.gz, modified the conf files, mounted the FreeBSD-10.3 ISO into /cdrom, went to the mfsBSD directory, typed make BASE=/cdrom/src/freebsd-inst. I then copied the generated img (mfsbsd-10.3-STABLE-amd64.img) to the server onto which I want to install FreeBSD and typed dd if=/root/mfsbsd-10.3-STABLE-amd64.img of=/dev/sda bs=1M.

I rebooted the server but couldn't login with any password. I don't know what else to do.

Once again, stop trying to build your own image. Use one of the pre-built images on the mfsBSD site.
 
Hi wblock,

Thank you so much for trying to help. Can you please tell me how can I use the pre-built image? This is what makes me confused. The instructions on the site says to make BASE=DIST.
 
Hi wblock,

Thank you so much for trying to help. Can you please tell me how can I use the pre-built image? This is what makes me confused. The instructions on the site says to make BASE=DIST.

If you are trying to build your own mfsBSD based on the instructions here http://mfsbsd.vx.sk/ and you succeed, please let me know what you did, since I have tried several times without success.
 
balanga,

Make sure your build it on a FreeBSD system. I tried building it on a Linux server and it didn't work. What I did is:

1. Download mfsBSD-2.2.tar.gz
2. Modified the conf files inside conf (rename them to .conf)
3. Mount FreeBSD-10.3-disc1.iso to /cdrom
4. Inside the mfsBSD directory type make BASE=/cdrom/src/freebsd-inst
If all is good, this will generate an .img file which you can use to write to /dev/sda (in my case). For some reason it didn't work for me. I couldn't log in through SSH.

If anyone knows, please tell me how can I use the pre-built mfsBSD image. Can I just write the image to /dev/sda? Will that work?
 
I'm going to attempt to script this build process since the build instructions are rather vague....

So far I have, assume running as root... on FreeBSD

Code:
cd
wget https://github.com/mmatuska/mfsbsd/archive/2.2.tar.gz
tar zxvf 2.2.tar.gz
cd mfsbsd-2.2
#
#- read hints in the sample configuration files in the conf/ directory,
#- copy these files to files without .sample ending
#- make modifications to suit your needs
#If you want any packages installed, copy the .tbz files that should be automatically installed into the packages/ directory
#
make BASE=/cdrom/10.3-RELEASE

Now it's just a matter of filling in the missing bits...

I'm very unclear as to what should be mounted on the cdrom directory....

Maybe I need to mount http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/FreeBSD-10.3-RELEASE-i386-disc1.iso on /cdrom - I don't really know.
 
Can you let me have the command for doing that as I really would like to script this mfsBSD build process.
Code:
mdconfig -a -t vnode -u 10 -f FreeBSD-10.3-RELEASE-amd64-disc1.iso
mount_cd9660 /dev/md10 /cdrom
Again, this should be run on a FreeBSD system.
Just as a proof that this works, here's the output on my server:
Code:
root@ip-172-31-28-251:~ # mdconfig -a -t vnode -u 10 -f FreeBSD-10.3-RELEASE-amd64-disc1.iso
root@ip-172-31-28-251:~ # mount_cd9660 /dev/md10 /cdrom
root@ip-172-31-28-251:~ # ls /cdrom/
.cshrc  ERRATA.HTM  README.HTM  bin  etc  mnt  sbin  var
.profile  ERRATA.TXT  README.TXT  boot  lib  proc  sys
.rr_moved  HARDWARE.HTM  RELNOTES.HTM  dev  libexec  rescue  tmp
COPYRIGHT  HARDWARE.TXT  RELNOTES.TXT  docbook.css  media  root  usr
 
I tried writing the image to /dev/sda1 but it doesn't seem to work. I then deleted and re-created the /dev/sda1 partition but no luck. The server won't boot. Here's the command I typed:

Code:
root@astra5016:~# dd if=/root/mfsbsd-10.3-RELEASE-amd64.iso of=/dev/sda1 bs=1M
42+1 records in
42+1 records out
44922880 bytes (45 MB) copied, 0.2742 s, 164 MB/s

Am I doing something wrong? :/
 
The ISO and the disk image are different. Use the disk image (.img). I would put it on the second drive, then boot and install to the first drive.
 
Hi wblock@,

Do I need any special partitions for this to work? I used the .img file but it simply doesn't boot. Now I am wondering if I need any special partitions. Right now I have /dev/sda1 with the boot flag and all space allocated to this partition.
 
It should be written to the disk, not a partition within the disk.
 
Back
Top