FOG 1.5.7 install on Ubuntu 18.04.3 LTS fails at Schema install/update
-
First post for an utter Newbie:
I’m attempting to install FOG 1.5.7 on a brand-new virgin install of Ubuntu 18.04.3 LTS.Everything on the Ubuntu install seems to have gone as per guidelines. However, having gone through most of the FOG Install I have got as far as the part that prompts:
“You still need to install/update your database schema…”
…and points you to http://<my hostname>/fog/management.
That screen suggests I back up any existing schema (no point) before hitting the ‘install/update now’ button. Hitting the button only gives me an error feedback page in which the (truncated) text says
“Failed to query: error: SQLSTATE[HY000]: General error 1006 Can’t create database ‘fog’ (errno: 30 “Read-only file system”) Error Message: Error Code: “HY000”, Error Message: [“HY000”, 1006, “Can’t create database ‘fog’ (errno: 30 “Read-only file system”)”], Debug: SQL: [35] CREATE DATABASE IF NOT EXISTS ‘fog’”
Any suggestions? Bear in mind this is my first foray into both Ubuntu AND FOG.
-
It almost sounds like the database server didn’t get installed or something happened during installation.
What I want you to do is this, from the FOG server linux command prompt key in
mysql -u root -p
For the password just press the enter key because the database server root’s password should be blank. If it doesn’t let you in, then we have a process to reset root’s password to blank. Unbuntu is known to reset root’s password in the database because its insecure. This issue will be fixed in an upcoming release of FOG. To reset root’s password you can follow the instructions here: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy -
OK, that got me (with a blank password) to:
MariaDB [(none)]>
-
@TurkTownBlue OK, so key in
exit;
to leave the database interface.Let me look deeper into that error message.
-
@george1421 said in FOG 1.5.7 install on Ubuntu 18.04.3 LTS fails at Schema install/update:
@TurkTownBlue OK, so key in
exit;
to leave the database interface.Let me look deeper into that error message.
No worries. I’m here for another hour or so!
-
@TurkTownBlue This is an interesting one, because the error is saying that the disk where the database is stored is read only. This should not be.
We need to look at some logs. Look at the MariaDB logs in /var/logs to see if there is any clues to what is wrong.
Also you can key in this command to see if there is any useful error messages.
sudo systemctl status mariadb
If unbuntu changed the name you may need to key this instead (remember case is important)sudo systemctl status MariaDB
If all else gives us nothing, you can go back into mysql client.
mysql -u root -p; create database fog2; Query OK, 1 row affected (0.03 sec) drop database fog2; Query OK, 0 rows affected (0.11 sec)
If those commands complete as expected then the update schema code “should” work.
-
@george1421
No MariaDB logs, just a mysql in /var/logNothing in that since Friday.
Incidentally, I tried to ‘touch’ a couple of test files in /home/<myuser> and in /tmp, /var etc. Each time I get a "cannot touch ‘test’: Read-only file system.
So it looks like my machine has decided to lock everything down. I don’t understand how it managed to download the FOG package in that case.
-
@TurkTownBlue Well you might need to do a
sudo touch
since even if you are an admin, you need sudo to do things to protected directories.Go ahead and run the mysql commands to create and drop the database. I did find something that we can test if the create fails.
-
@TurkTownBlue There is something terribly wrong with this installation.
Please run
mount
and post the full output here. -
-
-
@Sebastian-Roth said in FOG 1.5.7 install on Ubuntu 18.04.3 LTS fails at Schema install/update:
@TurkTownBlue There is something terribly wrong with this installation.
Please run
mount
and post the full output here.Bear with. I am logged onto the forum on a different machine. Firefox doesn’t render on the FOG device so I may be a while downloading an alternate Browser.
-
@TurkTownBlue ok this will be the first time seeing this my self.
edit the following file
/usr/lib/systemd/system/mariadb.service
or/etc/systemd/system/mariadb.service
you may need to launch the text editor as an administrator.Search for a seciton that looks like thks:
ProtectSystem=full ProtectHome=true
Change them to this:
ProtectSystem= ProtectHome=
Then back to the linux command prompt and key in:
sudo systemctl daemon-reload sudo systemctl start mariadb
-
OK everyone. Now it refuses to download alternative browsers. Looks like my install is seriously flaky.
I’m going to reboot and attempt to re-install FOG.
-
@TurkTownBlue Sounds like a good next step.
-
@george1421
It was worse than i thought.Ubuntu wouldn’t start so it looks like a complete refresh