LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-24-2019, 12:16 PM   #1
JakeJake
LQ Newbie
 
Registered: Aug 2019
Distribution: Debian
Posts: 18

Rep: Reputation: Disabled
Problem with boot, end kernel panic


Hi.
I have a dual boot notebook, with Debian9 and Windows10.
After an update on my Debian 9, there were some problem about "unexpected inconsistency" and the system asked me to run fcsk manually. The system gave me a lot of message like "linux error reading block inode force rewrite" and after a brief search online, I decided to answered yes to all of this message, and probably this was a fault of mine.

Now Windows seems boot correctly but Debian give me message "end Kernel panic - not syncing: Attempted to kill init! exit code=0x00007f00

If I boot the system from an usb stick with Debian 10 I am able to view and access the folders and the files.

Has anyone a suggestion for me ?
What can I do ?
I have to reinstall Debian ?

Thanks in advance
 
Old 08-24-2019, 01:48 PM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
It would be very useful if you could capture and post the lines preceding the final panic, for example by photographing them or, better still, transcribing them onto another machine.

When you ran your fsck, did you run it from inside the system? If so, that was a mistake. You should never run this program on a mounted root partition because of the possibility of corruption. Next time, boot from a CD or pen drive and then run fsck on the hard drive root partition. Or, if you can't do that, remount the root partition as read only before fscking it (which is what your system does when it has to fsck the root partition during the boot process).

In the mean time, I think you should use your installation disk to copy to a place of safety any personal files in your home directory so that if you do need to reinstall, you won't have lost anything important.

Last edited by hazel; 08-24-2019 at 01:52 PM.
 
1 members found this post helpful.
Old 08-24-2019, 01:59 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ Yes.

But after that...
Quote:
Originally Posted by JakeJake View Post
If I boot the system from an usb stick with Debian 10 I am able to view and access the folders and the files.
...you can chroot into your system and see if you can fix it.
 
1 members found this post helpful.
Old 08-24-2019, 02:01 PM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
I suppose running a fsck on the unmounted partition wouldn't do any harm.
 
Old 08-24-2019, 04:48 PM   #5
JakeJake
LQ Newbie
 
Registered: Aug 2019
Distribution: Debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you Hazel for the answer.

Quote:
When you ran your fsck, did you run it from inside the system? If so, that was a mistake
I ran fsck when the system asked me to do that, probably I ran fsck after the first boot failure. I'm quite sure that my problem was here.

Quote:
It would be very useful if you could capture and post the lines preceding the final panic, for example by photographing them or, better still, transcribing them onto another machine.
[ 4.373514] Call Trace:
[ 4.373587] [<ffffffff97b35514>] ? dump_stack+0x5c/0x78
[ 4.373659] [<ffffffff979814ad>] ? panic+0xe4/0x242
[ 4.373729] [<ffffffff9787f6b3>] ? do_exit+0xb53/0xb60
[ 4.373799] [<ffffffff9787f73a>] ? do_group_exit+0x3a/0xa0
[ 4.373870] [<ffffffff9787f7b0>] ? Sys_exit_group+0x10/0x10
[ 4.373942] [ ? do_syscall_64+0x8d/0x100
[ 4. [******************] ? entry_SYSCALL_64_after_swapgs+0x58/0xc6
[ ********] Kernel Offset: 0x27800000 from 0xffffffff81000000 (relocation range: 0xfffffffff80000000-0xffffffffbfffffff)
[ *********] ---[ end Kernel panic - not syncing: Attempted to kill init! exit code=0x00007f00
[ ********]
 
Old 08-24-2019, 04:50 PM   #6
JakeJake
LQ Newbie
 
Registered: Aug 2019
Distribution: Debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you ondoho for the answer.

Quote:
...you can chroot into your system and see if you can fix it.
Tomorrow I will study the use of the chroot command and I try to fix the system.

Do you have any other suggestion about it ?
 
Old 08-25-2019, 02:47 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Thanks for the trace. It looks from that as if your root partition is at least partly readable. Otherwise, you would have got a different final message. It would have said something about not finding init.

"Attempted to kill init!" means that the system's init program (systemd in your case) was actually loaded and running at the time of the crash. It was systemd which crashed and the kernel doesn't allow that. My guess is that there was a disk corruption that prevented systemd from doing its stuff.

Now if the partition was mounted read-write at the time of the crash, there might be something about it in systemd's journal. You can read the tail end of this if you boot from your installation image and use the journalctl command. If it was still mounted read-only (as it is in the early stages of system startup) then you won't find anything. But I think it is worth looking. And it is certainly worth doing another fsck on the partition when it's not mounted.

But if I were you, I'd give priority to backing up my home partition. What is on the root partition can always be replaced; what is on the home partition can't be.
 
1 members found this post helpful.
Old 08-25-2019, 03:38 AM   #8
JakeJake
LQ Newbie
 
Registered: Aug 2019
Distribution: Debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks a lot.
Quote:
But if I were you, I'd give priority to backing up my home partition. What is on the root partition can always be replaced; what is on the home partition can't be.
Ok, I'm doing the backup of my home partition

Quote:
You can read the tail end of this if you boot from your installation image and use the journalctl command
Please could you explain me step by step what can I do ? Am I able to read the tail after the boot from my usb-stick ?

Quote:
And it is certainly worth doing another fsck on the partition when it's not mounted.
Is it also possible to do the fsck after the boot from my usb-stick ?
 
Old 08-25-2019, 05:59 AM   #9
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Quote:
Originally Posted by JakeJake View Post
Please could you explain me step by step what can I do ? Am I able to read the tail after the boot from my usb-stick ? Is it also possible to do the fsck after the boot from my usb-stick ?
Yes, that's the whole point. Your usb stick contains a live Debian image, so you can carry out any valid command. As far as I can see from the journalctl man page, you can specify a particular journal to check. But you would need to have the partition mounted for that, so my advice is to do the fsck first, with the partition unmounted.

Boot from your stick and run
Code:
fsck.ext4 /dev/sda<n>
where <n> is the number of your root partition. Because it isn't mounted, there is little risk of any further corruption. fsck might find something and fix it. Or it might find nothing.

Then mount it using
Code:
mount -t ext4 /dev/sda<n> /mnt
.
Now you can look at the journal:
Code:
journalctl -D /mnt/var/log|tail 30
That will ensure that you get the journal on your hard drive and not the one from your usb boot. I don't guarantee that you'll find anything, but it's worth looking.
 
1 members found this post helpful.
Old 08-25-2019, 08:41 AM   #10
JakeJake
LQ Newbie
 
Registered: Aug 2019
Distribution: Debian
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Boot from your stick and run
Code:

fsck.ext4 /dev/sda<n>

where <n> is the number of your root partition. Because it isn't mounted, there is little risk of any further corruption. fsck might find something and fix it. Or it might find nothing.
Another question, I have the home partition separated, the root is where are the folder bin, boot, data, dev, etc ... right ?

******
Update

I have done the "fsck.ext4" on the partition from the live image,
the answer is: clean, 337826/1831424 files, 6083890/7323904 blocks

after that I have done the "journalctl -D /mnt/var/log | tail" the result is: -- No entries --

Now do you have any other suggestion ?

Last edited by JakeJake; 08-25-2019 at 09:42 AM. Reason: update
 
Old 08-25-2019, 10:26 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Quote:
Another question, I have the home partition separated, the root is where are the folder bin, boot, data, dev, etc ... right ?
Yes, the root partition is the one that would contain those folders if it was mounted. Is that the one you fsck'd? If so, then we'll have to write off disk corruption as the cause.

"No entries" in the journal simply means that the system crashed before the journal could be written out to disk. That's a pity! Journal entries would have been useful.

If you had a traditional init system on that machine, I would recommend booting into a shell and running the init scripts by hand until you found one that played up. Then it could be fixed. But then if you had a traditional init system, I suspect your boot wouldn't have crashed in the first place. What you have instead is something called systemd, which usually works very smoothly but is difficult to fix if it does go wrong. And since I dislike it and don't use distros that rely on it, I'm not the person to help you here.

Maybe Ondoho has some additional ideas. If not, you may end up having to do the "Windows thing", i.e. reinstall, then update. Which would be a pity because fixing a misbehaving system is much more fun and in Linux you can usually do that.
 
1 members found this post helpful.
Old 08-25-2019, 11:18 AM   #12
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Here's a suggestion from another thread.
Quote:
Originally Posted by ZhaoLin1457 View Post
I think that this particular OP got a corrupted operating system, because of a faulty hard drive.

Those "linux error reading block inode force rewrite" messages from the fsck announces its intention to write zeroes on particular sectors from this hard drive, overriding the content from whatever files.

I believe that the best way is to reinstall the operating system, after replacing this faulty hard drive.

At least, this way I did myself, after having a corrupted Slackware installation in a faulty hard drive.
 
Old 08-25-2019, 11:36 AM   #13
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Perhaps it's worth looking at it's SMART status with smartctl. Use a "live system" running from a USB stick or similar, then run the following command and post the results using CODE tags;

Code:
smartctl -a /dev/sdX
Replace "sdX" with the actual device node for the drive in question. And let's see if that tells us anything. You can also use a live system to run fsck, and try and fix the filesystem problems that way (assuming it's just the filesystem that's the problem).
 
Old 08-25-2019, 11:39 AM   #14
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,572
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Quote:
Originally Posted by jsbjsb001 View Post
You can also use a live system to run fsck, and try and fix the filesystem problems that way (assuming it's just the filesystem that's the problem).
Already tried that (see above). We've been working on this for a couple of days now. If Zhao Lin is right, fsck cleaned the disk up at the cost of corrupting some individual files, probably pieces of systemd. It could equally have happened with a sysvinit system but in that case, it would have been simple (though perhaps laborious) to find the corrupt file and replace it. With systemd you just can't do that.

At least he's got his home directory backed up.

Last edited by hazel; 08-25-2019 at 11:43 AM.
 
Old 08-25-2019, 11:49 AM   #15
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Sorry Hazel, missed that.

If their drive is faulty, then it would have happened anyway - systemd or not. Another idea is that they might be able to look in their /var/log/ folder on the drive in question (if it's still there), and see if there is any logs that could help, like /var/log/messages Then they could look for any messages from libata in that log.
 
  


Reply

Tags
boot failure, debian 9, fsck, init, kernel panic



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The uncrackable problem of end-to-end encryption LXer Syndicated Linux News 0 03-29-2017 02:33 AM
Determining cause of Linux kernel panic "Kernel panic - not syncing: Fatal exception" gladman002 Linux - Kernel 1 09-07-2015 08:04 PM
[SOLVED] end to end delay calculation in satellite links awk file problem-ns2.35 rianariana Linux - Software 3 11-23-2013 09:46 AM
Logging a Kernel Panic Event - Problem writing the log in panic situation lucasct Linux - Embedded & Single-board computer 5 09-08-2011 01:44 PM
Kernel Panic Kernel Panic!!! aditya Linux - Newbie 5 09-08-2002 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration