This is a read-only archive. No new posts or registrations. Privacy Page Still need help? Ask the volunteers at Geeks to Go, free.
Software

Grub rescue in windows 7

26 min read

This thread's last reply is from . Advice, software, and links below may be out of date — treat specific steps and download links with caution.

yes it's not a grub rescue command so when you run the boss flash drive choose the start boss live from the menu, this won't make any changes to the hard drive. :-http://bosslinux.in/downloads

at the desktop open a terminal and use the sudo fdisk -l command to show the partition table.

 

:popcorn:

Here the partition table, they gave a option like advanced option, from there I got this, start live did't work for me, any way here is the table…

 

 

~ # fdisk -l

 

Disk /dev/sda: 320.1 GB,, 320072933376 bytes

255 heads, 63 sectors/track, 38913 cylinders

Units= cyliders of 16065*512=8225280 bytes

Sector size (logical/physical): 512 bytes/4096 bytes

I/O size (minimum/optimal): 4096 bytes /4096 bytes

Disk identifier: 0xc9a55a55e36

 

 Device     Boot   Start          End               Blocks             Id         System

 

/dev/sda1    *           1              13              102400            7       HPFS/NTFS

/dev/sda2               13        12749        102297600            7      HPFS/NTFS

/dev/sda3         12749        24906          97654784            7      HPFS/NTFS

/dev/sda4         24906        38914        112514048            5      Extended

/dev/sda5         25544        38914        107392000            7      HPFS/NTFS

 

 

 

Disk /dev/sdb: 8166 MB, 8166703104 bytes

255 heads, 63 sectors/track, 992 Cylinders

Units = cylinders of 16065*512=8225280 bytes

Sector size (logical/physical): 512 bytes/512 bytes

I/O size (minimum/optimal): 512 bytes /512 bytes

Disk identifier: 0xcad4ebea

 

 Device     Boot   Start      End        Blocks           Id      System

/dev/sdb4    *         1      993       7975168            b      W95 FAT32

Partition 4 has diffrent physical/logical endings:

     phys=(991, 254, 63)   logical=(992, 223, 63)

~ #

so I'm clear now 'sda' is my Hard disk, and If my guess right, the problem is with partition4 (sda4), 

