LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-25-2017, 03:12 AM   #1
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,023

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Can rebuild kernel but it won't boot.


Have been running Slack64-current on a raid-1 array. Long story short I inadvertently deleted the kernels in the /boot directory (the one thing I didn't back up). So me thinks no problem, I boot Knoppix-8.1, mount /dev/md0 as /mnt/rescue, chroot it and build kernel from source. Have done this several times before on other machines. Run grub-mkconfig and it complains about not finding a lot of things in /proc but creates the grub.cfg file. DVD out, reboot and after a few seconds of seemingly normal boot sequence hangs and a trace is output to the screen. Now I have been trying to get this fixed for about a week. Read volumes of google searches, tried many things but no joy. Tearing hair out at this stage. Have tried kernels 4.14, 4.14.1 and 4.14.2.

Steps I used to build kernel -

Boot Knoppix, mount /dev/md0 on /mnt/rescue

chroot /mnt/rescue

go to /usr/src and untar kernel source, link kernel dir as linux, copy Slackware config-huge to linux as .config.

cd to linux and make, make-modules, make modules-install. Also installed kernel headers, firmware and modules from Pat's latest -current release.

copy bzimage to /boot and set up appropriate links to system map, etc.

run grub-mkconfig and kernels are picked up and added to grub.cfg. Checked in grub.cfg and the UUID is correct for the array.

In my googling I can across some references to mounting /proc /dev /run /sys before chrooting but it was not clear to me where to create the mount points. Under /mnt/rescue (see above) or separate dirs under /mnt. Had never done that previously and procedure had worked.

I'm probably missing something obvious so if someone can spot it please advise. I can't see forest for the trees at this point.

Nothing is written to syslog or messages. Thanks in advance

Last edited by 3rensho; 11-25-2017 at 03:13 AM.
 
Old 11-25-2017, 05:42 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Start by telling what you see on-screen when booting.

Also, is this a hardware array or do you build the array in software?

Mounting /dev /proc and /sys is sometimes needed - for lilo, for creating an initrd image, and such. You "bind-mount" these directories which contain information about the running system, on the Slackware filesystem below /mnt/rescue, so that your chroot-ed environment still has access to this system information.
You would do this before chrot-ing:
Code:
mount /dev/md0 /mnt/rescue
mount -o bind /dev /mnt/rescue/dev
mount -o bind /proc /mnt/rescue/proc
mount -o bind /sys /mnt/rescue/sys
chroot /mnt/rescue
 
1 members found this post helpful.
Old 11-25-2017, 06:07 AM   #3
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,023

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Thanks for the reply and clarification of the mounting Eric. The array is software (mdadm). When booting I get the grub menu first and then it starts a normal boot sequence. About four seconds into the boot process is when the trace starts. No way to get a screen shot unfortunately and the info on the screen is a bit arcane. Will try to copy some down and post it in a bit. Running on your latest LiveSlack now.
 
Old 11-25-2017, 06:58 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Did you install kernel modules package before or after your custom kernel installation?
 
Old 11-25-2017, 08:50 AM   #5
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,023

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Eric, many, many thanks. Followed the mount details you posted, built the kernel and grub-mkconfig behaved as normal and I have a running system again. Thank you again.
 
  


Reply



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
mdadm won't rebuild Cottsay Linux - Hardware 2 01-19-2010 02:46 PM
GRUB won't boot new kernel? Do I have a new kernel? Help! ttnunam Linux - General 8 11-15-2006 09:02 PM
reiserfsck --rebuild-tree won't finish Riallin Linux - General 1 12-14-2005 10:15 AM
New kernel won´t boot. Kernel panic aquarius_kasuia Linux - General 5 10-21-2005 04:02 AM
rebuild kernel 2.6 boot fail on soft RAID fs Ducko Fedora 4 10-05-2004 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:09 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