I was trying to reset the password > - Ask Ubuntu


i trying reset password , held down shift key when booting didn't wanted go instead said error attempting read or write outside disc 'hd0' entering rescue mode.... grub rescue>

when grub rescue appears, type

ls 

you partitions list

(hd0,msdos1) , on

now type

ls (hd0,msdos1)/

this display contents of partition. need repeat above step until find linux partition. contains directories boot, home, etc, var, lib, etc... once find partition remember name. use partition msdos1 linux partition here. type

set root=(hd0,msdos1) type set prefix=(hd0,msdos1)/boot/grub

insmod normal

normal

you should menu boot. if boot system, run update-grub , grub-install explained below. if can't boot after entering normal, then, try below steps.

boot grub rescue type following , press enter after each line. replace partition msdos1 linux partition

ls (hd0,msdos1)/boot/ 

you should find file name starting vmlinuz. kernel. type following line replacing kernel version , partition yours.

linux (hd0,msdos1)/boot/vmlinuz-4.4.0-21-generic  

now type following replacing version yours.

initrd initrd.img-4.4.0-21-generic

now enter

boot

you boot os. open terminal pressing ctrl+alt+t or pressing super or meta or windows key , searching terminal. after opening terminal, type

sudo update-grub2

then install grub typing

sudo grub-install /dev/sda

if fail @ both methods, then, boot live ubuntu disc , select try ubuntu , install ubuntu there. seems work better.

references: https://askubuntu.com/a/397520/534857


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User