Cannot reach login screen due to power failure and stupidity.

Distribution: OpenSUSE 13.1

Hello all.

I’m sorry if this post is a bit long winded, but I’ve got myself into a bit of a fix.

I perform Apper recommended updates fairly regularly and usually everything goes fine. On this occasion, after the download phase was over and apper was installing the updates, there was a power failure. My UPS kicked in and so I waited for Apper to complete the installation. Unfortunately there had been several power failures that day and the UPS battery must have got low. The UPS shutoff after a minute or so while the installations were in progress.

After the power came back on, I restarted Apper and clicked the update button. I got a message box saying that some files related to libpulse0 12.1 needed to be removed. I clicked OK - but this led to the error message that “cannot remove system protected files”. So I started YAST searched for libpulse0 files and updated them to the latest version libpulse0 20.1. Went back to Apper and tried again, but got the same message libpulse0 12.1 - needs to be removed - but cannot remove system protected files. This time I checked the error message detail. The detail was to the effect that the libpulse0 12.1 files did not exist. I went back to Yast and restored the libpulse0 files from v 20.1 back to v 12.1. After this the Apper removal worked fine, and the entire update that was interrupted by the power failure completed successfully.

So far so good. Meanwhile, however, three more updates were available via Apper. I though I might as well install them. One of these updates was for bash and bash-docs. When I tried to update, got the message: bash, bash-docs and readline-docs (all version 12.1) need to be removed. Clicking OK gave the error: “Cannot remove system protected files” with detail to the effect that the files did not exist. I decided to try the same procedure as above. Started YAST and searched for bash. There was no update available. So I just refreshed bash and bash-docs (updated them back to themselves). Went back to Apper and tried to complete the update - same error.

This is where I decided to get creative and stupid. I started YAST, went to bash and bash-docs - and downgraded them to the previous version (8.1). Yast happily downgraded them. This time when I went back to Apper, the Apper application itself refused to start and YAST refused to start also. I rebooted (more stupidity) and was unable to get to any kind of login.

As you may have gleaned, I’m relativley new to linux. I tend to only use the command line when there is absolutely no option so my facility with the command line is limited. Nevertheless if there is some set of instructions that can get me back to the login GUI, it would be nice.

Thank you.

I suggest that you open a terminal session;
use the command “su -” to become root.
Run the command:


# zypper up

That might not solve your problem, but it is more likely to work than using Apper.

On 10/26/2014 02:46 PM, emeskay wrote:
> As you may have gleaned, I’m relativley new to linux. I tend to only use
> the command line when there is absolutely no option so my facility with
> the command line is limited. Nevertheless if there is some set of
> instructions that can get me back to the login GUI, it would be nice.
>
> Thank you.

You can still run YaST from the command line, you will need to use the
keyboard to navigate though. This of course assumes you have a shell
installed.


openSUSE Factory 64 bit
KDE 4.14.0

Thanks for the suggestion.

It does appear that there is no shell. I booted up in recovery mode and tried to log in as root with password. As soon as I enter the root password, I get the error:
“No shell - no such file or directory”

I also tried rescue mode using the bootable openSUSE 13.1 CD. The rescue mode allows you to log in as root to a “pseudo system” with no password in which you can mount your real system. Following some instructions I found elsewhere, I entered the following:

mount /dev/sda6 /mnt
mount /dev/sda7 /mnt/home
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
cd /mnt
chroot /mnt

[sda6 is my root partition]
[sda7 is my data partition]

This gave an error to the effect that bash was not found.

Does this mean that I have inadvertently uninstalled bash?
What can I do now?

On 10/26/2014 10:06 PM, emeskay wrote:
>
> Thanks for the suggestion.
>
> It does appear that there is no shell. I booted up in recovery mode and
> tried to log in as root with password. As soon as I enter the root
> password, I get the error:
> “No shell - no such file or directory”
>
> I also tried rescue mode using the bootable openSUSE 13.1 CD. The rescue
> mode allows you to log in as root to a “pseudo system” with no password
> in which you can mount your real system. Following some instructions I
> found elsewhere, I entered the following:
>
> mount /dev/sda6 /mnt
> mount /dev/sda7 /mnt/home
> mount -o bind /dev /mnt/dev
> mount -o bind /proc /mnt/proc
> mount -o bind /sys /mnt/sys
> cd /mnt
> chroot /mnt
>
> [sda6 is my root partition]
> [sda7 is my data partition]
>
> This gave an error to the effect that bash was not found.
>
> Does this mean that I have inadvertently uninstalled bash?
> What can I do now?
>
>

I suspect what happened is for some reason during the “version change”
bash was removed and the system freaked out. I would probably just back
up important stuff and reinstall at this point but there may be a way to
save the system (although I cant think of how).


openSUSE Factory 64 bit
KDE 4.14.0

This might work.

Boot the live rescue CD.
Make sure that you have a network connection.
Mount the root file system to “/mnt”
Mount other file systems (“/home”, perhaps “/boot”)


# mount --bind /dev /mnt/dev  ### not sure if these bind mounts are needed
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys

And now run zypper on behalf of the mounted system:


# zypper -R /mnt up

That uses the “zypper” from the rescue system. Hopefully it doesn’t require bash from the mounted system.

I don’t know if it will work. I used this method back in June when a half-completed update left zypper broken.

… procedure should be (try):


mount /dev/sda6 /mnt
mount --bind /dev /mnt/dev
chroot /mnt
mount -t proc proc /proc
mount -t sysfs sysfs /sys

… then run zypper.

I don’t think that would work if the shell is missing. The “chroot” will try to start that shell and fail.

Maybe:


# chroot /mnt /usr/bin/zsh

would work with the “zsh” which is probably still there.

My suggestion in the previous reply was to run “zypper” at the top level without doing a “chroot”, but use the “-R” option for that zypper so that it acts on the mounted system.

Thanks nrickert and Fraser_Bell.

I tried both your suggestions, but no luck.

I can’t chroot to /mnt - bash is not found.
If I try running zypper from the rescue command line - zypper not found.

I also located yast and yast2 in /mnt/sbin, changed to this directory and tried ./yast, but this gives a list of errors, ending with - “something is wrong with the yast installation”.
Located zypper in mnt/usr/bin, changed to this directory and tried running ./zypper -help, but get an error.

I didn’t make note of the exact error messages, but I could do it again and post them here if that would help.

I could probably reinstall without any problems, but it would be a quite a pain as I would have to make a note of all the non-default software and reinstall all of them.
Hopefully I wouldn’t lose my settings as they they should be in my home partition - am I right?

State Electricity Board morons. The forum emoticons are too gentle. Isn’t there a “sharp kick on the nuts” icon?

On 2014-10-27 13:46, emeskay wrote:
>
> Thanks nrickert and Fraser_Bell.
>
> I tried both your suggestions, but no luck.
>
> I can’t chroot to /mnt - bash is not found.
> If I try running zypper from the rescue command line - zypper not found.
>
> I also located yast and yast2 in /mnt/sbin, changed to this directory
> and tried ./yast, but this gives a list of errors, ending with -
> “something is wrong with the yast installation”.
> Located zypper in mnt/usr/bin, changed to this directory and tried
> running ./zypper -help, but get an error.

IF you don’t have the BIG DVD installation DVD, download it now, for the
same version as you have currently installed. Get it into a DVD or a USB
stick.

Boot it. Choose “upgrade installed system” when asked. Follow your nose.

Ie: upgrade 13.1 to 13.1

When finished, try booting. If it works, text mode or graphical mode
does not matter, run YaST Online Update (not Apper, drat the thing), and
let it finish. Alternatively, use “zypper patch” (not zypper up).

Then reboot.

On issues, report back here. I’ll light a candle for you :wink: :-p


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

You were probably using the rescue system on the DVD installer, while I was thinking of the live rescue CD.

In any case, if you have the DVD installer, then Carlos suggested upgrading 13.1 to 13.1, and that might be an easier way to solve the problem.

Oh, I see. Yes I do see there is a rescue CD available for download on openSUSE.

In any case, I did a quick dry run for the upgrade. If I leave the options “Use online repositories” unchecked, the install program informs me that sda6 has a different architecture - to be expected since the DVD I have is version 13.1.4 which has been upgraded over time. So I guess I should check the “Use online repositories” option and “automatic configuration” option?

Thanks, Carlos, for your advice and offer. Could you please appease the God of electricity also so that there is no power failure during the upgrade.

Regards.

Personally (Carlos might disagree), I would not use the online repositories while “upgrading” (BTW: I do believe Carlos recommended the “upgrade” method because you will not lose any of the extra software you installed, although everything else will be set back to the state of the DVD). Instead, I would do the upgrade, and when that is complete, select the online repositories and continue.

Just my preferred method, so nothing chokes during OS install (upgrade).

On 2014-10-27 21:26, emeskay wrote:
>
> Oh, I see. Yes I do see there is a rescue CD available for download on
> openSUSE.
>
> In any case, I did a quick dry run for the upgrade. If I leave the
> options “Use online repositories” unchecked, the install program informs
> me that sda6 has a different architecture - to be expected since the DVD
> I have is version 13.1.4 which has been upgraded over time. So I guess I
> should check the “Use online repositories” option and “automatic
> configuration” option?

¡¡¡STOP STOP STOP!!!


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-10-27 21:26, emeskay wrote:
>
> Oh, I see. Yes I do see there is a rescue CD available for download on
> openSUSE.
>
> In any case, I did a quick dry run for the upgrade. If I leave the
> options “Use online repositories” unchecked, the install program informs
> me that sda6 has a different architecture - to be expected since the DVD
> I have is version 13.1.4 which has been upgraded over time. So I guess I
> should check the “Use online repositories” option and “automatic
> configuration” option?

¡¡¡STOP, DANGER AND CLIFTS AD DAGGERS AHEAD!!!

I should have seen this post earlier. I hope that I’m not too late and
that you nor done that upgrade.

The «different architecture» message means that your installation is 32
bit and the DVD you downloaded is 64 bit, or the other way round. So
please stop right there, check, and report back.

If you have indeed different version as I strongly suspect, go back and
download the correct version.

If you want to upgrade from 32 to 64 bit, it is possible, but please say
so and wait till I have a chance on the morrow to read your answer and
comment. It is far from trivial. Certainly doable, many have done it,
but not trivial.

Going from 64 to 32 bit, I don’t know of anybody that has done it, so it
is uncharted territory.

> Thanks, Carlos, for your advice and offer. Could you please appease the
> God of electricity also so that there is no power failure during the
> upgrade.

I hope that my warning is not to late and that you haven’t started. If
have indeed triggered and done unknowingly upgrade from 32 to 64 bit,
don’t despair, but wait till I can read and tell you how to continue.

Please be patient.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-10-28 04:26, Fraser Bell wrote:

> Personally (Carlos might disagree), I would not use the online
> repositories while “upgrading” (BTW: I do believe Carlos recommended
> the “upgrade” method because you will not lose any of the extra software
> you installed, although everything else will be set back to the state of
> the DVD). Instead, I would do the upgrade, and when that is complete,
> select the online repositories and continue.
>
> Just my preferred method, so nothing chokes during OS install (upgrade).

Just read my two posts just sent. One was a big and quick warning as
soon as I read yours and his message. The second post has the explanation.

Actually, it was your message that warned me that something was amiss,
so thanks.

I do not generally recommend enabling update repos during the offline
upgrade method, the one with the DVD; only if there are known crucial
problems with the version on the DVD being unable to produce a bootable
system, and which is solved with an update I recommend enabling them.

Reasons: That is much slower. That it is an untested procedure, as the
DVD was designed for the contents available at release time, not for the
updates.

It is possible to add online repos during the procedure, at the start.
Just disable the update repo, use only oss and non-oss. However. This is
exactly the same as using the network install CD, as absolutely
everything is then downloaded from the network, and everything in the
DVD is ignored. Even the boot image!

It is a BUG, IMNSHO.

So, unless you pull from a local network mirror, or your internet pipe
is good enough, DON’T. Just use the DVD as is, no external repos. If you
do have those things (I don’t), then just use the network CD. It is
actually easier.

Sure, this means that you later have to also update with “zypper dup” or
YaST everything that was not in the DVD. Oh, well… we get paid to do
our jobs. Wait… I want my paycheck, I haven’t been paid in long
time… :-p


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

No I haven’t upgraded yet. I thought I’d wait 24 hrs for any comment, just in case. Good thing!

I had definitely downloaded and installed the 64 bit version and that is what I have on the DVD.
I’ll get back to you with the exact message about the architecture.

Regards.

On 2014-10-28 11:26, emeskay wrote:
>
> No I haven’t upgraded yet. I thought I’d wait 24 hrs for any comment,
> just in case. Good thing!
>
> I had definitely downloaded and installed the 64 bit version and that is
> what I have on the DVD.

Verify the current one with “cat /etc/os-release” and “uname -a”.

> I’ll get back to you with the exact message about the architecture.

Please do. I’m relieved that you did not go ahead. Pffiuuu!

Also, try to post this if you can:


lsblk --output NAME,KNAME,RM,SIZE,RO,TYPE,FSTYPE,LABEL,PARTLABEL,MOUNTPOINT,UUID,PARTUUID,WWN,MODEL,ALIGNMENT


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Since I cant log in to the system, I had to go via rescue, mount the main partition and then type:
cat /mnt/etc/os-release

I didn’t really know how to save the result to file. so I took it down on a piece of paper.

Result is:
NAME=openSUSE
VERSION=“13.1(Bottle)”
PRETTY_NAME= “openSUSE 13.1 (Bottle)(x86_64)”
ID=opensuse
ANSI_COLOR=“0.32”
CPE_NAME=“cpe:/opensuse:opensuse:13.1”
BUG_REPORT_URL=“https://bugs.opensuse.org
ID_LIKE=“suse”

Result of lsblk --output NAME,KNAME, … etc is:

RM RO SIZE TYPE FSTYPE LABEL UUID
sda 485.6 GB
sda1 0 0 100 MB
ntfs
sda2 0 0 1 KB
sda3 0 0 125 GB ntfs
SYSTEM
sda4 0 0 214.9 GB ntfs
OUTPUT
sda5 0 0 7.5 GB swap
sda6 0 0 70 GB ext4
LXROOT
sda7 0 0 47.4 GB ext4
LXHOME
sdb 485.6 GB
sdb1 0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D][/TD]
[TD]loop[/TD]
[TD]squashfs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]loop4[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]loop[/TD]
[TD]squashfs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[/TABLE]

Alignments are all 0.

As you can see, I have a bunch of ntfs partitions. Windows 7 system is on SYSTEM. An old xp system lies on sdc.
I didn’t bother with the UUIDS except for the dvd drive. By the way what is loop0, loop1, … etc. What about RM and RO?

Also the exact message for upgrade (onto sda6) was :
“The architecture of the system installed in the selected partition is different from the one of this product.”

Thanks.

Regards.

CPE_NAME=“cpe:/o:opensuse:opensuse:13.1”