Grub Rescue Shell, Ubuntu partition deleted
Hi guys,
I've had a Windows XP and Ubuntu setup on my netbook (Samsung N130) for some time, but I was running low of hard disk space so opted to format the parition with Ubuntu installed (i know, i know - but for this netbook I prefer XP).
This decision has rendered my system unbootable, on a restart I get the following:
error: unknown filesystem.
grub rescue>
I attempted to fix my MBR using a bootable flash drive with XP installed as detailed in this guide http://helpdeskgeek.com/how-to/fix-mbr-xp-vista/.
The operation completed successfully, though I receive the same problem on reboot, perhaps I did something wrong? Should it have not been on the C:\WINDOWS> command line, the parition I removed was originally on D:. I'm completed lost!
Thanks
Re: Grub Rescue Shell, Ubuntu partition deleted
Moved to OtherOS as Windows issue.
Did you run fixMBR as that is what writes the Windows boot loader to the MBR overwriting the grub boot loader in the MBR?
How to restore the Ubuntu/XP/Vista/7 bootloader
https://help.ubuntu.com/community/Re...ta/7Bootloader
Re: Grub Rescue Shell, Ubuntu partition deleted
Hi oldfred - thanks for the reply,
I followed the instructions on the link you provided as follows:
1. Booted from my Windows XP drive and chose to repair the Windows installation by pressing "r".
2. When prompted 'Which Windows installation would you like to log onto' I entered 1.
3. When prompted for an admin password I just pressed enter as I don't believe I have one.
4. At the C:\WINDOWS> command line I entered fixboot which produced the following:
The target partition is C:
Are you sure you want to write a new bootsector to the partition? (entered y)
The file system of the startup parition is NTFS
FIXBOOT is writing a new boot sector
The new bootsector was successfully written
5. I then ran fixmbr - received the usual:
** Caution ** this computer appears to have a non-standard or invalid boot record ... Are you sure you want to write a new MBR? (entered y to proceed)
The new master boot record has been successfully written.
6. Typed exit to restart the system, which brought me back to my bootable flash drive with Windows XP.
7. Restarted the system again after removing the flash drive, greeted with the same error: unknown filesystem.
EDIT: If it makes the process any easier - I'm prepared to lose any and all data currently on my hard drive.
Re: Grub Rescue Shell, Ubuntu partition deleted
If you have an XP install that should have fixed it.
Post this from Ubuntu liveCD. Will not fix Windows issues, but may show what is wrong.
Post the link to the BootInfo report that this creates. Is part of Boot-Repair:
https://help.ubuntu.com/community/Boot-Info
Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
https://help.ubuntu.com/community/Boot-Repair
You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.
Install in Ubuntu liveCD or USB or Full RepairCD with Boot-Repair (for newer computers)
Re: Grub Rescue Shell, Ubuntu partition deleted
Hello again oldfred,
I created a new bootable flash drive with an Ubuntu-Secure-Remix iso, and was successfully able to boot into Ubuntu.
Fom here I selected to 'Try Ubuntu', from where I ran Boot-Repair and selected to 'Create a BootInfo summary'. Noticed I could see all of the files on both my Windows XP C:/ drive as well as the empty D:/ drive.
Here is the URL that was output from the Boot-Info: http://paste.ubuntu.com/1532264/
Thanks for your help so far
Re: Grub Rescue Shell, Ubuntu partition deleted
Boot-Repair cannot do much to fix Windows. Your configuration looks ok, but then something internal to Windows is wrong. Normally chkdsk is the first thing to try.
You have to have the 3 boot files shown in your sda2. Partition shows as NTFS and partition boot signature says it is ok. Sometimes that is not and a rebuild with testdisk may fix it. Not sure if fixBoot just restores backup and if backup has issues then fixBoot does not work. Sometimes just replacing ntldr works. But depending on where copied from may need attributes reset.
If files are still missing you can do this to copy from CD to C:\:
COPY [CDDRIVE]:\I386\NTLDR C:\
COPY [CDDRIVE]:\I386\NTDETECT.COM C:\
Where [CDDrive] is location of cd or D: etc.
or:
Can you boot into Ubuntu? If so you can mount your Windows drive and navigate to C:\windows\ServicePackFiles\i386 folder and copy
ntdetect.com and ntldr to root of C:\.
Boot files may need attributes also from Windows repair console:
attrib +r c:\filename
attrib +h c:\filename
attrib +s c:\filename
Instructions
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
http://www.cgsecurity.org/wiki/Menu_Analyse
http://www.cgsecurity.org/wiki/TestD..._file_for_NTFS
See if testdisk reports partition boot sector as ok and backup as ok.
As described, it has an option to "Recover NTFS boot sector from its backup"
If Backup BS isn't available, choose RebuildBS.
Re: Grub Rescue Shell, Ubuntu partition deleted
/dev/sda1 has /bootmgr and /boot/BCD. Something strange. Windows 7 and Windows XP are mixed, although you don't mention about Windows 7.
/dev/sda2 has /NTDETECT.COM, /ntldr and /boot.ini.
How about chainloading to /ntldr on /dev/sda2?
You can chainload to /ntldr by grub4dos.
Re: Grub Rescue Shell, Ubuntu partition deleted
I have seen the Vista/7 recovery & XP install before. I think it usually is where after Vista came out you could down grade to XP, but the vendors already had changed recovery to a Vista style boot.
If you use testdisk to compare PBR to backup PBR you can use dump command to see the details of the PBRs. If you page down you will see plain text ntldr or bootmgr and know which style NTFS partition you have.
Re: Grub Rescue Shell, Ubuntu partition deleted
Appreciate the input, I'm not getting very far at the moment. Everything either seems to be as it should or I just hit a dead end - I have very little time at the moment so I apologise for the delays in getting back to this thread.
If I were to reboot using the WinXP flash drive - would I be able to format the hard drive and reinstall Windows on a clean hard drive? I've considering this as a backup option (in case this proves to be more trouble than it's worth), as I just need a system that will boot in Windows at this point. Would you advise that I use a utility such as KillDisk or DBAN first to wipe the HDD to ensure no trace of either OS or any kind of malware?
Thanks for the help thus far.
Re: Grub Rescue Shell, Ubuntu partition deleted
If you do not need anything in your HDD now, you can format all the partition.
But are you sure if you need nothing in your HDD?
I suggest you trying the following:
Boot with Ubuntu-Secure-Remix and "try Ubuntu".
Open "terminal" and execute the following:
Code:
sudo su -
wget -c http://download.gna.org/grub4dos/grub4dos-0.4.4.zip
apt-get update
apt-get install unzip
unzip grub4dos-0.4.4.zip
cd grub4dos-0.4.4
mount -t ntfs-3g /dev/sda2 /mnt -o rw
dd if=/dev/sda bs=512 count=63 of=/mnt/sdambr63
sync
./bootlace.com /dev/sda
cp grldr /mnt/
echo "timeout 5
default 0
title chainload to ntldr
root (hd0,1)
chainloader /ntldr" > /mnt/menu.lst
sync
umount -l /mnt
shutdown -h now
and remove USB and reboot.