View previous topic :: View next topic |
Author |
Message |
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Thu Sep 02, 2010 2:56 pm Post subject: grub Question |
|
|
How do i setup a grub with my kernel useing 1 OS? |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Thu Sep 02, 2010 3:08 pm Post subject: |
|
|
Did you read Configureing Grub in the Handbook?
Or which part is not clear? |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Thu Sep 02, 2010 3:18 pm Post subject: |
|
|
I was useing the genkernel and not sure what to put in my grub file so the kernel will boot with just one Os? |
|
Back to top |
|
|
disi Veteran
Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Thu Sep 02, 2010 3:29 pm Post subject: |
|
|
that's from: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
Code Listing 2.4: grub.conf for genkernel users wrote: |
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.34-r1
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.34-gentoo-r1 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86-2.6.34-gentoo-r1 |
You still need to update the kernel and initramfs versions in the file. Also the name of the real_root partition
Default 0 tells grub to boot the first system listed as title
timeout 30 tells grub to wait 30 seconds before booting it _________________ Gentoo on Uptime Project - Larry is a cow |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Thu Sep 02, 2010 4:15 pm Post subject: |
|
|
I get this
error 8: Kernel must be loaded before booting |
|
Back to top |
|
|
disi Veteran
Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Thu Sep 02, 2010 5:03 pm Post subject: |
|
|
pythonsyntax wrote: | I get this
error 8: Kernel must be loaded before booting |
could you show us your current /boot/grub/grub.conf?
And:
_________________ Gentoo on Uptime Project - Larry is a cow |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Sat Sep 04, 2010 4:15 pm Post subject: |
|
|
What i did was use the grub.conf what genkernel have for me and put the kernel what i was useing could that be the mistake i was makeing? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21706
|
Posted: Sat Sep 04, 2010 4:34 pm Post subject: |
|
|
pythonsyntax wrote: | What i did was use the grub.conf what genkernel have for me and put the kernel what i was useing could that be the mistake i was makeing? | Not all of us have a genkernel generated grub.conf, so this description is insufficient for us to understand what you are using. Please post the actual contents of your grub.conf as disi requested. |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Sun Sep 12, 2010 6:21 pm Post subject: |
|
|
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.34-r6
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.34-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86-2.6.34-gentoo-r6
i get this error
error 8: Kernel must be loaded before booting |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Sep 12, 2010 6:38 pm Post subject: |
|
|
boot cd, run:
Code: | mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge wgetpaste
fdisk -l | wgetpaste
ls - l | wgetpaste
lspci -k | wgetpaste
mount | wgetpaste
wgetpaste -s ca /usr/src/linux/.config
wgetpaste /etc/fstab
/boot/grub/grub.conf |
post the url's returned here |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Sep 12, 2010 6:46 pm Post subject: |
|
|
pythonsyntax,
While you are on the liveCd, look in your chroot /boot and ensure you have a symlink that reads as It will be in cyan.
If its missing, Code: | cd /boot
ln -s . boot |
You need the link for grub to find your kernel and initrd. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Sep 12, 2010 8:01 pm Post subject: |
|
|
i screwed this one up:
Please Code: | ls - l /boot | wgetpaste | and post url |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Sep 12, 2010 8:16 pm Post subject: |
|
|
BOOT ROOT SWAP need to be replaced with your values in /etc/fstab.
Not:
Quote: | /dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/ROOT / ext3 noatime 0 1
/dev/SWAP none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0 |
But:
Quote: | /dev/sda1 /boot ext2 noauto,noatime 1 2 # don't forget to "mount /boot" before working with grub and kernels
/dev/sda3 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0 #Recommend letting automount work by commenting or removing cdrom line
#/dev/fd0 /mnt/floppy auto noauto 0 0 |
Still of interest from the chroot:
Code: | ls -l /boot | wgetpaste
wgetpaste -s ca /usr/src/linux/.config |
Last edited by DONAHUE on Sun Sep 12, 2010 8:31 pm; edited 1 time in total |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Sun Sep 12, 2010 8:24 pm Post subject: |
|
|
How do i do this?
/dev/sda1 /boot ext2 noauto,noatime 1 2 # don't forget to "mount /boot" before working with grub and kernels
/dev/sda3 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0 #Recommend letting automount work by commenting or removing cdrom line
#/dev/fd0 /mnt/floppy auto noauto 0 0 |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Sep 12, 2010 8:29 pm Post subject: |
|
|
quickest if not still in chroot:
boot cd
Code: | mount /dev/sda3 /mnt/gentoo
nano /mnt/gentoo/etc/fstab |
make the changes, exit nano with <ctrl x>
|
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Sun Sep 12, 2010 10:36 pm Post subject: |
|
|
what do i make change to? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Sep 12, 2010 11:11 pm Post subject: |
|
|
in the /etc/fstab file in your gentoo install.
you need to replace BOOT with sda1
you need to replace ROOT with sda3
you need to replace SWAP with sda2
if you don't want to use nano:
boot the cdboot cd, then run:
Code: | mount /dev/sda3 /mnt/gentoo
echo "/dev/sda1 /boot ext2 noauto,noatime 1 2" > /mnt/gentoo/etc/fstab
echo "/dev/sda3 / ext3 noatime 0 1 " >> /mnt/gentoo/etc/fstab
echo "/dev/sda2 none swap sw 0 0" >> /mnt/gentoo/etc/fstab
reboot |
|
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Mon Sep 13, 2010 12:17 am Post subject: |
|
|
I try that with out nano with livecd didn't work. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Mon Sep 13, 2010 12:38 am Post subject: |
|
|
boot cd, run:
Code: |
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls - l /boot | wgetpaste
wgetpaste -s ca /usr/src/linux/.config
wgetpaste /etc/fstab
ln -s /boot /boot
ln -s /boot/grub/grub.conf /boot/grub/menu.lst
reboot |
post the url's returned here |
|
Back to top |
|
|
pythonsyntax n00b
Joined: 30 Aug 2010 Posts: 14
|
Posted: Wed Sep 15, 2010 4:44 pm Post subject: |
|
|
Mayb i just start over and maybe fix it that way.any differnt step i need to take? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Sep 15, 2010 5:15 pm Post subject: |
|
|
Fix /etc/fstab in the gentoo install replacing BOOT ROOT SWAP with the device names for your gentoo partitions: /dev/sda1 /dev/sda3 /dev/sda2 . This is necessary even though the etc/fstab errors are not likely to be the cause of the grub error 8. To evaluate the grub error please provide info as requested below:
boot cd, run:
Code: |
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
ls - l /boot | wgetpaste
wgetpaste -s ca /usr/src/linux/.config
wgetpaste /etc/fstab
ln -s /boot /boot
ln -s /boot/grub/grub.conf /boot/grub/menu.lst
reboot |
post the url's returned here |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Sep 16, 2010 3:10 am Post subject: |
|
|
@jiuding
Are you also getting grub's Quote: | error 8: Kernel must be loaded before booting | or some other grub error?
If so:
Boot the cd, run: Code: | mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cd /mnt/gentoo/boot
ls -l boot | If the output does not contain the symbolic link run to make it. Then run: If the output does not contain the symbolic link Quote: | menu.lst ->grub.conf | run Code: | ln -s grub.conf menu.lst | to make it. Then continue by running: Code: | mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge wgetpaste
fdisk -l | wgetpaste
ls - l | wgetpaste
lspci -k | wgetpaste
mount | wgetpaste
wgetpaste -s ca /usr/src/linux/.config
wgetpaste /etc/fstab
/boot/grub/grub.conf | post the url's that are returned.
If not error 8, what problem are you getting? |
|
Back to top |
|
|
|