the ending ponit of sda4 shout be 25544, but I changed that into 3814 (means I extended that upto maximum from win7 so it's lost)…

 

It's just my guess, I don't know exactly… 

so tell me, what should I do after here??

 

start live did't work for me, any way here is the table..

if it didn't work then how did you boot into a live os to use the fdisk command?

 

ok nothing like what i was expecting to see, there's no hidden restore partition there for starters, and the partitions start on the same number as the end of previous partition, where i'd expect them to be 1 greater.

 

partition sda4 is just an extended partition, so really it's sda5 that is wrong and should start at 24906 and not 25544

 

according to that win7 had at least 2 hard drive labels before you created the 3rd "E" drive out of the ubuntu partition which it said was free space.

 

is that correct?? so you had ,C and D drives in win7 even when boss was installed?

 

i think this is what each partition is but am not 100% sure

sda1 is win7 system reserved partition (boot partition, where win7 stores boot files and boss put your grub bootloader.)

sda2 is win7 operating system (win7 C drive?)

sda3 is win7 data (win7 D drive?)

sda4 is an extended partition which just means it is like an empty hard drive, used to create more partitions.

you need one with mbr disks if you want to create more than 4 partitions on a drive.

sda5 is where the ubuntu os was i'd guess (win7 E drive?)

and the missing blocks from 24906 to 25544 which is now empty space would have contained boss swap partition.

 

so because i'm not 100% certain before you do anything else i want you to examine sda5 and see what if any files are on it.

 

if it's empty then it's safe to delete (using fdisk) both the sda4 and sda5 partitions leaving the space empty on the hard drive.

now when you come to install boss it will use that empty space so you should have no fear of it accidentally using/deleting the partitions with anything win7 related.

 

if it's not empty we'll have to do some more investigating of your partitions to find out what is on them before making any changes.

 

 

not sure if this will work it's been to long since i've actually booted straight to a windows partition and my memory isn't that great but i think you can do a quick check of the win7 os now if you move the * from sda1 to sda2 partition, using fdisk, this should boot into your win7 on a restart.

 

to change boot partition use these commands.

sudo fdisk dev/sda
a
1
a
2
p

now you should see the * next to sda2 (if you don't see what you expect, DO NOT use the write w command and just quit out of fdisk using q as the next command.)

to actually make the changes stick, we need to write them to the hard drive so the next command is

w

now you can restart your pc to test if it will boot into win7.

 

after the test and before installing boss change the * boot partition back to sda1, do this using the same commands just change the number order so the first number you enter is 2 and last is 1.

 

 

to delete the partitions ready to install boss these are the commands.

sudo fdisk dev/sda
d
5
d
4
p

ok now sda4 and sda5 should not show in the table, (if you don't see what you expect, DO NOT use the write w command and just quit out of fdisk using q as the next command.)

again to make the changes permanent we need to write them to the hard drive with w.

w

now you can restart your pc and install boss and when it's finished you should have both win 7 and boss operating systems bootable again.

 

just to recap.

 

check sda5 is empty

can do a test boot of win7 now if you want.(optional, and may not work depending on how good my memory is.)

 

if sda5 is empty

can delete both sda4 and sda5 partitions and now install boss and everything should be working as before.

 

sda5 is not empty, do nothing and report back here what is on there.

 

:popcorn:

in the starting page of boss, they given a 'special option', within that they include a 'rescue mode'

there it checks hard disk, network, input/output…

finally this window is appeared

                                   [!!]Enter rescue mode
Enter a device you wish to use as your root file system. you will be able to do choose among various rescue operations to perform on this file system.

If you choose not to use a root file system, you will be given a reduced choice of operations that can be performed without one. This may be useful if you need to correct a partitioning problem.

Device to use as root file system:
       
                         /dev/sda1
                         /dev/sda2
                         /dev/sda3
                         /dev/sda4
                         /dev/sda5
                         /dev/sdb4
                         Assemble RAID array
                         Do not use a root file system

    

where I was select 'Do not use a root file system'

the response window is

                            [!!] Enter rescue mode

Rescue operations 
   Execute a shell in the installer environment
   Choose a different root file system
   Reboot the system
    
         

again I select 'Execute a shell in the installer environment'

the window after that..

                        [!!] Enter rescue mode

After this message, you will be given a shell in a installer environment. No file systems have been mounted.

executing a shell
                                                             

finally this window appeared 

 

BusyBox v1.17.1 (Debian 1:1.17.1-4) build-in shell (ash)

Enter 'help' for a list of built-in commands

 

~ #

 

in this window only I got that partition table

'to change boot partition use these commands.'

I done this, I changed boot partition into /dev/sd2.. 

But the sad is "it's not working"

now come to this,…

 You are absolutely right…

 

sda2 Win7 os is on Drive C

sda3 Win7 data(my files) on Drive D..

 

 and also I had a Drive Q which access was denied

 

the size of D is 102GB, Size C approximately 90 GB, my Hard disk size 320 GB

 So nearly 100 GB is out of my knowledge, I never used that(means not visible)

 

 

what I should I do after here…

 

'to change boot partition use these commands.'

I done this, I changed boot partition into /dev/sd2.. 

But the sad is "it's not working"

not a problem, but hope you changed the boot partition back to /dev/sda1, if not do it now before you do anything else.

 

 

now come to this,…

 You are absolutely right…

 

sda2 Win7 os is on Drive C

sda3 Win7 data(my files) on Drive D..

 

 and also I had a Drive Q which access was denied

 

the size of D is 102GB, Size C approximately 90 GB, my Hard disk size 320 GB

 So nearly 100 GB is out of my knowledge, I never used that(means not visible)

 

the q drive was probably your restore partition, if it was i'm sorry to say you've lost that now, but it might have been the windows reserved partition which is still there.

 

the next step before we make any changes is to check what is on sda5, if nothing is on there then we can safely delete sda4 and sda5 using the instructions in earlier post and install boss making sure boss installs the grub bootloader on the extended partition it should make so it can create the swap and root partitions, it may also add a home partition.

 

what options do you get on the boss main menu?

according to this link :- http://bosslinux.in/downloads

they are

 

start boss live

install boss - graphical

install boss - text mode

advanced options >

help

 

if that is correct then choosing start boss live should take you to a desktop where you can easily examine all the partitions on the hard drive.

 

if there is no start boss live option then because i can't remember the steps to mount and examine what files are on a partition from the prompt/command line (where you used the fdisk command), i think the easiest thing to do is download kde live from here :-  http://software.opensuse.org/131/en and use that to check what data is on sda5.

 

 

:popcorn:

just noticed i'd given you the wrong commands earlier to use with grub rescue, typo it said hda instead of hd0 (fixed in original post.) so can you also do a quick test of this again at the grub rescue prompt.

not expecting it to work but no harm in trying again.

 

when you start your pc and are at the grub rescue pronpt.

 

hit enter after each command

set boot=(hd0,5)
 set prefix=(hd0,5)/boot/grub
insmod normal
normal

if it worked and you got the boot menu and can now boot into boss or win7 then you will need to boot into boss and install grub with these commands to make it a permanent fix.

sudo grub-update
 sudo grub-install /dev/sda 

:popcorn:

yes, I've 'Start bosslive' option in main menu.. while I'm clicking the page, it's getting crash and empty screen will appear,

 

I think problem is, I convert ISO file into Bootable flash drive using UltraISO(because I don't have DVD drive ), while converting iso may crashed, that's why I could't use that option(May be..) Other options are working properly, from main menu 'Advaned options only I get that prompt'

 

same problem happened with KdeLIVE also.. 

 

any other options to examine sda5???

in Kdelive also I can see that main menu, and some contents while install that Kdelive same empty screen appeared…

 

 

It's not working any other option to examine sda5?

ok sounds like there is a graphic problem with both boss and kde live.

 

try this when you get to the kde live menu type in

nomodeset

and hit enter, with any luck this will then get you to the desktop so you can examine what's on the partitions.

 

:popcorn:

Thank you for this command, it's working :weee: , in desktop, I can see my files, But I don't know how to go to sda5, 

Means these terms(sdaX) is new for me, I know that things by C,D,Q drives…

 

Here I show you what I'm seeing now..

 

 

Places

Home   

Network

Root

Trash

Devices

New volume             (For me It's my D drive, I could see my files)

Loop device            (I never saw these thins, it includes 20 folders, bin, boot, dev, etc..)

openSUSE 13.1 KDE Live (I think it's ,my USB)

hybrid                 (It's also related to my usb, because safely Remove option is here)

97.6 GiB Hard Drive    (It's my C drive, my windows related files are here)

New Volume1            (It's empty, may be this would be sda5, I don't know)

 

 

 

 

Help me please to find out sda5!!!

Any way thank you so much for your help till now, This positive result make me happy….

 

New Volume1            (It's empty, may be this would be sda5, I don't know)

yes i think your correct but to make sure

 

in a terminal type

mount -l

this will list the partitions with their mount points next to them.

 

once you are sure sda5 is empty then in the terminal use the fdisk commands from earlier post to delete the sda5 and sda4 partitions in that order, reboot to the boss installer and install it to the now empty space on your hard drive.

when that's installed everything should be back to how it was before.

 

when installing a linux os make sure the bootloader/grub is always installed to the linux root partition or extended partition and never in the mbr, this way you will not run into any boot problems of your windows operating system if linux gets broken or deleted.

 

once everything is up and working, if you like we can fix the mbr so if the linux partition is ever wiped again you will still be able to boot into your windows os.

 

you will need a copy of the windows install disc to fix the mbr and just follow this :- http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/ i'd suggest using the automatic startup repair option but the command line method is just as easy.

 

 you should find you can now only boot the windows os, to fix that we just make the boss/extended partition the boot/active partition again so everything is working as before with the choice of either windows 7 or boss on startup..

 

:popcorn:

I found something in kdelive, in the desktop menu I entered in Kinfocenter, there i select 

 

information modules->Device information->Memory->Storage->Hard disk

 

there I can see 6 partitions

 sda2

 

 File system type : ntfs
 Label : Not set
 Volume usage : File System
 UUID : 0456c7bf56c7afaa
 Mounted at  :var/run/media/linux/0456C7BF56C7AFAA
 Volume Space: 7.7iB free of 97.6 GiB (92% used)
 UDI  : /org/freedesktop/Udisks2/block_devices/sda2

 It's my 'C' drive, where I've Windows7 and program files
 

 sda4

 File system type: Unknown
 Label : Not set
 Volume space:Unused
 UUID :Unknown
 UDI  : /org/freedesktop/Udisks2/block_devices/sda4
 

sda3

 File system type : ntfs
 Label : New volume
 Volume usage : File System
 UUID : 8a58bd4358bd2eb7
 Mounted at  :var/run/media/linux/New volume1
 Volume Space: 93.0 GiB free of 93.1 GiB (0% used)
 UDI  : /org/freedesktop/Udisks2/block_devices/sda3

 
I can clearly say this, the cause of the problem is begin here, I can't access these 93 GB that's why I try for manual partition in windows 7, after that only problem started!!! 

 sda1

 File system type: ntfs
 Label : System Reserved
 Volume space: File System
 UUID : e40ab8240ab7fla2
 Mounted At: Not Mounted
 UDI  : /org/freedesktop/Udisks2/block_devices/sda1
 

sda

 File system type: Unknown
 Label : Not set
 Volume Usage: Partition Table
 UUID :Unknown
 UDI  : /org/freedesktop/Udisks2/block_devices/sda
 

sda5

 File system type: ntfs
 Label : New Volume
 Volume space: File System
 UUID : 5ab4flee4flcc8f
 Mounted At : /var/run/media/linux/New Volume
 Volume space : 9.7GiB free of 102.4 GiB (90% used)
 UDI  : /org/freedesktop/Udisks2/block_devices/sda5                                                                                                                                                      This is my 'D' drive, I've my personal files here..

 

 

So there is some stuff on sda5, we've to focus on sda3….

 

 

 

this is my result on partitions, what should be my next move? compare these things with partition table, and guide me…

 

 

If time allows quick review our conversations from start about the problem, That may give some ideas related to solution..

Thank you…

Still having this problem?

This topic is from the What the Tech archive and can't take new replies. Geeks to Go is an active, free help community run by volunteers. Post your question there and a person, not a bot, will work through it with you.

Ask on Geeks to Go →