I have installed Ubuntu 10.10 on my system. However, I need to install Windows 7 back, and I expect that it would alter GRUB and it did.
Right now, my partition on my Software RAID 0 looks like this:
nvidia_acajefec1 is Ubuntu 10.10 and nvidia_acajefec3 is Windows 7.
I've been following some guides around and I am always stuck at GRUB not able to detect the usual RAID content.
I've tried running:
sudo grub
> root (hd0,0)
GRUB complains it couldn't find my hard disk. So I tried:
find (hd0,0)
And it complains that it couldn't find anything.
So I tried:
find /boot/grub/stage1
It said "file not found".
Here's the text from the console:
ubuntu@ubuntu:~$ grub
Probing devices to guess BIOS drives. This may take a long time.
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,0)
root (hd0,0)
Error 21: Selected disk does not exist
grub> find /boot/grub/stage1
find /boot/grub/stage1
Error 15: File not found
**Fortunately, I got one person suggesting that what I've been trying to do is for GRUB Legacy, not GRUB2. So I went to the suggested website, (http://grub.enbug.org/Grub2LiveCdInstallGuide) try to look around, and try:
ubuntu@ubuntu:~$ sudo fdisk -l
Unable to seek on /dev/sda
This is just the step 2 of the instruction in the http://grub.enbug.org/Grub2LiveCdInstallGuide and I cannot proceed because it cannot seek /dev/sda.
However,
ubuntu@ubuntu:~$ sudo dmraid -r
/dev/sdb: nvidia, "nvidia_acajefec", stripe, ok, 488397166 sectors, data@ 0
/dev/sda: nvidia, "nvidia_acajefec", stripe, ok, 488397166 sectors, data@ 0
So what now? Do you have an idea for how to make fdisk see my RAID array on live cd (Ubuntu 10.10)? Honestly, I am lost, very lost in trying to restore GRUB2 on this software RAID 0 system right now.
If you boot by recovery CD your root devices is not / but the ISO representation in RAM. In this case we have to mount the real root partition first.
Check if your software RAID is active:
You have to expect your
sda
,sdb
,dm-0
followed bydm-1
,dm-2
and so on representing your partition table entries.If you do not see the
dm-*
entries you have to activate the software RAID manually:Check
/proc/partitions
again and verify ifgrub
is aware of it:The output may differ but should look like (where *ata-WDC_WD5001AALS-00L3B2_WD-WCASY5902194* depends on your hardware configuration):
Your real root partition should be
/dev/mapper/nvidia_acajefec1
right now. We mount this partition for future tests now:Check if
grub
is able to map the devices to your partitions:You should see something like
/dev/mapper/nvidia_acajefec1
.Identify the name of your partition as GRUB device:
The output should be something like
(hd2,msdos1)
.So far so good. In order to install/update GRUB we are ready to switch to the real root partition and update the boot block:
Your are ready to reboot the system.
The device you need to mount is
/dev/nvidia_acajefec1
, and the device you need to install to is/dev/nvidia_acajefec
. So roughly following the directions on http://grub.enbug.org/Grub2LiveCdInstallGuide you would run: