Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need help with Grub after cloning my dying Gentoo HDD(solved
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sat May 15, 2010 8:11 pm    Post subject: Need help with Grub after cloning my dying Gentoo HDD(solved Reply with quote

Yesterday I cloned my Gentoo drive which was about to die using "dd" and everything went fine. I have another post describing everything which I will post the link below. My issue now is that after being able to boot into my system with no problem, I was unable to boot into my windows 7. I dont want to repost everyhing, so if it's not too much to ask, please read my other post to get the background information.

after making minor changes to the windows 7 grub entry, i now get the message "boot manager missing". Here is my fdisk & grub.conf. thanks in advance

(chroot) sysresccd / # fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xeb385719

Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 13 42070 337817600 7 HPFS/NTFS
/dev/sda3 42070 74705 262144000 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.

Disk /dev/sdb: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x516b516b

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 31 248976 83 Linux
/dev/sdb2 32 135 835380 82 Linux swap / Solaris
/dev/sdb3 136 6823 53721360 83 Linux
/dev/sdb4 6824 30515 190305990 5 Extended
/dev/sdb5 6824 15334 68364576 83 Linux
/dev/sdb6 15335 26277 87899616 83 Linux

(chroot) sysresccd / # cat /boot/grub/grub.conf
default 0
timeout 30
splashimage=(hd1,0)/boot/grub/splash.xpm.gz



title=Windows 7
rootnoverify (hd0,0)
makeactive
chainloader +1



title Gentoo Linux 2.6.31
root (hd1,0)
kernel /boot/kernel-2.6.31-gentoo-r6 root=/dev/sdb3



title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader(hd0,0)+1

title Windows 7
rootnoverify (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2


Last edited by snakeo2 on Sun May 23, 2010 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sat May 15, 2010 8:12 pm    Post subject: Reply with quote

here is the link to my other post:

https://forums.gentoo.org/viewtopic-t-826398.html
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 2:08 am    Post subject: Reply with quote

anyone?

grub> root (hd0,0)
Filesystem type unknown, partition type 0x7

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83

should I re-install grub on my windows drive? not sure why im getting the boot manager not found? is there a way to check if grub was/is installed on my windows drive?
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 976
Location: The Village, Portmeirion

PostPosted: Sun May 16, 2010 2:36 am    Post subject: Reply with quote

Quote:
Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 13 42070 337817600 7 HPFS/NTFS
/dev/sda3 42070 74705 262144000 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.

What is on sda1? is it a recovery partition or something? sda2 is marked bootable so i'd try using that one in grub.conf. I don't think you will need to need to use map anymore as Windows is now on the first drive. I'm not sure how windows 7 handles it, but I remember XP having a fit about it.
grub.conf:
title Windows 7
rootnoverify (hd0,1)
makeactive
chainloader +1

maybe something like this will work. sorry, I not very familiar with windows to be much help.
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 3:03 am    Post subject: Reply with quote

I did notice that as well. I changed my grub entry and still complains about missing boot manager......

I will reinstall grub on my windows drive again. Windows 7 creates a small partition which it labels reserve or something similar.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 4:01 am    Post subject: Reply with quote

boot the win 7 cd and repair the mbr and boot with it
after win 7 booting is fixed you can setup grub on the mbr once again
the dying disk is removed? windows gets excited/hostile about two disks with same identification
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 12:12 pm    Post subject: Reply with quote

Donahue,

Yes the dying disk has been removed. I'm wondering if it is a grub syntax error, since after cloning the disk, i removed the defective disk, proceeded to set up my windows drive as /dev/sda & my new drive which I had just cloned as /dev/sdb, installed grub on /dev/sda, and was able to boot into gentoo with no problems. In fact the problem arose when i tried to boot into windows 7. One more question, when you install grub you normally run root (hd0,0), setup (hd0,0), since my windows 7 has three partitions, where would i install it? By default, windows 7 creates a small reserve partition. Additionally I created a separate data partition, which I know not to install it there. So my question is do I install grub in (hd0,0) which I presume to be the small reserve partition or (hd0,1), the partition where I installed windows 7?
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 2:08 pm    Post subject: Reply with quote

if it were not for gpt this would be easier
recommend:
remove the gentoo disk
recover the ability to boot win 7 with win7 bootloader
recover the ability to boot xp with the win 7 bootloader
remove the win 7 disk, install the gentoo disk
boot gentoo, if necessary boot cd and enter chroot
Code:
grub
root (hd0,0)
setup (hd0)
quit


Edit /boot/grub/grub.conf to:
Quote:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.31
root (hd0,0)
kernel /boot/kernel-2.6.31-gentoo-r6 root=/dev/sda3

title Windows XP
rootnoverify (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader(hd0,0)+1

title Windows 7
rootnoverify (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1


verify gentoo boots
reinstall win7 drive
enter bios and determine which drive bios wants to be first boot choice, if not the gentoo drive shutdown and swap the signal leads between the drives
recheck and continue to boot gentoo,
reboot and check win 7 ...
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 3:13 pm    Post subject: Reply with quote

Donahue,

I just tried fixing the windows 7 boot manager by booting off the windows 7 dvd and selecting repair option, but it did not work. it complains that the recovery disc im using is not compatible with the windows version i have installed which is odd. I could disconnect the gentoo drive and tried repairing windows 7 as you suggested to see if that works. I no longer have the windows xp drive connected, but will consider reconnecting if you think it would help. If you look at the output of fdisk -l, you can see that /dev/sda2 is the partition that is bootable. I suppose I could make edits to my grub.conf to point it to that partition instead and see if it would work? Actually I believe I tried that already with the same results.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 3:28 pm    Post subject: Reply with quote

Donahue,

I just ran fdisk again and noticed my /swap partition is marked bootable now.....not sure how this happened:

# fdisk -l

Disk /dev/sdb: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x516b516b

Device Boot Start End Blocks Id System
/dev/sdb1 1 31 248976 83 Linux
/dev/sdb2 * 32 135 835380 82 Linux swap / Solaris
/dev/sdb3 136 6823 53721360 83 Linux
/dev/sdb4 6824 30515 190305990 5 Extended
/dev/sdb5 6824 15334 68364576 83 Linux
/dev/sdb6 15335 26277 87899616 83 Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xeb385719

Device Boot Start End Blocks Id System
/dev/sda1 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 13 42070 337817600 7 HPFS/NTFS
/dev/sda3 42070 74705 262144000 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 3:32 pm    Post subject: Reply with quote

I think you want to get win7 disk all by itself to boot first.
did you use the fixmbr option (whatever the win7 name for it is) from the recovery/repair option?
Did not realise that xp was on third disk.
Is your win7 one that came preinstalled? I assume not.
Do you have gentoo booting by itself as /dev/sda3?
If so add to grub .conf:

Quote:
title Gentoo Linux 2.6.31 (on sdb3)
root (hd0,0)
kernel /boot/kernel-2.6.31-gentoo-r6 root=/dev/sda3

and reinstall the win 7 drive
check in bios that the win7 drive is first boot choice swap data cable if needed
this should allow you to continue working on getting win 7 to boot but with gentoo available by selecting the gentoo drive as first to boot in bios .
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 3:40 pm    Post subject: Reply with quote

Will try to fixmbr with only the windows 7 drive connected. Did you see my question about my /dev/sdb1 no longer active as a bootable partition. Can i make the boot partition bootable again? Or would I have to delete it and create it from scratch? Would I have to do the same to /swap? i hope there is a easy fix around this, if not I will consider trying to fix my windows 7 first and then ghosting the dying drive onto the new one all over again via dd and go from there.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 3:48 pm    Post subject: Reply with quote

http://neosmart.net/blog/2009/windows-7-system-repair-discs/ may be source of a working recovery cd.
in gentoo run
Code:
fdisk /dev/sda
then p to see partitions, m to see help, a to toggle bootable flag on partition 2 off, a again to toggle bootable flag on partition 1 on (active flag not required for linux but some bios need it), w to write the partition table and exit fdisk
no need to dd again, gentoo booting is proof of that pudding.
If an attempt to boot the win7 drive as the only attached drive produces a grub menu let me know. Starting to suspect that the old gentoo drive was (hd0) and /dev/sda and that win7 drive became (hd0) and /dev/sda.


Last edited by DONAHUE on Sun May 16, 2010 3:59 pm; edited 2 times in total
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 3:52 pm    Post subject: Reply with quote

I was about to the same thing reading the installation handbook. I'm a little confused though, i understand the part of turning the toggle switch on /dev/sdb2 (swap) which will remove the (*) currently next to it. You then say to turn the "a" on /dev/sdb3 which is my /root partition, dont you mean to turn it on on /dev/sdb1 which is my /boot partition? thanks.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 3:53 pm    Post subject: Reply with quote

here you go:

Command (m for help): p

Disk /dev/sdb: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x516b516b

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 31 248976 83 Linux
/dev/sdb2 32 135 835380 82 Linux swap / Solaris
/dev/sdb3 136 6823 53721360 83 Linux
/dev/sdb4 6824 30515 190305990 5 Extended
/dev/sdb5 6824 15334 68364576 83 Linux
/dev/sdb6 15335 26277 87899616 83 Linux

should i also run swapon? and i guess save the new partition table?
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 3:58 pm    Post subject: Reply with quote

yes to flag on boot partition, w to write and exit
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 3:59 pm    Post subject: Reply with quote

attempt to boot the win7 drive as the only attached drive if produces a grub menu let me know
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 4:06 pm    Post subject: Reply with quote

should i also run swapon? not needed, the swap entry in /etc/fstab handles this each time you boot
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 4:17 pm    Post subject: Reply with quote

im downloading the windows 7 repair disk via the link you provided. Once I'm done, i'll burn the iso and try to repair the boot manager and will report back.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 4:41 pm    Post subject: Reply with quote

attempt to boot the win7 drive as the only attached drive if produces a grub menu let me know first pls

and during repair try with only win7 drive attached

laboring the obvious, to detach drive, just shutdown computer and pull data cable is enough

walking dog back in 15
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 6:42 pm    Post subject: Reply with quote

I tried booting with just the windows 7 and got the same message about missing boot manager. Im going to boot off the windows7 repair disk i just burned and try to reinstall the boot manager to at least be able to boot into windows. if that goes well, i will attach the drive for gentoo and install grub in my windows drive and hopefully everything works out. will report back.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 6:56 pm    Post subject: Reply with quote

http://support.microsoft.com/kb/927392

I would still suggest hooking the gentoo drive to the motherboard's sata1 connection thus having it be the natural choice for (hd0) and sda, and then setting up grub on the gentoo drive MBR. In other words if I got win7 booting, I would leave it untouched by grub.
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 7:13 pm    Post subject: Reply with quote

I was able to fix my mbr using the windows 7 rescue disc. So, in your opinion I should swap the drives so that my gentoo drive becomes the /dev/sda & windows 7 becomes /dev/sdb and install grub on my sda? I've always read/heard that windows complaint if is that the first physical drive in a string of drives ....is that how you have your box set up?
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 16, 2010 7:20 pm    Post subject: Reply with quote

i am fairly sure you used to have the gentoo drive as hd0 sda and used map to make it work. I would do that again. And grub.conf:

Quote:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.31
root (hd0,0)
kernel /boot/kernel-2.6.31-gentoo-r6 root=/dev/sda3

title Windows XP (if the one included with win7)
rootnoverify (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader(hd0,0)+1

title Windows 7
rootnoverify (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

title Windows XP (if on third disc)
rootnoverify (hd0,0)
map (hd0) (hd2)
map (hd2) (hd0)
makeactive
chainloader +1


/etc/fstab edited to use sda1 /boot sda2 swap sda3 /


Last edited by DONAHUE on Sun May 16, 2010 7:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Sun May 16, 2010 7:22 pm    Post subject: Reply with quote

Actually, my prior setup was like so:

/dev/hda====>xp
/dev/sda====>windows 7 (used map to trick windows)
/dev/sdb=====>gentoo.

Since xp is no longer part of the equation, i moved windows 7 to /sda & gentoo remained /dev/sdb. I've been reading about another bootloader easyboot or booteasy which is supposed to be pretty straight forward, butI would like to give grub another go before testing that option.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum