IPFire boot and connecting problem

Hello everyone,

Today, I needed to access the IPFire GUI, but entering the password multiple times wasn’t correct (at least, that’s what IPFire told me).

However, accessing the Internet from the GREEN network (behind IPFire) wasn’t a problem.

I decided to restart IPFire and…

First surprise: I was convinced I was on CU 195, but what was displayed was the CU 194 boot loader… surprising, but why not :face_with_raised_eyebrow:

Second surprise: On the screen, several error messages indicated problems that were preventing IPFire from starting (see photo)…

Have you ever encountered this problem and do you have any suggestions to help me resolve it?

Thanks in advance

If you have a backup, a full disk check followed by a reinstall? Or do as it says and run fsck manually from your shell.

See if it will check and remap sectors:

fschk -c

But error 4 usually means could not map replacements to redundant block or remap data in bad block to remap sector. Which is either from bad sectors from platter de-lamination or a head or servo on the hdd malfunctioned.

Seen something like that? Yes, I have.

Cause: defective/faulty HDD/SSD

The fsck -c or fsck command consistently displays:
fsck 1.47.2 (1-Jan-2025)

Otherwise, the fschk command doesn’t exist.

So its using the e2fsprogs version
Which would you execute fschk like:

fsck -c  /dev/by-uuid/<uuid> 

or

fsck -c /dev/sda1

Ok thanks, I try this :


After reboot, no change.

In your original boot screen you had

e2fsck returned with 4

       The exit code returned by e2fsck is the sum of the following
       conditions:
            0    - No errors
            1    - File system errors corrected
            2    - File system errors corrected, system should
                   be rebooted
            4    - File system errors left uncorrected
            8    - Operational error
            16   - Usage or syntax error
            32   - E2fsck canceled by user request
            128  - Shared library error

You might need to run the fsck command with a f option which forces checking even if the file system seems clean.

When you are at the Repair filesystem line you should confirm that the /dev/sda1 partition is not mounted before running the fsck command with the f (force) option selected.

As the system was unable to repair the errors itself there is a risk that when you run the fsck with force that it might repair the filesystem but you will lose some data.

You should prepare yourself to do a fresh install and restore.

If you had a bad crash of the system or a very uncontrolled shutdown causing the problems then after a fresh install it should be okay.

However those filesystem errors could also be due to a HDD having problems and a fresh install might have the same problems later on. After re-installing you should check the SMART info and look at having a spare HDD available to replace with.

1 Like

the path is not in the enviromental PATH for fsck to execute badblocks command from e2fsck which should have been in /sbin which should be the default path

because /sbin should be in PATH enviromental when its not set

so if probably can’t find it when you execute:

which badblocks

Does anyone know what path badblocks is installed?
because you have to either execute it from the directory or put ithe directory into PATH envars.

which I don’t know why they just install it into /sbin where you can execute it if there is no PATH envars set.

maybe someone took out default path before compiling.

go and set /sbin in path and try to execute fsck

set PATH=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/root/bin

1 Like

A utility CD, such as Dr.Parted-Live, containing GSmartControl, would be able to present a summary of the drive condition, without doing a re-install of IPF. It could also do a full scan of a spinning HDD. OTOH, some brands of SSD are not well supported by SMART.

Available from Sourceforge.

2 Likes

The badblocks command from e2fsck is installed into /sbin, so in the same directory as e2fsck.

So if e2fsck can’t find the badblocks command then either the file has been removed or it has been corrupted or the permissions/ownerships have been changed.

-rwxr-xr-x 4 root root 340K Feb 20 04:39 /sbin/e2fsck
-rwxr-xr-x 1 root root 35K Feb 20 04:39 /sbin/badblocks

If badblocks is not there anymore then I wouldn’t play around trying to recover things, I would just do a re-install and restore the backup.

My view is that will always be quicker than trying to find out which files have been lost and how to get them recovered and be sure they are correct.

4 Likes

Hello,

Finally, I followed @rodneyp’s suggestion, which had me remove the disk and mount it on another machine equipped with Parted Magic.

I then performed several actions…

via the terminal:
fsck -c /dev/sda

bad magic number in super-block
e2fsck -b 8193 /dev/sda
e2fsck -b 32768 /dev/sda
None of these commands seemed to have corrected anything.

via Partition Editor > disk > Partition > Check:
Which detected errors in /dev/sda2 in FAT16, but apparently didn’t correct them…

Finally, I reconnected the disk in my firewall, and IPFire restarted normally… :slight_smile: :slight_smile: :slight_smile:

Aware that the current disk is showing signs of deterioration, I’m going to rush to backup IPFire, its various modules, and the add-ons I’ve installed for a future reinstallation and system restore.

Once again, I’ve noticed that the IPFire solution can have its surprises and difficulties (which are normal given the level of complexity), but that the community is truly PRESENT, EFFICIENT, and RESPONSIVE, which I think is essential and reassuring for a project like this…

So, a big thank you to @nickh @dr_techno @xperimental @bonnietwin and @rodneyp who helped me resolve my problem.

Have a great week everyone !

4 Likes