LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Password no longer recognised; and 'latest' version of Ubuntu will not load (https://www.linuxquestions.org/questions/ubuntu-63/password-no-longer-recognised%3B-and-latest-version-of-ubuntu-will-not-load-4175699523/)

malwodyn 08-22-2021 10:25 AM

Password no longer recognised; and 'latest' version of Ubuntu will not load
 
I have a problem which I have so far been unable to resolve despite reading a number of threads on this forum.

I consider myself a Linux user, not a Linux expert. I’m happy to enter commands in a terminal, but very much more at home with a GUI.

Some years ago I purchased a Lenovo laptop running Ubuntu, and specially configured to allow me to enter text in Japanese, using LibreOffice. That worked quite happily until the screen developed a serious fault. I had been thinking of upgrading for some time, the available space on the hard disk was beginning to run low, and this was a good opportunity.

Unfortunately the suppliers of the original laptop were no longer in business; but a local computer repair shop was able to clone the hard disk onto a larger solid-state hard disk and install this in a second-hand Compaq Qinetiq laptop.

All worked well for a short time, until just before the beginning of lock-down, the cooling fan ceased to work. At round about the same time, I became unable to log on to my user account – the password was no longer recognised.

The problem with the fan has been rectified. However, there remain problems logging in to my account.

The original version of Ubuntu installed on the Lenovo laptop was “Precise Pangolin (12.04 LTS)”, and at some time afterwards “Quantal Quetzal 12.10” was installed. Now, when I try to start the machine, I am offered a choice of these two and can select one by moving the up and down arrows; if I highlight Precise Pangolin, I am then offered a choice of my own account or a Guest Session; my own account requires a password, but the password I’ve always used is no longer recognised. I can log in under Guest Session, but do not have access to my files. The good news is that LibreOffice still functions as it did prior to the problems, and I can switch from text entry in English to text entry in Japanese and back again.

However, if I highlight Quantal Quetzal as my selected operating system, the last line on the screen tells me that the ‘highlighted entry will be booted automatically in 5 – 4 – 3 – 2 – 1 seconds” but never boots; instead the countdown begins again at 5.

Pressing ‘enter’ to boot this OS does not work.

Pressing ‘e’ to edit the commands before booting gives

root (hd0,2)
chainloader +1
savedefault


(with the exception of the first command, which reads root (hd0,1) the same commands appear if I select Precise Pangolin)

and I am offered the choice of ‘b’ – boot, ‘e’ edit selected command, ‘c’ for a command-line, ‘o’ & ‘O’ to open a new line, ‘d’ to remove the selected line, or Esc to return to the previous menu.

Pressing ‘c’ gives me the following

[ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits.]

grub> _


HELP, please!!!

hazel 08-22-2021 10:53 AM

It looks to me as if your repair shop gave you a rather complicated boot system! You have GRUB to start with but GRUB isn't booting either of your systems. It's simply loading a second stage bootloader (maybe GRUB, maybe something else) in sector one of the appropriate partition, and this secondary bootloader for Quantal isn't working for some reason.

However, you might be able to boot Quantal directly from your main GRUB prompt, and then be able to reinstall GRUB. I think the commands you need initially are
Code:

ls (hd0,2)/boot
initrd (hd0,2)/boot/name of initrd
linux (hd0,2)/boot/name of kernel
boot

The first command will list the Quantal boot directory and you will see the kernel (its name will begin with vmlinuz) and initrd (name beginning with initrd or initramfs). Put these into the second and third commands and see if you can boot that way.

If you can boot Quantal, you should be able to mount Precise and reset your user password.

malwodyn 08-22-2021 11:03 AM

Thanks for your prompt reply.

I've just tried the following

grub> ls (hd0,2) /boot

and got "Error 27: Unrecognised command"

grub> ls (hd0,2)/boot

gave me the same reply

malwodyn 08-22-2021 11:15 AM

It does appear that ls is not a possible command. I presume that it stands for list - rather like 'dir' under MS-Dos. I can see what you want me to do; I cannot see a way of doing using the commands that appear to be available!

malwodyn 08-22-2021 11:24 AM

Having looked at the range of possible commands that appear to be allowed to me, I've tried

grub> find /boot/vmlinuz

and got "Error 15: File not found"

Thinking that a wildcard might help, I tried

grub> find /boot/vmlinuz*

and got the same error message

hazel 08-22-2021 11:39 AM

Try
Code:

find /boot/vmlinuz
followed by the tab key. That should list any files beginning with that string. Similarly with initramfs. I don't know why "ls" isn't working for you. It's listed in the GRUB manual.

This chap seems to have had a similar problem to you: https://newspaint.wordpress.com/2016...nd-ls-command/

malwodyn 08-22-2021 11:55 AM

Quote:

Originally Posted by hazel (Post 6277568)
Try
Code:

find /boot/vmlinuz
followed by the tab key. That should list any files beginning with that string. Similarly with initramfs. I don't know why "ls" isn't working for you. It's listed in the GRUB manual.

This chap seems to have had a similar problem to you: https://newspaint.wordpress.com/2016...nd-ls-command/

I've tried the

grub> kernel /vm[TAB] command (as suggested in the link you posted) and immediately got "Error 15: File not found". This came up on pressing [TAB] - I didn't even have to press [Enter]....

hazel 08-22-2021 12:03 PM

All right. Try
Code:

set root=(hd0,2)
. Then try find.

If that doesn't work, hopefully someone who knows more about GRUB than I do might be able to help you.

malwodyn 08-22-2021 12:24 PM

Entering

grub> set root=(hd0,2) gives me

Error 27: Unrecognized command

however, entering

grub> root=(hd0,2) gives me

grub>

I infer this means I've set something to specify where the system is to look for commands.

Back to the menu where I can select which OS to load. If I choose 'e' to edit commands before booting I'm offered either

root (hd0,1)
chainloader +1
savedefault (for Precise Pangolin)

or

root (hd0,2)
chainloader +1
savedefault (for Quantal Quetzal)

So I tried entering each of these commands in turn at the grub> prompt.
the first two gave me the grub> prompt, but the savedefault command returned "Error 27: Unrecognised command", even though it is listed as a 'Possible command'

syg00 08-23-2021 02:19 AM

What does the very top line on the grub screen say - the grub version ?.

shruggy 08-23-2021 03:01 AM

^This. Definitely looks like GRUB Legacy.

yancek 08-23-2021 04:46 PM

I'd suggest that you check the Grub screen for version as suggested in post 9.

You indicate that you have Ubuntu 12.04 and 12.10 installed. Both of those versions use Grub2 since Ubuntu switched to Grub2 with version 9.10. The commands you show to boot in your initial post and in post 9 are for Grub Legacy. If commands like 'ls' don't show any output, it would seem you have Grub Legacy installed as 'ls' is one of the basic commands available in Grub2

The link in post 5 is to boot Grub Legacy only.

Do you have a DVD/USB of any Linux available to boot as you may be able to get more useful information that way.
You might also contact the local computer shop you refer to which cloned your Ubuntu to the drive.

malwodyn 08-23-2021 04:55 PM

If I select QuantalQ and press 'c' for a Command line, then above the grub> prompt there is this message

[ Minimal BASH-like editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits. ]

Unfortunately, TAB seems to operate like ENTER, and doesn't seem to offer possible completions.

As noted in my earlier posts, I can boot Precise Pangolin; but it doesn't recognise my user password anymore.

yancek

entering one of the Possible commands vbeprobe

returns

VBE version 3.0
followed by what I presume to be a list of addresses, the first of whic is "0x105: Packed Pixel. 1024x768x8"


Contacting tle local computer shop is unlikely to be of much assistance, as they have little or no knowledge of Linux systems; Micro$oft is more their cup of tea...

I've tried to make a USB of a Linux distribution, but so far without success

hazel 08-24-2021 04:15 AM

Quote:

Originally Posted by yancek (Post 6277950)
You indicate that you have Ubuntu 12.04 and 12.10 installed. Both of those versions use Grub2 since Ubuntu switched to Grub2 with version 9.10. The commands you show to boot in your initial post and in post 9 are for Grub Legacy. If commands like 'ls' don't show any output, it would seem you have Grub Legacy installed as 'ls' is one of the basic commands available in Grub2

The link in post 5 is to boot Grub Legacy only.

It seems that the GRUB the OP is using only chainloads the first sector of each of his root systems. We don't actually know what the second-level bootloader is but this seems to be the one that is failing. Can GRUB2 actually be installed to a sector?

PS: Just checked the Ubuntu install notes and yes, it can be installed that way (NOT recommended!).
Quote:

Originally Posted by Grub2/installing

When using the "Something Else" option, you will be offered to choose the "Device for bootloader installation". Please select: * either the disk (eg /dev/sdX, not /dev/sdXY) on which the BIOS is setup to boot (recommended for normal use) * OR the partition (eg /dev/sdXY, not /dev/sdX) on which Ubuntu (/boot, else /) will be installed (only if you want to chainload it from another bootloader; if any doubt, do NOT choose this)

So my guess is that he has GRUB-legacy in the mbr and two GRUB2 loaders in the partitions. Not exactly user-friendly!

hazel 08-24-2021 06:01 AM

If this was my system, I'd suggest the following:

1) Download a bootable Linux image and put it on a CD or a memory stick. I'd recommend SystemRescueCD but an Ubuntu installation image would do.
2) Boot from it and mount /dev/sda1 (the Precise Pangolin root system, which we know is bootable). Edit /etc/shadow to remove your non-functioning password.
3) Reboot into Precise, log in and reset your password. Then use sudo grub-install to install GRUB2 to the whole drive, replacing GRUB-legacy. Hopefully the scripts that GRUB2 uses will pick up your Quantal Quetzal install too and you will end up with a single-stage GRUB2 boot with both of them on its menu.

That's a bit of a tall order for a newbie although there are people here who will hold your hand along the way.

malwodyn 08-24-2021 06:12 AM

I'd drafted the following just before hazel's last post was uploaded

"I have just managed to load Precise Pangolin as a Guest, but have not been able to open the Wi-Fi connection, as the system requires my user password.

So it seems to me that at least the PP installation is pretty well intact, but is looking for a user password in the QQ set of files. Unfortunately, one or more of these has become corrupted – which is why, when I select the QQ option on the screen, it never loads, but only cycles endlessly through the promise to load in 5 – 4 – 3 – 2 – 1 seconds. "

I'll try to download a bootable Linux image and put it on a memory stick. I think I can manage the second step suggested, but the third sounds a little daunting!

hazel 08-24-2021 06:30 AM

The point of reinstalling GRUB is that you want to get access to your more recent installation of Ubuntu, which doesn't seem to be bootable at present. Also you have been given an unnecessarily complicated boot setup, so why not simplify it?

But don't take my word for it. I'm sure the other people on this thread can tell you whether this is a good way to proceed or not.

yancek 08-24-2021 08:43 AM

Quote:

root (hd0,1)
chainloader +1
savedefault (for Precise Pangolin)
The above entry is a Grub Legacy entry and would be on some unknown partition trying to chainload from the boot sector the boot files on sda2. Grub Legacy numbers both drives and partitions from zero unlike Grub2 which numbers drives from zero and partitions from 1.

Quote:

root (hd0,2)
chainloader +1
savedefault (for Quantal Quetzal)
The above entry is on an unknown partition point to the sda3 boot sector.

Quote:

entering one of the Possible commands vbeprobe
Not sure what you're talking about here. I was referring to post 10 (had a typo in my post saying 9) asking you to check the version of Grub if it showed when booting.

I thought your local repair shop might have changed the bootloader but since all you asked them to do was clone there would be no reason to do that.

I would suggest that you follow the instructions from Hazel in post 15. If you are able to create a bootable USB with Ubuntu on it and don't feel you can follow these steps, go to the site at the link below while booted into the Ubuntu USB and download and install boot repair. Use the 2nd option (use the ppa) and select the Create BootINfo Summary option to run and post the link you get when it completes. Do NOT try to make any repairs. This will not fix anything but posting the link from the script will give a lot of details and someone should be able to help.

https://help.ubuntu.com/community/Boot-Repair

colorpurple21859 08-24-2021 08:55 AM

Did you try
Code:

root (hd0,0)
chainloader +1


hazel 08-24-2021 09:49 AM

Quote:

Originally Posted by yancek (Post 6278166)
I would suggest that you follow the instructions from Hazel in post 15.

Except that it seems to be /dev/sda2 you need to mount to get at your Precise Pangolin system, not /dev/sda1! I was unaware that GRUB-legacy numbered partitions differently from GRUB2.

You can always check which Ubuntu system you have actually mounted by listing the contents of its /etc/os-release file.

yancek 08-24-2021 02:42 PM

Quote:

I was unaware that GRUB-legacy numbered partitions differently from GRUB2.
Yes, it was more logical. Either count both from zero or both from 1.

The problem with the chainloader entries is that it tells which drive/partition it is trying to chainload to but not which drive/partition which Grub is on to chainload from. Maybe a separate boot partition?

I think that to actually get a comprehensive solution boot repair output will be needed.


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