View previous topic :: View next topic |
Author |
Message |
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 8:33 am Post subject: Gentoo kernel and GRUB.conf |
|
|
Sorry to ask you stupid questions but can you help me please?
I managed to mess up the boot loader ONCE AGAIN! Because i chose the gentoo kernel instead of the vanilla sources im slightly stuck with where i am.
Ive done the title and the root like this
title=Gentoo Linux
root (hd1,0) [2nd HD 1st partition]
the kernel is where i mess up...
kernel /kernel-2.4.22-gentoo root=/dev/hdb3
is that ok? obviously not. The symlink i have is linux-2.4.22-gentoo-r7 so what should i be putting as the kernel? _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
flyinspirit001 Apprentice
Joined: 25 May 2004 Posts: 266 Location: localhost,localdomain
|
Posted: Fri Jun 04, 2004 8:40 am Post subject: |
|
|
if you already created and correctly the bzimage for the r7 version, and you want to use it,just insert the r7 image name...
dunno if i truly understood your problem
see ya _________________ "Ride the infinity, be your best. For you, for all"
Dungeon01 - linux registered user #362502 |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 8:47 am Post subject: |
|
|
so you literally insert the image name eg:
Code: | kernel /linux-2.4.22-gentoo-r7 root=/dev/hdb3 |
to the last line _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
flyinspirit001 Apprentice
Joined: 25 May 2004 Posts: 266 Location: localhost,localdomain
|
Posted: Fri Jun 04, 2004 8:56 am Post subject: |
|
|
yes, here's my grub.conf so you can see what i mean:
Code: |
timeout 30
default 0
fallback 1
title Gentoo 2.6.5(hdd vulnerability)
root (hd0,0)
kernel /boot/bzImage root=/dev/hda3
#initrd /initrd.img
title Gentoo 2.6.6
root (hd0,0)
kernel /boot/bzImage-2.6.6 root=/dev/hda3
#color light-green/brown blink-red/blue
|
i think's the code everyday is the best way for explanations _________________ "Ride the infinity, be your best. For you, for all"
Dungeon01 - linux registered user #362502 |
|
Back to top |
|
|
taz Tux's lil' helper
Joined: 21 May 2003 Posts: 87
|
Posted: Fri Jun 04, 2004 9:00 am Post subject: |
|
|
Did you use genkernel or compile the kernel yourself? Your kernel option in grub.conf should point to location of the kernel image.
For example:
Code: |
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,0)
kernel /kernel-2.6.5-gentoo-r1 root=/dev/ram0 real_root=/dev/hda3 init=/linuxrc dopcmcia vga=791 splash=verbose
initrd /initrd-2.6.5-gentoo-r1
|
this is my grub.conf for a kernel image created with genkernel.
otherwise, the kernel name will be whatever you named it after copying bzImage to boot:
Code: | cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage |
In this case, the kernel option would be:
Code: | kernel /bzImage root=/dev/hda3 dopcmcia |
the root=/dev/ram0 and init=/linuxrc boot parameters probably won't be needed with a manually configged kernel.[/code] |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 9:17 am Post subject: |
|
|
i compiled the kernel myself but i'm having a problem getting into the gentoo installation i created to check what bzImage i created. how do i get from the cd to my gentoo installation to check it out? _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
flyinspirit001 Apprentice
Joined: 25 May 2004 Posts: 266 Location: localhost,localdomain
|
Posted: Fri Jun 04, 2004 9:22 am Post subject: |
|
|
mmhh i don't understan your quest: you cannot access the location where your bzimage is saved or you're tryin to see how many bzimages have you saved and wich versions they are?
(to see the version of the last you can do and in the top you'll see what version you installed.
bye _________________ "Ride the infinity, be your best. For you, for all"
Dungeon01 - linux registered user #362502 |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 9:25 am Post subject: |
|
|
ok, back to restarting with the gentoo cd... be back in 5 mins _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 9:31 am Post subject: |
|
|
ok, i get
Code: | make : command not found |
i tried chroot /mnt/gentoo but i get /bin/bash : no such file or directory _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
flyinspirit001 Apprentice
Joined: 25 May 2004 Posts: 266 Location: localhost,localdomain
|
Posted: Fri Jun 04, 2004 9:39 am Post subject: re |
|
|
erm theoricakky you have to do make menuconfig in /usr/src/linux, after the installation..i thought you were in console mode with an unspecified kernel...isn't it? _________________ "Ride the infinity, be your best. For you, for all"
Dungeon01 - linux registered user #362502 |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 9:53 am Post subject: |
|
|
nope, i've messed up the mbr so i've gone into my windows installation and "fixmbr" then i've posted here then i've restarted using the gentoo cd again.
I know what i have to do, i just dont know how to do it. I have to get into my gentoo installation from the live cd to get the bzImage then write it down and emerge grub again and go through that whole painful process of installing the bootloader again. _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
Posted: Fri Jun 04, 2004 10:21 am Post subject: |
|
|
You can use tab completion within grub to tell you what you can use as a command - so when it boots press e (I think, it should say underneath the menu), then select the kernel line and press e again. Then delete part of the kernel name and press tab. If it fills in a kernel name for you press enter, until you get back to the menu and then boot as normal. The change won't be permanent though, so you'll have to edit your grub.conf after you boot up. _________________ No-one's more important than the earthworm. |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 10:21 am Post subject: |
|
|
ok it wont mount /dev/hdb1 because its not mentioned in fstab or mtab (because as i've booted off the cd its all on a ram disk) and i cant emerge grub for the same reason _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 10:26 am Post subject: |
|
|
Maedhros wrote: | You can use tab completion within grub to tell you what you can use as a command - so when it boots press e (I think, it should say underneath the menu), then select the kernel line and press e again. Then delete part of the kernel name and press tab. If it fills in a kernel name for you press enter, until you get back to the menu and then boot as normal. The change won't be permanent though, so you'll have to edit your grub.conf after you boot up. |
being able to get to grub would be nice, lol _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 12:02 pm Post subject: |
|
|
how do i get into my existing gentoo system from before i rebooted? Now when i boot off the cd i get a different fstab that what i made before (probably made by the ramdisk) but when i change it and try to mount hdb1, even though i put it in there, it says no such file or directory as /dev/hdb1 _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Jun 04, 2004 9:26 pm Post subject: |
|
|
cokehabit wrote: | how do i get into my existing gentoo system from before i rebooted? Now when i boot off the cd i get a different fstab that what i made before (probably made by the ramdisk) but when i change it and try to mount hdb1, even though i put it in there, it says no such file or directory as /dev/hdb1 |
Do you mount it with a command like "mount /dev/hdb1 /mnt/gentoo"? Anyway if you just do the chroot routine again like described in the handbook, you'll end up in your existing gentoo system. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Fri Jun 04, 2004 10:38 pm Post subject: |
|
|
yeah, thats what i was trying to do, i'm mounted in the mount points but all i want to do is fix the mbr because i've sorted the grub.conf but because i'm in the ramdisk "grub" gets a "no such command"
chroot comes back with "bin bash no such command" whether i leave it in or out of course _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
taz Tux's lil' helper
Joined: 21 May 2003 Posts: 87
|
Posted: Sat Jun 05, 2004 4:34 am Post subject: |
|
|
Ok:
1. insert livecd to tray
2. mount your root drive to /mnt/gentoo (assumedly this would be "mount /dev/hdb3 /mnt/gentoo"
3. mount your boot drive to /mnt/gentoo with "mount /dev/hdb1 /mnt/gentoo/boot"
4. then do: "mount -t proc none /mnt/gentoo/proc"
5. "chroot /mnt/gentoo /bin/bash"
6. "cd /boot" then "ls" --> This is where the kernel image should be located. If you don't find it there, then you should check in the /boot/grub directory to see if you put it there. The name of the file should have either "kernel" , "bzImage", or "vmlinuz" in the filename. Write down the name of the file on a piece of paper.
7. "nano /boot/grub/grub.conf" and edit the kernel line to point to the right file.
8. In order to fix the mbr, run grub: "grub" and set it up like handbook says, i.e. "root (hd1,)" and "setup (hd0,0)" <-- setup like this if you want it to start grub up instead of the windoze bootloader.
9. exit the chroot, unmount the drives from /mnt/gentoo/boot and /mnt/gentoo (in that order).
10. reboot.
When the computer starts up again, grub should start up with no problem. As long as the kernel line is correct, you should be able to boot Gentoo just fine. |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Sat Jun 05, 2004 9:50 am Post subject: |
|
|
yep, i think you're right, i just noticed where i was going wrong... i wasn't telling it which enviroment to chroot to... lol lets try... _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Sat Jun 05, 2004 4:28 pm Post subject: |
|
|
yep, i/you were right, that worked perfectly but now i've had to reset the mbr anyway because when i reinstalled windoze i played around with the partitions and somehow my system partition ended up on C (as it should be) but thats the 2nd partition on the drive. D the 1st partition has windoze on it but is not the system partition So i get "ntldr is missing". Grrrrrr lol (i should have noticed it was logical ) _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Sat Jun 05, 2004 7:09 pm Post subject: |
|
|
cokehabit wrote: | yep, i/you were right, that worked perfectly but now i've had to reset the mbr anyway because when i reinstalled windoze i played around with the partitions and somehow my system partition ended up on C (as it should be) but thats the 2nd partition on the drive. D the 1st partition has windoze on it but is not the system partition So i get "ntldr is missing". |
Ithink the ntldr error is not because of your partition play but because of this:
Quote: | and "setup (hd0,0)" <-- setup like this if you want it to start grub up instead of the windoze bootloader. |
setup (hd0,0) tells grub to install of the bootsector of the first partition, not the MBR of the first harddisk. And that was where ntldr was. setup (hd0) would have install grub in the MBR and you wouldn't have this problem now. But using a windows install cd should be able to repair your windows bootloading stuff. You'll need to reinstall grub again though (this time in the mbr ) _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Sat Jun 05, 2004 10:09 pm Post subject: |
|
|
no it was because of the partitions. I changed the 2nd partition to logical, reinstalled windows, reinstated grub in the MBR and it worked fine nixnut
But i get "fatal error : No screens found" when i startx which i think is weird because i compiled my kernel with nvidia options.... _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
taz Tux's lil' helper
Joined: 21 May 2003 Posts: 87
|
Posted: Sun Jun 06, 2004 4:19 am Post subject: |
|
|
That sounds more like an xfconfig problem than a kernel problem. You need to go through the desktop configuration guide to get all of that set up correctly. |
|
Back to top |
|
|
cokey Advocate
Joined: 23 Apr 2004 Posts: 3355
|
Posted: Sun Jun 06, 2004 5:16 am Post subject: |
|
|
yeah its fixed now, sorry _________________ https://otw20.com/ OTW20 The new place for off the wall chat |
|
Back to top |
|
|
|