View previous topic :: View next topic |
Author |
Message |
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Mon Aug 22, 2005 5:33 am Post subject: quick grub question |
|
|
Ok I am running my hard drive on the second ide channel making it hdc and not hda, so my question is how do I change that in the grub? or is the grub "templete" going to just work for that? anyways thanks! |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Mon Aug 22, 2005 6:04 am Post subject: |
|
|
at grub install you have to tell grub the partition where to look for its installation directory. So no, it will not work out of the box if you strictly hack in the commands from the handbook, but if you exchange the partitions from the example with the partitions you want it to be on your machine it will work without problems. IIRC the /dev/hdc drive is (hd2) in grub syntax, so the first primary partition would be (hd2,0) and the first logical partition (hd2,4). Set the root device correct, change the /boot/grub/grub.conf according to you're partition table and install grub to the place wherever you want it to be. If you don't wanna install it to the master boot record of the first harddisc, you will have to take care of it getting loaded by another boot manager (the Windows Bootmanager in a dual boot config for example, which is the most stable way to setup such a system) |
|
Back to top |
|
|
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Mon Aug 22, 2005 6:15 am Post subject: |
|
|
hey thanks I was just worried about the hd0,0 part seeing that I was on a different ide anyways thanks |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Mon Aug 22, 2005 7:35 am Post subject: |
|
|
Hum, /dev/hdc is (hd2) only if /dev/hda and /dev/hdb are hard drives.
eg:
/dev/hda --> HD
/dev/hdb --> CDROM
/dev/hdc --> HD
Then /dev/hdc would be (hd1) and /dev/hda (hd0) |
|
Back to top |
|
|
syg00 l33t
Joined: 23 Aug 2004 Posts: 907 Location: Brisbane, AUS
|
Posted: Mon Aug 22, 2005 7:56 am Post subject: |
|
|
Or even (like this laptop)
/dev/hda --> CDROM
/dev/hdb --> empty
/dev/hdc --> HD
Then /dev/hdc is (hd0) - hard to generalise. |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Mon Aug 22, 2005 8:35 am Post subject: |
|
|
clearly long time since I read the manual to grub |
|
Back to top |
|
|
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Mon Aug 22, 2005 4:07 pm Post subject: How should I set my grub up? |
|
|
Ok my motherboard is setup like this
IDE 1-
Unpopulated
IDE 2-
DVD Drive-salve
Hard drive-master
My partition is like this
Hard Drive
Hdc1- /boot
Hdc2- swap
Hdc3- /
Anyways I have made a grub config file before I understand everything about it I am just messing up somewhere lol. My current grub config looks like this
default 0
timeout 15
title=Gentoo Linux 2.6.11-gentoo-r3
root (0,2)
kernal /kernal-2.6.11-gentoo-r3 root=/dev/hdc2
The kernel listed in my /boot is in fact kernal-2.6.11-gentoo-r3
My device map shows
(hd0) /dev/hdc
This is different than what it was it had the floppy drive controller line in there until I took it out because I do not have a floppy drive.
So far I can get the grub file to the splash screen than I select the kernal I want to load and it flashes and goes right back to the splash screen. Anyways at least I am getting further than I was
. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Mon Aug 22, 2005 6:56 pm Post subject: |
|
|
Quote: | default 0
timeout 15
title=Gentoo Linux 2.6.11-gentoo-r3
root (0,2)
kernal /kernal-2.6.11-gentoo-r3 root=/dev/hdc2 |
Shouldn't it be
Quote: | default 0
timeout 15
title=Gentoo Linux 2.6.11-gentoo-r3
root (0,0)
kernal /kernal-2.6.11-gentoo-r3 root=/dev/hdc3 |
right? Quote: | Hard Drive
Hdc1- /boot
Hdc2- swap
Hdc3- / |
|
|
Back to top |
|
|
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Tue Aug 23, 2005 4:17 am Post subject: |
|
|
sorry about that that was a typing mistake I actually did have it
kernal /kernal-2.6.11-gentoo-r3 root=/dev/hdc3
Anyways what is your reasoning for changing the root (0,0)?
I tried it and it did not work It still just boots and shows root (0,0) for a split second and I mean a split second and than goes back to the splash screen it is in like some kind of loop. Anyways hope to figure this out. This is turning out to be a good learning experience |
|
Back to top |
|
|
syg00 l33t
Joined: 23 Aug 2004 Posts: 907 Location: Brisbane, AUS
|
Posted: Tue Aug 23, 2005 4:32 am Post subject: |
|
|
root(hd0,0) is correct - this is where grub live (not your Linux root partition)
As for your other problem, try spelling kernel corrrectly. |
|
Back to top |
|
|
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Tue Aug 23, 2005 4:34 am Post subject: |
|
|
well I only spelled kernel like this becasue that is what it is named like in my boot partition so do I need to rename my kernel? |
|
Back to top |
|
|
syg00 l33t
Joined: 23 Aug 2004 Posts: 907 Location: Brisbane, AUS
|
Posted: Tue Aug 23, 2005 4:37 am Post subject: |
|
|
kernel /kernal-2.6.11-gentoo-r3 root=/dev/hdc3 |
|
Back to top |
|
|
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Tue Aug 23, 2005 4:51 am Post subject: |
|
|
omg your a life saver I am so happy now thank you thank you thank you. |
|
Back to top |
|
|
shadowtux n00b
Joined: 22 Aug 2005 Posts: 9
|
Posted: Tue Aug 23, 2005 5:06 am Post subject: |
|
|
ok new problem it is now after it starts to mount everythng during boot up these lines fail
* Starting devfsd
/sbin/rc: line 313: /sbin/devfsd: no such file or directory
*could not start /sbin/dev/fsd [!!]
*Checking root filesystem ...
failed to open the device '/dev/hdc2' :no such file or directory
*filesystem couldn't be fixed [!!]
give root passward for maintenance
(or type Control-D to continue) |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Tue Aug 23, 2005 5:45 am Post subject: |
|
|
You have support for devfs in your kernel and tell the kernel to mount it automatically at boot. If you do that you will have to install devfsd on your gentoo system. But I would prefer UDEV. Just remove the option "Automatically mount /dev at boot" in your kernel config under PseudoFileSystems/devfs and install udev and if you want coldplug. |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Tue Aug 23, 2005 6:35 am Post subject: |
|
|
Waou! I didn't even see this error (kernal )
btw
Quote: | *Checking root filesystem ...
failed to open the device '/dev/hdc2' :no such file or directory |
Hum, /dev/hdc2 is your swap partition, you need to edit your fstab, cause your root partition ( / ) is /dev/hdc3 |
|
Back to top |
|
|
|