GNU GRUB Terminal - Instead of Ubuntu login screen
Note: Before you mark it as duplicate, please read the question fully.
I've been using Ubuntu 12.04 normally, but today when I turned my laptop on, and selected Ubuntu out of two options: Windows and Ubuntu, the following screen appeared:
I searched this a lot on here, but couldn't find a working solution.
One solution suggested me that I should do first ls in different partitions and see where the file vmliuz or initrd resides. But I found no where these files.
I also played with the brightness of my laptop, which may be a cause of this stuck screen.
Edit 1:
I'm still unable to find the directory that contains the initrd.img file.
grub> ls
(memdisk) (hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
grub> set pager=1
grub> ls (memdisk)/
wubuilder.cfg
grub> ls (hd0)/
error: unknown filesystem.
grub> ls (hd0,3)/
$AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $ $Secure $UpCase $Volume ./ Code School/ Downloads/ Movies/ System Volume Information/ ubuntu/ wubuilder
grub> ls (hd0, 2)/
Programming Files (x86)/ Users/ $AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $ $Secure $UpCase $Volume ./ Documents and Settings/ hiberfil.sys Intel/ MSOCache/ pagefile.sys PerfLogs/ Program Files/ ProgramDAta/ Recovery/ Setup/ swsetup/ System Volume Information/ Windows/ wubildr wubildr.mbr
grub> ls (hd0, 1)/
$AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $ $Secure $UpCase $Volume ./ Boot/ bootmgr BOOTSECT.BAK System Volume Information/Edit 2:
Also, please note that I've installed Ubuntu 12.04 and Windows 7. And my Ubuntu resides at the following location; I checked it by booting up Windows OS:
grub ls (hd0,3)/ubuntu/
install/ uninstall-wubi.exe winboot/ 1 2 Answers
If you have installed without Wubi.exe:
At the grub prompt try these commands:
set pager=1
lsNow, suppose the output of ls is: (hd0) (hd0,msdos2) (hd0,msdos1), in order to find the linux root filesystem run:
ls (hd0,1)/ which should give you all the files/folders in / such as bin/ boot/ cdrom/ dev/ etc/ home/ lib/ etc.
Once this is done continue with:
set root=(hd0,1)
linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
initrd /boot/initrd.img-3.13.0-29-generic
bootOf course replace vmlinuz-3.13.0-29-generic and initrd.img-3.13.0-29-generic with what you find in your /boot
/dev/sda1 is the location of the root system. You may have to change it if /dev/sda1 did not work.
If you have installed using Wubi.exe:
If you have installed Ubuntu using Wubi, perform following steps as given in the WubiGuide:
boot into Windows, run
chkdsk /rfrom Windows on the same drive where you installed Ubuntu, shutdown cleanly and then try to boot into Ubuntu again.if still not good, check that you have a
C:\ubuntu\disks\root.diskfile. If this file is missing, boot on Windows, open theWindows Explorer, set it to be able to see hidden folders, then look for a hidden folder calledC:\found.000ordir0000.chk. Move the files from found.000 to their original location inside the\ubuntu\disksdirectory. You may have to rename it intoroot.disk.
Run those commands
grub> linux (hd0,1)/vmlinuz root=/dev/sda1
grub> initrd (hd0,1)/initrd.img
grub> bootReplace hd0 with your hdd number and /dev/sda1 with your partition holding the /boot mainly the dafult will work if you don't have more than one hdd and with default installtion
When you can boot again you should fix your problem
sudo update-grub
sudo grub-install /dev/sda 4