Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub Question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Thu Sep 02, 2010 2:56 pm    Post subject: grub Question Reply with quote

How do i setup a grub with my kernel useing 1 OS?
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Thu Sep 02, 2010 3:08 pm    Post subject: Reply with quote

Did you read Configureing Grub in the Handbook?

Or which part is not clear?
Back to top
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Thu Sep 02, 2010 3:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Thu Sep 02, 2010 3:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Thu Sep 02, 2010 4:15 pm    Post subject: Reply with quote

I get this

error 8: Kernel must be loaded before booting
Back to top
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Thu Sep 02, 2010 5:03 pm    Post subject: Reply with quote

pythonsyntax wrote:
I get this

error 8: Kernel must be loaded before booting


could you show us your current /boot/grub/grub.conf?

And:
Code:
# ls -l /boot

_________________
Gentoo on Uptime Project - Larry is a cow
Back to top
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Sat Sep 04, 2010 4:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Sat Sep 04, 2010 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Sun Sep 12, 2010 6:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sun Sep 12, 2010 6:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Sep 12, 2010 6:46 pm    Post subject: Reply with quote

pythonsyntax,

While you are on the liveCd, look in your chroot /boot and ensure you have a symlink that reads as
Code:
boot -> .
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
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Sun Sep 12, 2010 7:49 pm    Post subject: Reply with quote

http://paste.pocoo.org/show/261119/

http://paste.pocoo.org/show/261122/

http://paste.pocoo.org/show/261125/

http://paste.pocoo.org/show/261127/

http://paste.pocoo.org/show/261128/

http://paste.pocoo.org/show/261132/
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 Sep 12, 2010 8:01 pm    Post subject: Reply with quote

i screwed this one up:
Code:
ls - l | wgetpaste

Please
Code:
ls - l /boot | wgetpaste
and post url
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 Sep 12, 2010 8:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Sun Sep 12, 2010 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sun Sep 12, 2010 8:29 pm    Post subject: Reply with quote

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>
Code:
reboot
Back to top
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Sun Sep 12, 2010 10:36 pm    Post subject: Reply with quote

what do i make change to?
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 Sep 12, 2010 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Mon Sep 13, 2010 12:17 am    Post subject: Reply with quote

I try that with out nano with livecd didn't work.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Mon Sep 13, 2010 12:38 am    Post subject: Reply with quote

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
View user's profile Send private message
pythonsyntax
n00b
n00b


Joined: 30 Aug 2010
Posts: 14

PostPosted: Wed Sep 15, 2010 4:44 pm    Post subject: Reply with quote

Mayb i just start over and maybe fix it that way.any differnt step i need to take?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Wed Sep 15, 2010 5:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Thu Sep 16, 2010 3:10 am    Post subject: Reply with quote

@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
Quote:
boot -> .
run
Code:
ln -s . boot
to make it. Then run:
Code:
cd grub
ls -l
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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