DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default OpenBSD keeps rebooing after running fsck_ffs

Hello, I'm a laptop user, when my battery discharges my laptop just turns off. This causes my FFS file system "dirty" and OpenBSD runs fsck_ffs on boot automatically. At this time it ran fsck_ffs, however my pc reboots after mounting. Before reboot i can see "reordering libraries: done" and a short message that begins with "kernel" and I can't read it due to reboot. I also ran fsck_ffs from the live usb to be sure the file system is clean, but it just didn't helped.
Reply With Quote
  #2   (View Single Post)  
Old 28th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

What we can determine from your post is you have some sort of reboot loop. More information will be needed.


You can boot into single-user mode by replying with "-s" to the "boot>" prompt. Only the root partition will be mounted, and it will be mounted read-only. If you can't that to reach a standard shell in single-user mode, you'll know there is something broken about your root filesystem. If you are able to get to the shell, run fsck(8) against all your file systems, including the root filesystem. You'll find a list of your fileystems in /etc/fstab.
Reply With Quote
  #3   (View Single Post)  
Old 28th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

In my /etc/fstab is only my root partition and swapfile located in /swapfile.
I ran fsck_ffs on the root and exited single user mode, didn't helped. It still reboots.
Reply With Quote
  #4   (View Single Post)  
Old 28th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You can reach a shell in single-user mode. That means you might be able to learn what is causing the problem. Kernel messages are stored in a looping buffer in RAM, and can be examined with the dmesg(8) command. So something like # dmesg | less will help you page through the buffer until you hopefully see an error message followed by the reboot. If there is an error message, it should give us (and you) a hint at what may be causing the reboot loop.

Answering "y" or "F" to fsck_ffs(8) prompts to force the deletion or the "fixing" of files in error on the filesystem will cause unrecoverable data loss. What that loss means to the OS and applications will depend on exactly what was lost. I can't tell from what's been posted so far if critical data loss is the root cause of your current problem.

As a brand-new user who stated here that OpenBSD partitioning and sector allocation confuses you, permitting the system to install with the default automatic filesystems layout may help prevent some types of mistakes that might arise when new users manually provision storage. The OpenBSD recommended partitioning schema also improves security and has other advantages, as outlined in the FAQ. Should this problem end up not being recoverable and require a re-install, please consider using OpenBSD's automatic allocation until you've gained a little more experience with the OS.

Last edited by jggimi; 28th November 2021 at 03:10 AM. Reason: typos
Reply With Quote
  #5   (View Single Post)  
Old 28th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

dmesg output from single-user mode: https://pastebin.com/CiBY22gE.
I can't see any error messages, however I think I have CPU problems, I mean OpenBSD automatically changes my CPU's clock to almost maximum value, it's 4.090 GHz, after the boot issue with OpenBSD after booting into Linux I can see something like "Hardware error" and strange numbers, my CPU clock is at maximum, 4.100 GHz. I always had 2.400 GHz on Linux. Isn't max clock value unsafe BTW?

Last edited by J65nko; 29th November 2021 at 12:17 AM. Reason: Removed irritating full message quote
Reply With Quote
  #6   (View Single Post)  
Old 28th November 2021
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 461
Default

Once more: please stop full quoting. This isn't a mailing list.

Quote:
Originally Posted by Zielonykid123 View Post
Before reboot i can see "reordering libraries: done" and a short message that begins with "kernel" and I can't read it due to reboot.
Take a video and play it back frame-by-frame to catch the messages.

Quote:
Originally Posted by Zielonykid123 View Post
I also ran fsck_ffs from the live usb to be sure the file system is clean, but it just didn't helped.
What was the *exact* command you ran from the "live usb" [sic]? Please also post any output from that command in full.

Did you try fsck(8) from single-user mode, as jggimi suggested?

Quote:
Originally Posted by Zielonykid123 View Post
after booting into Linux I can see something like "Hardware error" and strange numbers
Please post the actual error messages rather than a vague description. It's easier for you and less confusing for us.

Quote:
Originally Posted by Zielonykid123 View Post
Isn't max clock value unsafe BTW?
Not really. It will probably increase battery usage but the Linux intel_pstate driver will ramp up the frequency *very* quickly under demand anyway.

We can change the default frequencies from Linux using tmpfiles.d(5) if need be. I can help you with that
__________________
Are you infected with Wetiko?
Reply With Quote
  #7   (View Single Post)  
