LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 05-23-2010, 07:10 AM   #1
wagscat123
Member
 
Registered: Jan 2009
Location: Westminster, Maryland USA
Distribution: openSUSE 13.1, LinuxMint 13 and tons more in VirtualBox
Posts: 192
Blog Entries: 7

Rep: Reputation: 21
Exclamation BASH file corrupt, and sh and init went down with it (DESPERATE)


If this is the only sentence you read, just learn the easy way: bash is a critical boot file in SUSE.

Yesterday afternoon, I was playing around with updating my system with RPMs from the openSUSE RPM Search. I had bash v 4.0.18 (I'm running a decaboot, the primary OS being openSUSE 11.2, where the issue is) and I installed a package that was bash 1.0.36. I restarted my Yakuake terminal to see the new bash. Immediately, I noticed the Yakuake terminal flashing rapidly, and the terminal wouldn't go down when I used the key that brings up and down, so I controlled-alt-escaped it and killed it off. Then I wondered if it was just me, so I hit ALT-F2 and logged in as root. It quickly said some symbol file (Something)_(Something)_REWRITE(maybe) then disappeared, giving my the login prompt. I though, well, OK maybe I have to restart it to get it to work. Init said "there is no more processes left on this runlevel" and I had to Power-Button it and reboot. When it rebooted, or tried to, I was greeted with "KERNEL-PANIC Tried to kill init"

I panicked with the kernel, and I went into my 11.3 Milestone 4 installation, tried to chroot it, but I received the same error as when I tried to log into root and was returned to my 11.3 session.

I later tried to do a mock update with the 11.2 DVD, and tried with the YaST package manager to downgrade BASH, but the RPM installation failed, even on good DVDs. I tried the rescue, but it said BASH wasn't a "critical file" while things I don't even use were checked (like openssh)

From 11.3, I tried linking sh from bash to ksh (Korne Shell). For all I know, it is just like bash. It didn't work. Same kernel error.

I relinked sh and bash together, and I am using SUSE 11.1 in the meantime, but does anybody know how to fix this without reinstalling my SUSE 11.2 completely?

Thanks,
Wagscat

Last edited by wagscat123; 05-23-2010 at 11:31 AM.
 
Old 05-23-2010, 10:20 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,988
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
Find out Bash' dependencies from your "known good" installation, then mount the 11.2 partition and 'copy -f' /bin/bash(2?) and its dependencies over the botched one, then if that makes 11.2 accessible again, download the previous Bash package and force-reinstall it over the newer one?
 
Old 05-23-2010, 10:50 AM   #3
wagscat123
Member
 
Registered: Jan 2009
Location: Westminster, Maryland USA
Distribution: openSUSE 13.1, LinuxMint 13 and tons more in VirtualBox
Posts: 192
Blog Entries: 7

Original Poster
Rep: Reputation: 21
Thanks

I tried it. Sorry, it didn't work.

Last edited by wagscat123; 05-23-2010 at 11:02 AM.
 
Old 05-23-2010, 11:18 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
I was going to suggest the same thing, but unSpawn beat me to it.

But it seems strange to me that simply installing a newer bash version would cause such problems, as they generally work hard to keep things backwards-compatible. I do know that ksh isn't perfectly compatible with bash, although they have many functions in common. Still, most important system scripts are written to stick to posix-compliant sh mode, which all shells should be able to run, so the exact shell used shouldn't matter.

Combine this with the fact that replacing the executable didn't work, and I'd say that the problem isn't with bash itself. Something about the installation of the new packages probably deleted, moved or otherwise changed something else important.

I suggest taking a look at the details of the packages themselves and see how they differ in what and where they install all the files in them.

By the way, what's up with the version numbering? Bash is currently up to 4.*, why does your post say 1.*? Is this some internal SUSE numbering system or something?
 
Old 05-23-2010, 11:37 AM   #5
wagscat123
Member
 
Registered: Jan 2009
Location: Westminster, Maryland USA
Distribution: openSUSE 13.1, LinuxMint 13 and tons more in VirtualBox
Posts: 192
Blog Entries: 7

Original Poster
Rep: Reputation: 21
What else then?

Earlier that day, I installed GRUB 2. But I booted into the system several times over a period of 12 hours before I installed the GRUB package. Sorry about the BASH, I got mixed up, I should have typed 4.0.18 and 4.0.36. I tried installing other packages, but the dependencies failed. When I had the SUSE disks, it was also trying to install Emacs on the mock-update. But Emacs didn't install. I almost think maybe the RPM base is messed up. On the DVD Repair, it said other "critical" packages like openssh and openSUSE-release were messed up.
 
Old 05-24-2010, 03:43 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,988
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
Quote:
Originally Posted by wagscat123 View Post
I tried it. Sorry, it didn't work.
Please don't say that. Instead please tell us exactly what you did.


Quote:
Originally Posted by wagscat123 View Post
I tried installing other packages, but the dependencies failed.
IMO you shouldn't be installing packages but verifying them ('rpm -Vv packagename0 packagename1'). Bash depends on libtermcap and glibc. If you can boot the 11.2 DVD in rescue mode or via the 11.3 session you should be able to verify packages, just have the "victim" partitions mounted someplace and use the "--root" and "--dbpath" args to adjust to where you mounted "/" and where your "var/lib/rpm" directory is mounted. Say you're inside your 11.3 session, your 11.2 root resides at /dev/sda2 and your 11.2 /var resides at /dev/sda6, run 'mkdir /mnt/rescue/sda2 /mnt/rescue/sda6; mount /dev/sda2 -t auto /mnt/rescue/sda2; mount /dev/sda6 -t auto /mnt/rescue/sda6; rpm --dbpath /mnt/rescue/sda6 --root /mnt/rescue/sda2 -Vv bash glibc libtermcap 2>&1>/tmp/rpmvv.log', then 'less /tmp/rpmvv.log'. If all looks OK check the (/mnt/rescue/sda6/)var/log/messages and other syslog files for clues.


Quote:
Originally Posted by wagscat123 View Post
I almost think maybe the RPM base is messed up.
Unlikely. If there's error messages do post them.
 
Old 05-27-2010, 05:22 PM   #7
wagscat123
Member
 
Registered: Jan 2009
Location: Westminster, Maryland USA
Distribution: openSUSE 13.1, LinuxMint 13 and tons more in VirtualBox
Posts: 192
Blog Entries: 7

Original Poster
Rep: Reputation: 21
Smile Thank You

I wasn't able to have the system down too long. I reformatted my openSUSE on Sunday and reset it up, now even better. I will save this post around in case I or anyone else runs into the same error.
 
  


Reply

Tags
bash, init, software, yast


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
ffmpeg corrupt file vipin_jss Linux - Software 1 10-11-2009 04:23 PM
[SOLVED] mysql not using the /etc/init.d/my.cnf file - Please help, I'm desperate! :) karll Linux - Server 4 09-17-2009 07:09 AM
file system corrupt mamtasahai1 General 2 01-27-2007 01:58 PM
Overwritten tar file - Please help, desperate!!! maraspin Linux - General 1 10-08-2005 07:21 PM
corrupt lease file ? h/w Linux - Networking 5 10-01-2003 09:05 PM


All times are GMT -5. The time now is 03:23 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration