Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-14-2014, 11:55 AM
|
#1
|
LQ Newbie
Registered: Aug 2014
Posts: 2
Rep:
|
Stuck at the grub rescue page. Can't boot properly?
I ran Kali Linux. The new debianbase version of Linux to follow up BT5. It was working fine. Until I messed around in the terminal. I used ps commands to end a bunch of processes, then took a system update, and my computer was suddenly an all text computer. It was basically stuck without any pictures or sound, but it still had my data, and I could still execute linux commands, I then decided after having a sh!t load of sugar and coffee late at night to run sudo rm -rf / because I thought to myself 'it's already füćk3d up hur dur hur" well...that really sucked...I managed to delete the /boot file, so when I rebooted my computer, It came up to the grub rescue page with the error: file not found, since root tries to boot into (hd0,msdos1)/boot/grub, which no longer exists...I took my other computer and extracted the contents of a Kali Linux boot ISO from the official homepage into my USB. Sandisk 2.3 16GB. Used about 3gigs. It works on other computers. I try booting into it, but my computer goes straight into the grub rescue page. I tried reassigning root, prefix, and boot with the set command in the correct partition, where some data is still stored. I tried going into (hd0,msdos1)/media/ usb0, but when I rebooted, that data was wiped...insmod commands dont work properly. And I don't need any of you telling me I'm an idiot, I already know that what I did is ridiculously stupid... I just need to know if it can be fixed, or if I need a new computer...
|
|
|
08-14-2014, 07:32 PM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,312
|
You need to get the BIOS to boot the USB before the internal hard disk. Some (most) machines allow you to bring up a boot option screen by hitting the appropriate key during power-up. With luck you'll have a (vendor) splash screen that flashes up and tells you the key - might be F12, F2, <Esc>, <Del> ...
Try them all (one at a time) if you have no better lead.
Else you might wind up in the BIOS screen, just change the order there - you can always change it back later.
Once in, have a look around to see what you actualy have left in the way of files.
|
|
|
08-19-2014, 01:07 PM
|
#3
|
LQ Newbie
Registered: Aug 2014
Posts: 2
Original Poster
Rep:
|
At the mainboot logo, in the bottom right corner it said 'F7 BOOT OPTIONS'
So I pressed F7 and was taken to a blue blox saying
"Please select boot device:
P5: ST9750420AS
Realtek PXE B04 D00
P0: TSSTcorp CDDVDW SN-208DB
SanDisk Ultra 2.01
Enter Setup
"
So I scrolled down to Sandisk Ultra 2.01, which is my bootable USB.
It then booted into the broken OS I was trying to replace,
saying 'File not found'.
There is a boot file in my usb. Everything is extracted and named properly.
The file 'normal' for insmod on the broken OS is also not working.
So even though I can reassign the boot file for my broken OS with set commands, I can't save the prefix with insmod, making it useless.
My best bet is booting through a disc.
I don't even know if that will work, since the USB didn't work either.
|
|
|
08-20-2014, 01:25 AM
|
#4
|
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841
|
If you removed boot you not only removed grub, but linux-image & kernel-config files.
|
|
|
08-20-2014, 08:33 AM
|
#5
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,052
|
Somehow, you are going to have to direct your BIOS to boot from a known-accessible device with known-good content starting with, and including, the boot-loader. That's precisely why I have a "rescue DVD" always-handy: I know that I can persuade any device to boot from it, and I know that its content is both good and unalterable. (Not every system can boot from USB, and in any case, most USB-sticks are not and cannot be write-protected.)
Then, from that known-good platform, you must do whatever is required to reconstruct "bootability" on the damaged drive: installing or reinstalling a boot-loader (the entire contents of /boot, the Grub config-file, and the MBR. Exactly what may be required depends upon what the damage is. But, first, you must get to a reliable point from which you can fix it.
|
|
|
08-22-2014, 07:50 AM
|
#6
|
Member
Registered: Sep 2005
Location: Rishon Le Ziyyon Israel
Posts: 198
Rep:
|
sundialsvcs gave you some excellent advice about a rescue DVD. I think you wrote that on other machines you can boot into something. Using that something go download a Linux live CD and burn it.
If your computer is near enough one of the latest types then most will be open to you.
Next assuming your computer Bios is set to Boot from CD/DVD as first sequence you should be able to boot into it. Once in it go examine and decide if your Linux partition is worth saving. If not salvage private files to either another partition or usb flash key. When and if you have decided that it's not worth saving, format that partition and start over as a clean install. Clean installs may take time but they do get rid of a lot of sins.
If like me I have more than one system on my computer, it should show up in the Grub menu. Once all is installed, install Grub-Customizer as it will make life a lot easier deciding which system should be top of the list.
There are some excellent Grub recovery programmes that you can download and burn. However if you have done so much damage, you may not know where to put your hands to first.
Good Luck.
|
|
|
All times are GMT -5. The time now is 01:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|