Dual-boot Ubuntu-Windows 7 reinstall, can't boot GRUB goes into rescue mode

Lokalaskurar

Posts: 513   +0
Ok, so I have a computer with Windows 7 (64-bit Home) originally installed. Worked fine and all. So I installed Ubuntu 10.04 Lucid Lynx (64-bit) and selected to dual-boot on startup. Always worked until yesterday, when I restored my Windows 7 to factory settings.

Grub does not show me a menu, instead it goes into rescue mode.
Probably because I screwed up a partition via the Windows 7 restore or so :( .

After the 'rescue' command 'ls', I can see:
(hd0) (hd0,5) (hd0,3) (hd0,2) (hd0,1)

My Problem:
I need to know what to type into the 'Rescue Prompt' in order to boot up Windows 7. I know that the Grub needs to be fixed from within Ubuntu, I will also need help with how to access Ubuntu again in order to do that (fixmbr and fixboot unless I'm mistaken).

I am not very experienced with Linux, only been at it for a year or so.

Also; selecting from the BIOS to 'Boot from CD' does not boot from CD. I'm planning to remove the HDD altogether in order to force this command if no TechSpot heroes saves me :) .
 
Ah, superb piece of information. If this works, you have saved my a lot of money.

The tutorial which you've so conveniently found (thanks, btw) does mention some actions I'm not really familiar with.

I think I'm using GRUB 2... I fresh-installed Ubuntu 10 (Lucid Lynx), since it's a later version than Karmic (9.10) - I'll presume I'm using GRUB 2.

But: I cannot find my Ubuntu partition, no matter how hard I try.

I only have WINDOWS (C:\) and Data (D:\) mountable. Any suggestions?
 
Yes, you're using GRUB2.

How many hard disks does you're computer have, and what exactly used to be you're partitions? e.g. did Linux share the same physical disk with W7?
 
Linux shared the same physical disk as Win7.

Um... there might be a (very small) risk that I had Ubuntu on the same partition (C:) as Windows, thus it would be gone as it has been formatted during re-install. I have already saved all my files and so on, so there's no personal loss, just an unbootable computer.

The computer only has 1 hard disk, and it has 2 partitions (C:, and D:). C: is called 'WINDOWS' and D: is called 'Data'.

Judging from the 'ls', it seems like it actually has 5 partitions though... strange.

So, I can boot using a disk, I have the computer running Live CD beside me.

Under the 'Places' menu, I can only see WINDOWS and Data as drives (mountable). And I've followed the steps in the restoration tutorial - I'm stuck at the step where I'm supposed to find my Ubuntu partition, as I cannot find GRUB anywhere...
 
If you restored to factory settings it should have removed Ubuntu, and overwritten the MBR, so clearly its just restored the original settings in a non-destructive manner for some reason, but overwritten the MBR in the process of it.

From the Live desktop can you go to System > Administration > disk utilty and then could you tell me what information it shows you when your hard disk is selected please. The partitions will show in the right hand window, though you may need to highlight each partition along the bar.

We need to know for certain exactly what your current partitions on that physical disk are, otherwise we risk more damage than already done.
 
The exact 'Volumes': (as seen from the Live CD)

SYSTEM
Usage: Filesystem
Partition Type: Unknown (0x27)
Partition Flags: Bootable
Type: NTFS
Label: SYSTEM
Device: /dev/sda1
Partition Label: -
Capacity: 419 MB
Available: -
Mount Point: Not Mounted


WINDOWS
Usage: Filesystem
Partition Type: HPFS/NTFS (0x07)
Partition Flags: -
Type: NTFS
Label: WINDOWS
Device: /dev/sda2
Partition Label: -
Capacity: 250 GB
Available: -
Mount Point: Not Mounted


Data
Usage: Filesystem
Partition Type: HPFS/NTFS (0x07)
Partition Flags: -
Type: NTFS
Label: Data
Device: /dev/sda3
Partition Label: -
Capacity: 168 GB
Available: -
Mount Point: Mounted at /media/Data I think I mounted it previouslly.


Extended
Usage: Container for Logical Partitions
Partition Type: Extended (0x05)
Partition Flags: -
Device: /dev/sda4
Partition Label: -
Capacity: 82GB

(The following is written below 'Extended')

Free
Usage: Unallocated Space
Partition Type: -
Device: /dev/sda
Capacity: 78 GB


Swap Space
Usage: Swap Space
Partition Type: Linux swap (0x82)
Partition Flags: -
Device: /dev/sda5
Partition Label: -
Capacity: 3.4 GB


Was this what you needed to know?
 
The exact 'Volumes': (as seen from the Live CD)

SYSTEM
Usage: Filesystem
Partition Type: Unknown (0x27)
Partition Flags: Bootable
Type: NTFS
Label: SYSTEM
Device: /dev/sda1
Partition Label: -
Capacity: 419 MB
Available: -
Mount Point: Not Mounted


WINDOWS
Usage: Filesystem
Partition Type: HPFS/NTFS (0x07)
Partition Flags: -
Type: NTFS
Label: WINDOWS
Device: /dev/sda2
Partition Label: -
Capacity: 250 GB
Available: -
Mount Point: Not Mounted


Data
Usage: Filesystem
Partition Type: HPFS/NTFS (0x07)
Partition Flags: -
Type: NTFS
Label: Data
Device: /dev/sda3
Partition Label: -
Capacity: 168 GB
Available: -
Mount Point: Mounted at /media/Data I think I mounted it previouslly.

These are related to windows..

System Reserved
Windows 7 primary disk
Data disk


Extended
Usage: Container for Logical Partitions
Partition Type: Extended (0x05)
Partition Flags: -
Device: /dev/sda4
Partition Label: -
Capacity: 82GB

(The following is written below 'Extended')

Free
Usage: Unallocated Space
Partition Type: -
Device: /dev/sda
Capacity: 78 GB


Swap Space
Usage: Swap Space
Partition Type: Linux swap (0x82)
Partition Flags: -
Device: /dev/sda5
Partition Label: -
Capacity: 3.4 GB


Was this what you needed to know?

Yes, it was.

The Extended is just the changeover from primary partitions (3 out of 4 allowed are using Windows partitions), so the 4th partition (to allow more thereafter) is the extended partition.

The 2nd from last (is where I presume the root filesystem was before) is showing as just free space - Linux no longer resides there, except for the final parition, which is SWAP, and that exists still.

So the next question...

Do you want Ubuntu AND Windows? Or just Windows?

Which decision you make changes the route forward.
 
Ooo. Epic decision. But I've decided.

I want Ubuntu AND Windows. Ubuntu has saved me countless times and if I met Mr. Torvalds, I would bow before his might.

Even though I can only access the Internet using Windows, and ACPI is not supported for Linux on my computer, Ubuntu is a very powerful tool.
 
You're going to love this....

Just re-install Linux. :D

Though I recommend you manually edit the partitions, and create the following from the free space available:

/ 10GB
/usr 10GB
/home (rest)
Keep the existing SWAP (sda5)

Why can you only access the internet using Windows?
 
Yay! Great that the solution was that simple then...

Well, when I'm using Linux, I cannot access the Internet. Over at the 'connections'-button, neither the Wi-Fi router appears, or even solid connections (RJ45).

I've tried setting up static ISP's, but that doesn't work either. The router is currently using on the 'dynamic mode' (DHCP).

This has been the major reason why I'm still on Windows, I cannot access the Internet using Ubuntu. I think it's either related to my router model, or something to do with incompability linux>>computer.
 
Can you do me a favour, and connect the computer to the router with a ethernet connector during install of Linux please. Assume your router is the same as everyone elses (e.g. a simple modem/router with DHCP enabled) there should be no reason for any issues, or any need to alter any settings in Linux.

Ethernet is designed to "just work" by default, though to enable wireless usually requires the installation of restricted drivers.
 
Sure, I guess I can do that. I recall reading somewhere that it helps. Also, I think it's a great idea to add these partitions ( / , /home etc.).

One thing first though; I am not very familiar with Linux partitioning. Should I manually add the partitions now (disk utility, perhaps gparted), or during OS-install?
 
Do them during install mate.

The partitioner will keep the existing partitions, you just need to create each one by selecting the xxGB free space line, and then create or new, to make a new partition. The last /home partition, just leave the capacity alone and it will then use up the remaining space for you automatically.

While we're on the subject of partitions, I recommend EXT4 as the partition filesystem of choice. :)

SWAP will be configured automatically as it is still there in the partitions listing. Your 3 Windows partitions will be there as well. As long as you don't touch those partitions you will be fine. :)
 
Ok, so I'm all set to go (i.e. leave the partitioning and proceed with the installation).

But one last thing; I realize that I've created a 10GB mount point ' / ' , a 9999 MB ' /usr ' and ~58GB ' /home ' - don't I need a ' /boot ' mount point as well? Will I be able to dual-boot, choosing between Win7 or Ubuntu at startup with this configuration?

SYSTEM
WINDOWS
Data
/
/usr
/home
Swap

EDIT:
Come to think of it, where did /sda4 go? SYSTEM is /sda1, WINDOWS is /sda2, Data is /sda3 - 4 is not listed - Swap is /sda5, the newly created ones; /sda6 is ' / ', sda7 is ' /usr ' and /sda8 is ' /home '. Could /sda4 possibly be that extended area? Just curious.
 
/boot will work within /.

Yes, you will be able to dual boot, the records are contained to the MBR, it will find your existing OS no problems, and sort itself out so you can boot both OS'.

sda4 is an extended partition. Hard disks allow for a total of 4 primary partitions. To overcome this restriction when more than 4 partitions are required, the 4th primary partition is made an extended partition, that extends across the remainder of the free capacity of the disk.

This extended partition then allows you to create more partitions within itself until the total capacity of the extended partition has been used up.

For example.

1st primary is System reserved
2nd primary is Windows 7 main FS
3rd primary is Data (NTFS)
4th is Extended and contains /, /usr, /home, and swap

Think of an extended partition as allowing smaller boxes (partitions) inside itself.
 
This extended partition then allows you to create more partitions within itself until the total capacity of the extended partition has been used up.

How clever.

I'm currently installing Ubuntu, with the Ethernet-cable attached. I'll let you know when it's done!

Also, I noticed that under 'advanced' - a box was ticked reading something along 'bootable' - so I'm expecting success! :D
 
I'm sure it will be fine. Let us know of the outcome though, and whether or not you have internet once complete. :)
 
(Success!)

Windows 7 is back up and running! - including all the bloatware! - Also Ubuntu Lucid Lynx 64. I still have no Internet-access using Ubuntu, though :(

Although Windows 7 works like a dream. And it boots up faster than ever before! :eek:


Perhaps I should actually address the problem with 'no-connection' in Ubuntu, it's such a nice OS, truly.
 
Least you're Windows is up and running. :D

Could you give me the following from terminal the next time you're in Ubuntu please:

Code:
lspci

and

Code:
ifconfig

Please. :D
 
Sure, that's the very least I can do!

These two snapshots cover the entire terminal response to the two commands.

Screenshot1.png


Screenshot2.png


If you somehow cannot see them, you can view them at:

Screenshot 1: http://it-anglafar.99k.org/Screenshot1.png
Screenshot 2: http://it-anglafar.99k.org/Screenshot2.png

But you have to copy-paste the URL, otherwise the server will forbid your access :p .
 
Ahh, I thought that might be the case. Its the Atheros networking.

This page should work wonders for you! http://askubuntu.com/questions/11015/need-wired-wireless-atheros-driver-for-ar9285-and-ar8152

Just download the .deb in Windows 7, and then boot Ubuntu and navigate to the downloads folder in your Windows C Drive, and run the .deb file.

Once installed, you should be able to reboot, then connect to wireless, to then download the additional package to get your ethernet working.

Should should then be done. :D
 
Argh! I'm getting an error during packing-up; "Error: Dependancy not satisfactionable" (pardon poor grammar) - I am sure I'm trying to install the AMD64-version as well...

The wireless doesn't work after the pack-up, btw. And luckily, the router has Wi-Fi, (forgot to mention that :D ).
 
Back