LinuxQuestions.org
Visit Jeremy's Blog.
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 03-09-2018, 11:51 AM   #1
iNC0GNi70
LQ Newbie
 
Registered: Apr 2015
Distribution: Slackware64 14.2
Posts: 22

Rep: Reputation: 0
Slackware64 14.2 fails to boot after slackpkg upgrade-all


Hi, since some security patches I decided to do some updates, however, some things seemingly didn't work, I think lilo failed to run, and after an unwitting kernel update, the computer failed to boot (don't blame me, it was 2 am...)
So I tried to chroot from a Slackusb, but for some reason, it reports a segmentation fault upon logging in, just after giving me a fortune.
I have followed the instructions given here :
https://www.linuxquestions.org/quest...86#post5827786

Anyway I can recover my installation ? I'm pretty crippled without my Slackware now.

Also if it helps, I have restricted my root access to secure my system, so I think it may have prevented me from directly logging in as root in chroot, although I have no information other than a segmentation fault to confirm this.

Booting the computer with the huge kernel seems to bring me to a textual log screen, but none of the peripherals connected to the computer such as the computer will work, making the system unusable.
 
Old 03-09-2018, 02:28 PM   #2
ZloySergant
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
FOA, what's written in terminal? I've got "almost" similar problem (after updating to -118). Had to remake initrd.
Second (worst), what's you're partitioning scheme?
 
Old 03-09-2018, 10:12 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,382

Rep: Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151
How (and why) did you restrict root access? I'm not really sure why you think it would help secure your system.

Anyway, do you get the segmentation fault right after logging in as root when booting the installation media or when trying to chroot to your system partition? If it's the first one, it sounds like it may be corrupted and you may want to try and reimage your device. If it's the second, we'd need more info on how you restricted root access...
 
Old 03-10-2018, 07:28 AM   #4
iNC0GNi70
LQ Newbie
 
Registered: Apr 2015
Distribution: Slackware64 14.2
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ZloySergant View Post
FOA, what's written in terminal? I've got "almost" similar problem (after updating to -118). Had to remake initrd.
Second (worst), what's you're partitioning scheme?
Aside of a segmentation fault, it returns no error. And my system is on sda4.

Quote:
Originally Posted by bassmadrigal View Post
How (and why) did you restrict root access? I'm not really sure why you think it would help secure your system.

Anyway, do you get the segmentation fault right after logging in as root when booting the installation media or when trying to chroot to your system partition? If it's the first one, it sounds like it may be corrupted and you may want to try and reimage your device. If it's the second, we'd need more info on how you restricted root access...
Like this
Code:
echo 'ALL:ALL EXCEPT GROUP root:DENY' >>/etc/suauth
sed -i 's/^SU_WHEEL_ONLY.*/SU_WHEEL_ONLY yes/' /etc/login.defs
chown root:root /bin/su
chmod 4750 /bin/su
echo chown root:root /bin/su >>/etc/rc.d/rc.local
echo chmod 4750 /bin/su >>/etc/rc.d/rc.local
And
Code:
echo '-:ALL EXCEPT incognito:ALL' >>/etc/login.access
I did that mostly because I have some friends that used to want to hack me by any way possible so I just did that to prevent root access to be gained without me noticing it, also no one but me uses the computer and a single account is for me more secure.
And first, when I try to login as root through chroot using this command after mounting the necessary paths as explained in the topic I linked above :
Code:
chroot /mnt/Slackware env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h
It then gives me a fortune and a second after a segmentation fault.
 
Old 03-10-2018, 04:43 PM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,382

Rep: Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151
Well, I've never tried doing this on a system that has root disabled, so it could very well be related to your issue. When you chroot, it uses everything from the folder that you're intending to act as the chroot. So, if root is disabled, once it starts using the chroot, it will hit those limitations and could very well lead to a segmentation fault.

If it is related to root being disabled, I think your only way to resolve this would be to temporarily revert your changes. You can do that while still at the prompt after booting up the installation media before the chroot.

However, towards your concern about getting hacked, by default, ssh doesn't allow root logins via password. You can only log in as root using a pre-generated ssh key (although, you can change it to not allow root ssh logins at all or enable password logins, if desired). So, they wouldn't be able to get in that way. Also, you could also change the default ssh port from 22 to some random number, which would make it more difficult to allow others to even figure out the port needed to log in. And I don't think there's any situation where a single user is more secure than a normal user and a separate user with elevated permissions that is only used when necessary.
 
1 members found this post helpful.
Old 03-11-2018, 12:02 AM   #6
iNC0GNi70
LQ Newbie
 
Registered: Apr 2015
Distribution: Slackware64 14.2
Posts: 22

Original Poster
Rep: Reputation: 0
Would there be no way to login in with my username with chroot and su once in ?
Cause root ain't disabled, I can still use it if I su through my account.
 
Old 03-11-2018, 12:07 AM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,382

Rep: Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151
Quote:
Originally Posted by iNC0GNi70 View Post
Would there be no way to login in with my username with chroot and su once in ?
Cause root ain't disabled, I can still use it if I su through my account.
The installer isn't set up to allow anything other than root to log in. However, you might be able to use the --userspec=USER:GROUP option for chroot to specify a certain user, but I've never attempted it. It might be worth a shot.
 
Old 03-13-2018, 06:49 PM   #8
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Rep: Reputation: 17
Why do you want to login as your user?

Login as root and fix your bootloader.
 
Old 03-13-2018, 07:09 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,382

Rep: Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151
Quote:
Originally Posted by linuxbawks View Post
Why do you want to login as your user?

Login as root and fix your bootloader.
If you would've read the posts, you would've realized that he has root logins disabled for his system. So, when he boots the installer and logs in as root (into the installer environment), it works ok, but when he chroots, and the system takes over, he gets a segmentation fault.
 
Old 03-13-2018, 07:19 PM   #10
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Rep: Reputation: 17
root login disabled is a pragmatic measure. The only way to login is via installer.
Best run a fs check on root partition first using the installer env:

fsck -pf /dev/sda4
 
Old 03-13-2018, 07:32 PM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,382

Rep: Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151
Quote:
Originally Posted by linuxbawks View Post
root login disabled is a pragmatic measure. The only way to login is via installer.
And this was discussed above. I can't force OP to enable root logins for their system, so I provided a possible way around it, however, we haven't heard back if it worked or not. I wouldn't jump to harddrive/hardware issues just yet, since this was initially caused by just not upgrading the kernel properly.
 
Old 03-13-2018, 07:40 PM   #12
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Rep: Reputation: 17
Why are you advising to change fs data by altering permission etc then when you dont have a diagnosis?

It's a good idea to run a fsck regardless.
 
Old 03-13-2018, 07:58 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,039

Rep: Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418Reputation: 1418
Quote:
Originally Posted by linuxbawks View Post
Why are you advising to change fs data by altering permission etc then when you dont have a diagnosis?
He didn't.
 
1 members found this post helpful.
Old 03-13-2018, 09:22 PM   #14
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,382

Rep: Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151Reputation: 3151
Quote:
Originally Posted by linuxbawks View Post
Why are you advising to change fs data by altering permission etc then when you dont have a diagnosis?
Yeah, I'm not sure where you pulled that out of... all I suggested was to try and pass a certain user and group to the chroot to see if that can work around his root login restriction. Further up, I recommended OP to (temporarily) revert their changes, however, it seems they'd rather not resort to that.

Quote:
Originally Posted by linuxbawks View Post
It's a good idea to run a fsck regardless.
Just like it's a good idea to clean the heatsink and vacuum out the dustbunnies from your case... but the likelihood of these solving OPs problem are pretty low.
 
Old 03-14-2018, 10:08 AM   #15
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Rep: Reputation: 17
Quote:
Originally Posted by iNC0GNi70 View Post
Hi, since some security patches I decided to do some updates, however, some things seemingly didn't work, I think lilo failed to run, and after an unwitting kernel update, the computer failed to boot (don't blame me, it was 2 am...)
So I tried to chroot from a Slackusb, but for some reason, it reports a segmentation fault upon logging in, just after giving me a fortune.
I have followed the instructions given here :
https://www.linuxquestions.org/quest...86#post5827786

Anyway I can recover my installation ? I'm pretty crippled without my Slackware now.

Also if it helps, I have restricted my root access to secure my system, so I think it may have prevented me from directly logging in as root in chroot, although I have no information other than a segmentation fault to confirm this.

Booting the computer with the huge kernel seems to bring me to a textual log screen, but none of the peripherals connected to the computer such as the computer will work, making the system unusable.
Did you by any chance reboot your system before the update process threw you back to a prompt?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] latest slackpkg upgrade-all bricks system on slackware64-current jkh2cpu Slackware 48 01-03-2018 05:27 PM
[SOLVED] lilo failed to boot after "slackpkg upgrade-all" Slackware64 14.0 rei_kuroki Slackware 10 12-19-2013 07:28 AM
[SOLVED] slackpkg upgrade-all is not working in slackware64-current foobarz Slackware 1 08-13-2012 01:55 PM
[SOLVED] Can't get slackpkg to upgrade to slackware64 NightSky Slackware - Installation 4 06-09-2010 04:38 PM
Slackpkg fails on upgrade-all albhaf Slackware 1 12-02-2006 10:22 AM

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

All times are GMT -5. The time now is 10:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration