Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
duel boot with grub help needed bad
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sopleme
n00b
n00b


Joined: 25 Feb 2005
Posts: 12

PostPosted: Wed Mar 02, 2005 11:21 pm    Post subject: duel boot with grub help needed bad Reply with quote

iv installed gentoo on a test computer a few times and i now feel confident enought to do it with my good computer, the computer im going to use currently has windows on it, im planning on keeping windows on it and its currently using the primary and secondary hdd's (hda and hdb) i have a 3rd harddrive that im planning on installing gentoo on which is hdg.
my question is how i would go about settin it up in the grub.conf since in the example on the handbook on this site it shows how todo it with a single harddrive. from what i gather hd0,0 refers to the hda1 and that that would be the windows partition so would the hdg1 be considered hd6,0 being the hdg1 where the gentoo boot partition would be? making the code look like this
Code:

default 0
timeout 30
splashimage=(hd6,0)/grub/splash.xpm.gz
title=Gentoo Linux <ver>
root (hd6,0)
kernel /kernel<ver> root=/dev/hdg3

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

thanks for anyhelp


Last edited by sopleme on Thu Mar 03, 2005 11:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Wed Mar 02, 2005 11:32 pm    Post subject: Reply with quote

Take a look at the Grub Manual.

They suggest using tab completion in the command line interface in order to determine which devices are available in the GRUB nomenclature.
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Thu Mar 03, 2005 3:12 am    Post subject: Reply with quote

Good idea - generally would expect hd(n-1) where n is the number of hard disks.

So if this is your third disk, it would probably be hd2
Back to top
View user's profile Send private message
sopleme
n00b
n00b


Joined: 25 Feb 2005
Posts: 12

PostPosted: Thu Mar 03, 2005 6:38 am    Post subject: Reply with quote

this is what my grub looks like right now and it fails i dont even get the splash screen

Code:
default 0
timeout 30
splashimage=(hd2,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.4.28-r7
root (hd2,0)
kernel /kernel-2.4.28-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real__root=/dev/hdg3

initrd /initrd-2.4.28-gentoo-r7

# Only in case you want to dual-boot
title=Windows XP
root (hd0,0)
makeactive
chainloader +1


as i said earlier hda is all windows partition... hdg is all gentoo.. with a hdg1 hdg2 hdg3 all set up like u would if u were installing gentoo on a system with one hdd and gentoo as its only os.

hda and hdb are on the same ide but hdg is on its own controller card. what do i have to do to get this all working properly thanks for any help
i was also looking at the code from here
https://forums.gentoo.org/viewtopic.php?t=18319
Code:
# BEGIN /boot/grub/menu.lst

default 0 # This sets the first menu entry to boot by default.
timeout 5 # There will be a 5 second delay before the default is booted
splashimage=(hd0,0)/boot/grub/splash.xpm.gz # The boot menu graphic

title=Gentoo # This is the name displayed for the first entry
root (hd0,0) # GRUB's way of pointing to /dev/hda1 (drive 0,partition 0)
kernel /boot/bzImage root=/dev/hda3 # kernel name and / location

title=Gentoo-test # Menu entry for testing new kernels
root (hd0,0)
kernel /boot/bzImage-test root=/dev/hda3

title=Windows 2000 Pro
map (hd0) (hd1) # Tell the first hard drive to pretend to be the second
map (hd1) (hd0) # Tell the second hard drive to pretend to be the first
root (hd1,0) # Tell GRUB Windows is on /dev/hdb1 (No pretending here)
rootnoverify (hd1,0) # GRUB won't attempt to mount the Windows drive
makeactive # Sets the partition to active
chainloader +1 # Tells GRUB to load the Windows bootloader when done

# END

but im not sure how i could use this to make my situation work since i would think that the above was done on the same ide cable

after thinking it over and looking at this serveral times i think it would just make my life easier if just changed the hdds around to match what is suggested above. to see if this makes any sence ill try to explain this. right now hda(200gig windows) hdb(160gig) hdg(40gig gentoo) i would change it to hda(40gig gentoo) hdb(200gig windows) hdg(160gig). then just use the above grub given in the second coding example i think this would fix my problem but i cant test this untill i get home and can change it around. any suggestions would be great.
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Thu Mar 03, 2005 1:03 pm    Post subject: Reply with quote

Where are you getting this hdg name from - the LiveCD ???.

Where did you install grub to ???. Needs to be in a MBR somewhere if you want it as a bootloader. Looking at your first post looks like you should have it in the hda MBR.

Are you getting anything at all - say a grub prompt ???.
If so, enter the following;
Code:
root (hd

then hit the *tab* key (no space after the "hd") - this is the tab completion mentioned. It will list all the hard-drives grub finds.

As a last resort, your drive rearrangement should also work.
Back to top
View user's profile Send private message
sopleme
n00b
n00b


Joined: 25 Feb 2005
Posts: 12

PostPosted: Thu Mar 03, 2005 1:50 pm    Post subject: Reply with quote

yea hdg is from the live cd but on grub it would be hd2 sooo hdg = hd2

i wanted the mrb to be on the 40gig(linux) hdd and have that take care of everything for the hd0(hda) for booting windows. so what i did was make the hdd with the windows os on it non bootable since this is what i thought it should be set to since i wanted hd2(hdg) be the bootable drive and having 2 bootable drives would create problems in my eyes
so as of now the only drive set to be bootable is hd2(hdg)

right now when i boot up i get this messed up looking grub screen and when i try too boot either linux or windows neither work, it gives me some errors which i cant post right now since im not at home but it basicly displays the conf code for grub.

when i get home i might try moving the hdds around to see if i can fix these problems that way

after some thinking and searching on the forums this is the code that i think will get it to work but im not 100% sure and i try this once i get home
Code:

default 0
timeout 30
splashimage=(hd2,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.4.28-r7
root (hd2,0)
kernel /kernel-2.4.28-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real__root=/dev/hdg3

initrd /initrd-2.4.28-gentoo-r7

# Only in case you want to dual-boot
title=Windows XP
map (hd2) (hd0)
map (hd0) (hd2)
root (hd0,0)
rootnoverify (hd0,0)
makeactive
chainloader +1


but if this doesnt work ill be switching around that hdd's



o and to answer ur question yes grub promt i get hd0 hd1 and hd2
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Thu Mar 03, 2005 2:08 pm    Post subject: Reply with quote

sopleme wrote:
so as of now the only drive set to be bootable is hd2(hdg)

This was done in the BIOS I presume.
Quote:
right now when i boot up i get this messed up looking grub screen and when i try too boot either linux or windows neither work, it gives me some errors which i cant post right now since im not at home but it basicly displays the conf code for grub.

o.k., now we have some info to work on. Sounds like you have a framebuffer problem. Comment out the splash line, and drop vga=??? if you're using it. Should at least be readable then.
From the menu, hit the "c" key before the timeout, and try the root command (with tab) I listed previously.

Windows needs to think it's on the primary drive - you'll need to add the two map commands from that other grub.conf you found.
Back to top
View user's profile Send private message
sopleme
n00b
n00b


Joined: 25 Feb 2005
Posts: 12

PostPosted: Thu Mar 03, 2005 7:07 pm    Post subject: Reply with quote

i had it all messed up i figured it out after doing several things and this is what i ended with
Code:

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

title=Gentoo Linux 2.4.28-r7
root (hd0,0)
kernel /kernel-2.4.28-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hdg3   (before i acidently had real__root=/dev/hdg3...there were 2 underscores)

initrd /initrd-2.4.28-gentoo-r7

# Only in case you want to dual-boot
title=Windows XP
map (hd0) (hd2)
map (hd2) (hd0)
root (hd2,0)
rootnoverify (hd2,0)
makeactive
chainloader +1


now gentoo is fine splash screen good now only problem is something that i had forgotten that a while ago somehow my ntldr got deleted from windows and upuntill now if i ever needed to boot to windows i would keep the install stall cd in the drive it would load it from there and then boot up windows. so now when i try to boot the windows partition it tells me ntldr missing or something along those lines and instructs me to reboot and suggestions


edit: found the answer to my own problem just incase anyone else needs to no how to get the ntldr files back onto a system that has had them removed for somereason here it is

How to Repair the Boot Sector:
If XP won't start it may be due to a damaged boot sector or a missing or corrupt ntldr or ntdetect.com files.

To replace damaged ntldr and ntdetect.com you can copy fresh files from the XP CD using the COPY command. Boot with the XP CD and enter the Recovery Console (as above). At the Command Prompt type the following (where "X" is your CD-Rom drive letter) allowing the files to overwrite the old files
COPY X:\i386\NTLDR C:
COPY X:\i386\NTDETECT.COM C:

To repair a damaged Boot Sector at the command prompt type FIXBOOT and press Enter. Then answer "Y"


thanks for all the help from everyone
Back to top
View user's profile Send private message
sopleme
n00b
n00b


Joined: 25 Feb 2005
Posts: 12

PostPosted: Thu Mar 03, 2005 10:31 pm    Post subject: Reply with quote

thought i had it working buttttt guess not
Code:
grub conf file

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

title=Gentoo Linux
root (hd0,2)
kernel /boot/kernel-2.6.10-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hdg3
initrd /boot/initrd-2.6.10-gentoo-r6

# Only in case you want to dual-boot
title=Windows XP
map (hd0) (hd2)
map (hd2) (hd0)
root (hd2,0)
rootnoverify (hd2,0)
makeactive
chainloader +1


well i redid the install because i was getting feed up with it not working thinking maybe doing it fresh would help well it didnt, i get the splash screen and all so i no its accessing that part of the drive. when i press enter to load gentoo i get this error
root(hd0,2)
filetype is reiserfs, partition type 0x83
kernel /boot/kernel-2.6.10-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hdg3
error: 15 file cant be found
but the file is there iv used the live cd to goto the folder and check to see if its there and it is so i dont no what its talking about.... now if i change the roo(hd0,0) it will start to boot but then when it getts to the loading of the file system i will get this
block device /dev/hdg3 is not a valid root device...
please specify a device or a "shell" for a shell....

im almost positive that the fs is there.
when making the fs i used this command
mkreiserfs /dev/hdg3
and then went on with the install as usuall. my fstab looks like this
Code:

/dev/hdg1   /boot     ext2    defaults,noatime     1 2
/dev/hdg3   /         ext3    notail,noatime              0 0
/dev/hdg2   none      swap    sw                   0 0
/dev/cdroms/cdrom0    /mnt/cdrom    auto      noauto,user    0 0

none        /proc     proc    defaults             0 0
none        /dev/shm  tmpfs   nodev,nosuid,noexec  0 0



this is becoming a problem since i cant get into my windows boot up either and i have things on there that i need to use
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Fri Mar 04, 2005 4:05 am    Post subject: Reply with quote

I'd leave it alone for a while if I was you.

You'll get little help if you don't provide information. So (Yes/No answers please);
1) is hd0 now the Gentoo disk
2) is it formatted as per fstab above
3) is hd1 the XP data disk
4) is hd2 the XP boot disk

What was the command you used to install grub (code please)

There are several inconsistencies in the last post - and the one before.
Back to top
View user's profile Send private message
benzoate
n00b
n00b


Joined: 24 Jan 2005
Posts: 5

PostPosted: Fri Mar 04, 2005 6:22 am    Post subject: This was on LWN a while back Reply with quote

Try this link:

http://lwn.net/Articles/86835/

It worked great for me.

-Benzoate
Back to top
View user's profile Send private message
sopleme
n00b
n00b


Joined: 25 Feb 2005
Posts: 12

PostPosted: Sat Mar 05, 2005 7:46 pm    Post subject: Reply with quote

i gave up trying to duel boot so dont worry about it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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