Old 28th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by Head_on_a_Stick View Post
Take a video and play it back frame-by-frame to catch the messages.
It's "starting RPC daemons: ." and my laptop reboots
Quote:
Originally Posted by Head_on_a_Stick View Post
What was the *exact* command you ran from the "live usb" [sic]? Please also post any output from that command in full.
fsck -y /dev/sd0
Quote:
Originally Posted by Head_on_a_Stick View Post
Did you try fsck(8) from single-user mode, as jggimi suggested?
no, but I don't know it would help
Reply With Quote
  #8   (View Single Post)  
Old 28th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Guys, I'm going to reinstall OpenBSD, thanks for trying to help, but fixing would take too much time.
Reply With Quote
  #9   (View Single Post)  
Old 29th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I've taken a look at the dmesg(8) at pastebin. You appear to have been using a custom kernel, since the kernel is not GENERIC or GENERIC.MP. Custom kernels are not supported; your customization could have been the cause of your boot loop.

Per the FAQ, any problems occurring with a custom kernel must be repeatable with a GENERIC kernel to obtain support.

(There are sometimes valid reasons for custom kernels. One example: to respond to a call for testing of a newly developed kernel feature from a developer, before it is committed to -current. )
Reply With Quote
Old 29th November 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
since the kernel is not GENERIC or GENERIC.MP. Custom kernels are not supported; your customization could have been the cause of your boot loop.
It was just custom kernel messages colors and I doubt it was the custom kernel fault or something
Reply With Quote
Old 29th November 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Reproduce the problem with an unmodified GENERIC/GENERIC.MP kernel and I'll believe you.
Reply With Quote
Old 9th December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
Reproduce the problem with an unmodified GENERIC/GENERIC.MP kernel and I'll believe you.
Guess what. Yeah, just reproduced on GENERIC.MP lol. The last shutdown was performed normally with `shutdown -p now` command, today it has a boot-loop again. BTW, is it possible to install OpenBSD with root on EXT2?
Reply With Quote
Old 9th December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by Zielonykid123 View Post
Guess what. Yeah, just reproduced on GENERIC.MP lol.
OK, we know your problem is not your custom kernel. We don't know anything else about the problem; all else -- including kernel customization as a possible cause -- is purely conjecture because you have not been able to note any error message. With this latest problem report, we still don't know if you're still choosing to use your own large single-filesystem layout.
Quote:
BTW, is it possible to install OpenBSD with root on EXT2?
No. The bootloaders differ by architecture, but to my understanding all of them require FFS/FFS2 filesystems to locate and load the kernel.
Reply With Quote
Old 9th December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I've just thought of something: fsck(8) takes a ton of RAM. If you still have a single large filesystem, you may not have enough RAM and swap space combined to successfully run it. How large is your root filesystem, how large is RAM, and how large is swap?
Reply With Quote
Old 9th December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
how large is RAM, and how large is swap?
RAM is 16GB big, swap is 2GB big and it's on my root partition.
Reply With Quote
Old 9th December 2021
Zielonykid123 Zielonykid123 is offline
Fdisk Soldier
 
Join Date: Nov 2021
Posts: 69
Default

Quote:
Originally Posted by jggimi View Post
but to my understanding all of them require FFS/FFS2 filesystems to locate and load the kernel.
maybe kernel on ffs2, root on ext2?
Reply With Quote
Old 9th December 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by Zielonykid123 View Post
...swap is 2GB big and it's on my root partition.
There's your problem. Swap-to-a-file won't function until after a) fsck(8) completes successfully, b) the filesystem is mounted read/write, and c) your swap file path is added to the the system as swap space. You have no swap space, and you don't have enough RAM to fsck your "large single filesystem."

Once more, I'll recommend you please use the installation defaults. These will help keep you from shooting yourself in the foot, again and again.

Quote:
Originally Posted by Zielonykid123 View Post
maybe kernel on ffs2, root on ext2?
I could write a lot on this sort of "Frankensystem" idea. I'm not going to. The TL;DR would be "Nope."
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD VM running OpenVPN keeps running out of entropy (viornd driver) discostew OpenBSD Packages and Ports 6 4th June 2021 09:58 PM
What do webdevs running OpenBSD, use for API testing ? akts OpenBSD Packages and Ports 2 24th October 2018 05:04 AM
Running gnome-3.24.2 on OpenBSD pawkolor OpenBSD Packages and Ports 7 27th October 2017 05:57 PM
running OpenBSD from live CD's bsd-keith OpenBSD Installation and Upgrading 22 29th March 2015 03:28 PM
Getting OpenBSD up and running Larry OpenBSD Installation and Upgrading 10 14th May 2010 11:14 PM


All times are GMT. The time now is 12:13 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick