LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-22-2021, 11:25 AM   #1
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Rep: Reputation: 0
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!!!
 
Old 08-22-2021, 11:53 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,871
Blog Entries: 16

Rep: Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461
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.
 
Old 08-22-2021, 12:03 PM   #3
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Original Poster
Rep: Reputation: 0
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
 
Old 08-22-2021, 12:15 PM   #4
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Original Poster
Rep: Reputation: 0
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!
 
Old 08-22-2021, 12:24 PM   #5
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Original Poster
Rep: Reputation: 0
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
 
Old 08-22-2021, 12:39 PM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,871
Blog Entries: 16

Rep: Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461
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/

Last edited by hazel; 08-22-2021 at 12:41 PM.
 
Old 08-22-2021, 12:55 PM   #7
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hazel View Post
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]....

Last edited by malwodyn; 08-22-2021 at 01:02 PM.
 
Old 08-22-2021, 01:03 PM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,871
Blog Entries: 16

Rep: Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461
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.
 
Old 08-22-2021, 01:24 PM   #9
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Original Poster
Rep: Reputation: 0
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'

Last edited by malwodyn; 08-22-2021 at 01:32 PM.
 
Old 08-23-2021, 03:19 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,063

Rep: Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672Reputation: 3672
What does the very top line on the grub screen say - the grub version ?.
 
Old 08-23-2021, 04:01 AM   #11
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,051

Rep: Reputation: Disabled
^This. Definitely looks like GRUB Legacy.
 
Old 08-23-2021, 05:46 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,590

Rep: Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150Reputation: 2150
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.
 
Old 08-23-2021, 05:55 PM   #13
malwodyn
LQ Newbie
 
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28

Original Poster
Rep: Reputation: 0
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

Last edited by malwodyn; 08-23-2021 at 06:06 PM. Reason: reply to further posts
 
Old 08-24-2021, 05:15 AM   #14
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,871
Blog Entries: 16

Rep: Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461
Quote:
Originally Posted by yancek View Post
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!

Last edited by hazel; 08-24-2021 at 05:20 AM.
 
Old 08-24-2021, 07:01 AM   #15
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,871
Blog Entries: 16

Rep: Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461
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.
 
  


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
KDE takes longer and longer to load vbisis Slackware 26 10-10-2010 04:28 PM
[SOLVED] usb external harddrive no longer recognised LaQuirreLL Linux - Hardware 12 01-25-2010 06:06 AM
IDE harddisk not recognised while installing latest linux distros biswajit12 Linux - Software 2 09-06-2007 12:09 AM
SuSE 9.2 DVD no longer recognised as Installation Source Marrea SUSE / openSUSE 3 02-12-2005 12:53 PM
hciconfig command no longer recognised triona Linux - Hardware 1 12-17-2004 02:44 PM

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

All times are GMT -5. The time now is 04:23 AM.

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