# Cannot boot FreeBSD



## Ragnarson (Jan 25, 2021)

Hey guys,

I have following problem:
I can't boot anymore my FreeBSD Machine.

It always give me following errormessage:


----------



## SirDice (Jan 25, 2021)

Did you run an update? What did you do before this happened?


----------



## Ragnarson (Jan 25, 2021)

I couldn't use the mysql command, I always got the same error like in the screenshot.

Then I googled and found this thread, because he had the same problem: https://forums.freebsd.org/threads/everything-has-an-unsupported-file-layout-all-of-a-sudden.23585/
I pasted the /rescue/libedit/ commands & rebooted my server, now I can't even start..


----------



## SirDice (Jan 25, 2021)

Does /bin/sh still work?


----------



## Ragnarson (Jan 25, 2021)

no, seems not. I tryed to paste /bin/sh as well i pressed RETURN.
He gives me always the error message.

Is there no way to fix that without to install again the machine?


----------



## SirDice (Jan 25, 2021)

Alright, use /rescue/sh instead, everything in /rescue is statically built specifically for situations like this.


----------



## Ragnarson (Jan 25, 2021)

But what can I do then, if I used /rescue/sh


----------



## SirDice (Jan 25, 2021)

You can try and fix the issue. Question remains, did you run an update recently? Or did something else that changed settings? Perhaps a similar power outage as the person in that other thread had?


----------



## Ragnarson (Jan 25, 2021)

No I didn't run a update. I don't know why, but there was a problem when I runned the command mysql. He gave me the same error now like at boot.
Is there a way to fix that libs or a way to log in again to my machine and make backups?


----------



## SirDice (Jan 25, 2021)

Ragnarson said:


> Is there a way to fix that libs


Do you use UFS or ZFS? After you run these commands:

```
/rescue/ldconfig /lib /usr/lib /usr/local/lib
/rescue/ldconfig -32 /usr/lib32 /usr/local/lib32/compat
```
Does /bin/sh start _without_ the library error?


----------



## Ragnarson (Jan 25, 2021)

SirDice said:


> Do you use UFS or ZFS? After you run these commands:


I don't realy know what UFS or ZFS is.












If i write /rescue/sh that works.


----------



## SirDice (Jan 25, 2021)

Ragnarson said:


> I don't realy know what UFS or ZFS is.


It's the filesystem you used. Post the output from /rescue/mount, you can tell the difference from the way the root filesystem is presented there. We need to provide the correct commands to make the filesystem writable. Then we can fix the library problem. 



Ragnarson said:


> If i write /rescue/sh that works.


I'd be surprised if /rescue/sh _didn't_ work.


----------



## Ragnarson (Jan 25, 2021)

The output of /rescue/mount is:


----------



## SirDice (Jan 25, 2021)

Ok, so you have UFS (remember that). 


```
/rescue/mount -u /
/rescue/mount -a -t ufs
/rescue/ldconfig /lib /usr/lib /usr/local/lib
/rescue/ldconfig -32 /usr/lib32 /usr/local/lib32/compat
```
That should probably fix it.


----------



## Ragnarson (Jan 25, 2021)

Every command didn't give me a error message,
only the last command gived me that:


----------



## SirDice (Jan 25, 2021)

That's fine, that /usr/local/lib32/compat may or may not exist. All the other commands and directories do work. Can you run /bin/sh now? And does it start without it the library error? If that works try rebooting the system. Hopefully the issue has been resolved now.


----------



## Ragnarson (Jan 25, 2021)

lol it worked, I can boot in my system again, thank you very much SirDice .

I don't know if this is the right forum, but it was probably the main reason, why I fucked something up, because I can't use mysql command.
If I write the mysql command this message is popping out, do you maybe know something about this or is it the wrong forum?


----------



## SirDice (Jan 25, 2021)

Ragnarson said:


> If I write the mysql command this message is popping out, do you maybe know something about this or is it the wrong forum?


This should go in the "Ports and packages" section. I suspect it's because you built MySQL from ports and have `DEFAULT_VERSIONS+= ssl=openssl` in make.conf.


----------

