[pfSense] What exactly is that "Safe mode"

Hi,

I posted this here because it is more related to FreeBSD than to pfSense.

I'm having an issue with FreeBSD and pfSense where I can only launch pfSense when going in that loader and selecting safemode *(not single user but safe mode, there's that option)

Anyway I went through all the troubleshooting steps and spent at least 4 hours on Google without success.

So I would like to know what is that "Safe mode" exactly ?

What does it disable or enable or change in the boot process for pfSense to launch instead of crashing and rebooting.

I went in the documentation section but I could not find anything about "safe mode".

Thanks
 
From /boot/menu-commands.4th:
Code:
\
\ Safe Mode
\

: safemode_enabled? ( -- flag )
        s" kern.smp.disabled" getenv -1 <> dup if
                swap drop ( c-addr flag -- flag )
        then
;

: safemode_enable ( -- )
        s" set kern.smp.disabled=1" evaluate
        s" set hw.ata.ata_dma=0" evaluate
        s" set hw.ata.atapi_dma=0" evaluate
        s" set hw.ata.wc=0" evaluate
        s" set hw.eisa_slots=0" evaluate
        s" set kern.eventtimer.periodic=1" evaluate
        s" set kern.geom.part.check_integrity=0" evaluate
;

: safemode_disable ( -- )
        s" kern.smp.disabled" unsetenv
        s" hw.ata.ata_dma" unsetenv
        s" hw.ata.atapi_dma" unsetenv
        s" hw.ata.wc" unsetenv
        s" hw.eisa_slots" unsetenv
        s" kern.eventtimer.periodic" unsetenv
        s" kern.geom.part.check_integrity" unsetenv
;

Not everything is documented. Sometimes you just have to read the source.
 
Ok, SirDice was quicker :p Looking at the tunables the safemode sets it's not very useful unless you have a truly buggy and broken BIOS on an old machine. For example need to disable SMP is practically unheard of now. Second one is that those ATA tunables have no effect at all on modern SATA controllers and drives. So it's nothing like the safe mode you might be used to on Microsoft Windows that loads a set of very slow but reliable drivers that are guaranteed to work in case you make a boo boo with a driver installation.
 
set kern.smp.disabled=1 worked :D

Thanks

Now my problem is that if I try to make the change permanent it won't work...

here's the command I used in the loader prompt :


echo "kern.smp.disabled=\"1\"" >> /boot/loader.conf.local


I also tried :


echo "kern.smp.disabled=1" >> /boot/loader.conf.local


Still doesn't seem to save the change.
 
I finally used the easy editor *EE command in the pfSense shell to edit /boot/loader.conf and I added the line and now it is working.

Thanks a lot :)
 
I'm curious to know what kind of hardware is this? As I noted disabling SMP is a drastic measure and is very rarely needed.
 
I'm curious to know what kind of hardware is this? As I noted disabling SMP is a drastic measure and is very rarely needed.

Acer G43T-AM V2.0 motherboard from a Gateway DX4822 computer with a very limited AMI Bios.

2Gb DDR2 667mhz

HDD seagate 80Gb Sata 3 refurbished

Intel Pentium Duo E5400

TPLink TG3468 Gigabit ethernet

Nice whiteish case from the 90s

400W psu
 
Ok that explains it to a degree, those type of machines were designed to run MS Windows only pretty much.
 
Back
Top