Password no longer recognised; and 'latest' version of Ubuntu will not load
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28
Rep:
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.]
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.
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28
Original Poster
Rep:
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!
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.
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28
Original Poster
Rep:
Quote:
Originally Posted by hazel
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.
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]....
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'
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.
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28
Original Poster
Rep:
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 05:06 PM.
Reason: reply to further posts
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.