Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub Error Collection [Part 8] [POST GRUB QUESTIONS HERE!]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 15, 16, 17 ... 27, 28, 29  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Feb 22, 2008 9:24 pm    Post subject: Reply with quote

rich4,

You need:-
title=Gentoo
root (hd .... where gentoos kernel andinitrd are, in grubspeak
kernel ...full path name of kernel and kernel options like root=
initrd full path anme of initramfs, if you use one
_________________
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
rich4
n00b
n00b


Joined: 22 Feb 2008
Posts: 10

PostPosted: Sat Feb 23, 2008 12:18 am    Post subject: Reply with quote

Now I've got a grub error 15. Any ideas?
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sat Feb 23, 2008 10:35 am    Post subject: Reply with quote

That error indicates that grub is unable to locate a file as specified in its configuration. Verify that all of the relevant partitions are where you expected, then check the file names specified in the configuration file against those present in the relevant partition. As to which partitions to specify, check the /etc/fstab files from each system for their layouts which you can then translate into the nomenclature used by grub.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 23, 2008 11:03 am    Post subject: Reply with quote

rich4,

Error 15 shows that grub started but cannot find one or more of the files you asked it to load.

If you see the image behind the grub menu, its not the splashimage file
Check your kernel and initrd files are on the partition indicated by the root (hd...
and that the file names match *exactly*. Linux is case sensitive.
_________________
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
Moonfire
Apprentice
Apprentice


Joined: 01 Jan 2006
Posts: 158
Location: Leipzig

PostPosted: Sat Feb 23, 2008 11:57 am    Post subject: Reply with quote

Hi,

i want to emerge grub-0.97-r3 at my new system.
I use gcc-2.4.3 and have bootstrapped and after them done a emerge -e system.

now if i want to build my grub, i get following error:

Code:
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97 ...
 * econf: updating grub-0.97/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating grub-0.97/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/lib --datadir=/usr/lib/grub --exec-prefix=/ --disable-auto-linux-mem-opt --build=x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/config.log
 *
 * ERROR: sys-boot/grub-0.97-r3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2973:  Called econf 'src_compile' 'src_compile' '--libdir=/lib' '--datadir=/usr/lib/grub'
 *               ebuild.sh, line  513:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *  The die message:
 *   econf failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-boot/grub-0.97-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-0.97-r3/temp/environment'.
 *

if i sho in the error log, it tell me that i could sho in the config.log:
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GRUB configure 0.97, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/lib --datadir=/usr/lib/grub --exec-prefix=/ --disable-auto-linux-mem-opt --build=x86_64-pc-linux-gnu

## --------- ##
## Platform. ##
## --------- ##

hostname = moonX
uname -m = x86_64
uname -r = 2.6.24
uname -s = Linux
uname -v = #11 SMP Fri Feb 22 06:02:32 CET 2008

/usr/bin/uname -p = AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/lib64/portage/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /opt/bin
PATH: /usr/x86_64-pc-linux-gnu/gcc-bin/4.2.3


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1901: checking for a BSD-compatible install
configure:1957: result: /usr/bin/install -c
configure:1968: checking whether build environment is sane
configure:2011: result: yes
configure:2039: checking for a thread-safe mkdir -p
configure:2078: result: /bin/mkdir -p
configure:2091: checking for gawk
configure:2107: found /bin/gawk
configure:2118: result: gawk
configure:2129: checking whether make sets $(MAKE)
configure:2150: result: yes
configure:2345: checking build system type
configure:2363: result: x86_64-pc-linux-gnu
configure:2385: checking host system type
configure:2400: result: x86_64-pc-linux-gnu
configure:2438: checking whether to enable maintainer-specific portions of Makefiles
configure:2447: result: no
configure:2524: checking for x86_64-pc-linux-gnu-gcc
configure:2551: result: x86_64-pc-linux-gnu-gcc
configure:2625: checking for x86_64-pc-linux-gnu-gcc
configure:2652: result: x86_64-pc-linux-gnu-gcc
configure:2930: checking for C compiler version
configure:2937: x86_64-pc-linux-gnu-gcc --version >&5
x86_64-pc-linux-gnu-gcc (GCC) 4.2.3 (Gentoo 4.2.3 p1.0)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2940: $? = 0
configure:2947: x86_64-pc-linux-gnu-gcc -v >&5
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.2.3 (Gentoo 4.2.3 p1.0)
configure:2950: $? = 0
configure:2957: x86_64-pc-linux-gnu-gcc -V >&5
x86_64-pc-linux-gnu-gcc: '-V' must come at the start of the command line
configure:2960: $? = 1
configure:2983: checking for C compiler default output file name
configure:3010: x86_64-pc-linux-gnu-gcc -m32    conftest.c  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
configure:3013: $? = 1
configure:3051: result:
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "GRUB"
| #define PACKAGE_TARNAME "grub"
| #define PACKAGE_VERSION "0.97"
| #define PACKAGE_STRING "GRUB 0.97"
| #define PACKAGE_BUGREPORT "bug-grub@gnu.org"
| #define PACKAGE "grub"
| #define VERSION "0.97"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3058: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=x86_64-pc-linux-gnu-gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=x86_64-pc-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=x86_64-pc-linux-gnu-gcc
ac_cv_prog_make_make_set=yes
grub_cv_prog_objcopy_absolute=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/missing --run aclocal-1.10'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/missing --run tar'
AUTOCONF='${SHELL} /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/missing --run autoconf'
AUTOHEADER='${SHELL} /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/missing --run autoheader'
AUTOMAKE='${SHELL} /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/missing --run automake-1.10'
AWK='gawk'
BUILD_EXAMPLE_KERNEL_FALSE=''
BUILD_EXAMPLE_KERNEL_TRUE=''
CC='x86_64-pc-linux-gnu-gcc'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CFLAGS='-m32 '
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DISKLESS_SUPPORT_FALSE=''
DISKLESS_SUPPORT_TRUE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FSYS_CFLAGS=''
GRAPHICS_SUPPORT_FALSE=''
GRAPHICS_SUPPORT_TRUE=''
GREP=''
GRUB_CFLAGS=''
GRUB_LIBS=''
HERCULES_SUPPORT_FALSE=''
HERCULES_SUPPORT_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/missing --run makeinfo'
NETBOOT_DRIVERS=''
NETBOOT_SUPPORT_FALSE=''
NETBOOT_SUPPORT_TRUE=''
NET_CFLAGS=''
NET_EXTRAFLAGS=''
OBJCOPY=''
OBJEXT=''
PACKAGE='grub'
PACKAGE_BUGREPORT='bug-grub@gnu.org'
PACKAGE_NAME='GRUB'
PACKAGE_STRING='GRUB 0.97'
PACKAGE_TARNAME='grub'
PACKAGE_VERSION='0.97'
PATH_SEPARATOR=':'
PERL=''
RANLIB=''
SERIAL_SPEED_SIMULATION_FALSE=''
SERIAL_SPEED_SIMULATION_TRUE=''
SERIAL_SUPPORT_FALSE=''
SERIAL_SUPPORT_TRUE=''
SET_MAKE=''
SHELL='/bin/sh'
STAGE1_CFLAGS=''
STAGE2_CFLAGS=''
STRIP=''
VERSION='0.97'
ac_ct_CC=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-pc-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='/usr/lib/grub'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='/'
host='x86_64-pc-linux-gnu'
host_alias='x86_64-pc-linux-gnu'
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='/usr/share/info'
install_sh='$(SHELL) /var/tmp/portage/sys-boot/grub-0.97-r3/work/grub-0.97/install-sh'
libdir='/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='/var/lib'
mandir='/usr/share/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "GRUB"
#define PACKAGE_TARNAME "grub"
#define PACKAGE_VERSION "0.97"
#define PACKAGE_STRING "GRUB 0.97"
#define PACKAGE_BUGREPORT "bug-grub@gnu.org"
#define PACKAGE "grub"
#define VERSION "0.97"

configure: exit 77


Do you have any ideas what i can do?

Best Regards,
Maik
_________________
Linux 3.1.6 x86_64 | AMD Phenom(tm) II X6 1100T Processor AuthenticAMD 3315.405 MHz |
Bogomips: 39782.81 | Mem: 7992MB | Swap: 5.94GB | Screen: nvidia GeForce 9500GT @ 1920x1080 (24 bpp)
Back to top
View user's profile Send private message
rich4
n00b
n00b


Joined: 22 Feb 2008
Posts: 10

PostPosted: Sat Feb 23, 2008 6:43 pm    Post subject: Reply with quote

desultory wrote:
That error indicates that grub is unable to locate a file as specified in its configuration. Verify that all of the relevant partitions are where you expected, then check the file names specified in the configuration file against those present in the relevant partition. As to which partitions to specify, check the /etc/fstab files from each system for their layouts which you can then translate into the nomenclature used by grub.


I checked fstab of ubuntu and gentoo:

ubuntu
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda6
UUID=b6af6a59-6320-4fd8-a775-6a44d9537202 /               ext3    defaults,errors=remount-ro 0       1
# /dev/sda1
UUID=CE6828ED6828D5CD /media/sda1     ntfs    defaults,umask=007,gid=46 0       1
# /dev/sda2
UUID=fe651531-0235-48a6-a27f-be9cf336b038 /media/sda2     ext3    defaults        0       2
# /dev/sda3
UUID=6c7a73e1-fc47-49b2-bc85-3ea3ffb6632b none            swap    sw              0       0
# /dev/sda5
UUID=af1f3635-3f74-4aa5-9dd1-4c154a3c23cc none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0


gentoo
Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/p$

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda2               /               ext3            noatime         0 1
/dev/sda3               none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      audo            noauto,ro       0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec    $
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 23, 2008 7:16 pm    Post subject: Reply with quote

rich4,

You can put the kernel file and initramfs file anywhere as long as grub can read them
Its customary to put kernels and initrdramfs files into one shared /boot when you have multiple distros installed.
It can then be mounted in any distro.

Its also normal to share swap space, since you can only run one distro at a time.

Show us ls -l /boot, and tell us which device it is.
Paste the content of your grub.conf too.
_________________
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
rich4
n00b
n00b


Joined: 22 Feb 2008
Posts: 10

PostPosted: Sat Feb 23, 2008 8:09 pm    Post subject: Reply with quote

NeddySeagoon wrote:
rich4,

You can put the kernel file and initramfs file anywhere as long as grub can read them
Its customary to put kernels and initrdramfs files into one shared /boot when you have multiple distros installed.
It can then be mounted in any distro.

Its also normal to share swap space, since you can only run one distro at a time.

Show us ls -l /boot, and tell us which device it is.
Paste the content of your grub.conf too.

I considered a boot partition while setting up to install gentoo; I decided ext3/swap was simple enough for learning one thing at a time. But what is this about a /boot folder? Do you have a kb entry about it?
I don't share the swap space reason being so I can hibernate out of one distro and still be able to log into the other.

ls -l /boot:
Ubuntu
Code:
rich@POOR-USER:~$ ls -l /boot
total 21336
-rw-r--r-- 1 root root  424317 2008-02-12 04:39 abi-2.6.22-14-generic
drwxr-xr-x 3 root root    4096 2008-02-22 22:48 boot
-rw-r--r-- 1 root root 2073400 2008-01-31 16:54 bz_image_gentoo
-rw-r--r-- 1 root root   75311 2008-02-12 04:39 config-2.6.22-14-generic
-rw-r--r-- 1 root root 2062904 2008-01-31 17:35 gentoo_2
drwxr-xr-x 2 root root    4096 2008-02-22 18:12 grub
-rw-r--r-- 1 root root 7218612 2008-02-14 19:57 initrd.img-2.6.22-14-generic
-rw-r--r-- 1 root root 7218770 2008-01-26 20:58 initrd.img-2.6.22-14-generic.bak
-rw-r--r-- 1 root root  103204 2007-09-28 05:06 memtest86+.bin
-rw-r--r-- 1 root root  823535 2008-02-12 04:39 System.map-2.6.22-14-generic
-rw-r--r-- 1 root root 1764536 2008-02-12 04:39 vmlinuz-2.6.22-14-generic
rich@POOR-USER:~$

Gentoo
Code:
POOR-USER / # ls -l /boot
total 4
lrwxrwxrwx 1 root root    1 2008-01-30 12:38 boot -> .
drwxr-xr-x 2 root root 4096 2008-02-22 17:51 grub


/boot/grub/grub.conf:
Ubuntu
Code:
Empty

Gentoo
Code:
# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 30
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux-2.6.23-r6
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r6 root=/dev/sda2

title=Gentoo Linux-2.6.23-r6 (rescue)
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r6 root=/dev/hda2 init=/bin/bb

# The next four lines are only if you dualboot with a Windows system.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Feb 24, 2008 10:06 am    Post subject: Reply with quote

rich4,

Your current setup can never work. Let me explain a little of the boot process. First my understanding of your install.
You have Ubuntu and Gentoo both installed in their own space.
Ubuntu uses /dev/sda6 for its root
Gentoo uses /dev/sda2 for its root.
Grub is installed to the MBR of /dev/sda
There is no separate /boot partition.

At power on the BIOS does the Power On Self Test (POST) then loads sector 0 (the MBR) of /dev/sda. Thats grubs stage 1.
Stage 1 loads stage 1.5, which uses some of the lost sectors frm sector 1 to 62. stage 1.5 can read exactly one filesystem type. It reads stage2 from /boot/grub. stage2 looks for menu.lst which on Gentoo is a symbolic link to grub.conf. It may be a real file on Ubuntu.

When you only have a single distro, all this just works. With two or more distros, which /boot/grub is read?
They all have one. The answer to that is its whichever one installed grub to the MBR, which for you was probably Ubuntu.
So only the booting instructions on /dev/sda6/boot being used.

The way around this is to make /boot its own partition that is mounted with both Gentoo and Ubuntu. This gives you a single location for all your boot files and more importantly, a single grub.conf (menu.lst) to be read at boot time. As you don't have this, add the instructions to boot Gentoo into Ubuntus grub.conf (menu.lst). You can leave the kernel and initramfs where they are. The root (hd... statement will tell grub where to look.

Now looking at the detail.
Code:
POOR-USER / # ls -l /boot
shows no files, except for the grub directory, so your kernel and initramfs are missing from there. Thats maybe no bad thing if they are in /dev/sda6/boot (Ubumtus boot)

Code:
title=Gentoo Linux-2.6.23-r6
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r6 root=/dev/sda2
The root (hd0,0) here is incorrect as (hd0,0) is the first partition on the first hard drive discovered by the BIOS. Its probably /dev/sda1, which from the comments in your Ubuntu fstab is an ntfs partition, so you won't have any kernels there. There are no kernels in /dev/sda2/boot either.

Your Ubuntu /boot has no Gentoo kernels, so your gentoo kernel appears to be missing. Point the root (hd0,0) statement to the partition where the Gentoo kernel is located.

The statement /boot/kernel-2.6.23-gentoo-r6 must match the pathname to the kernel on the given partition exactly so it looks like you intended to put the gentoo kernel into one of your /boot folders.

Given that Ubuntu was your first install add the following to its menu.lst to boot gentoo.
Code:
title=gentoo
kernel (hd0,1)/usr/src/linux/arch/i386/boot/bzImage root=/dev/sda2

This attempts to boot Gentoo from the kernel build location. It fails if your BIOS cannot read the area of the drive where the kernel is located. It fails if you are not on a 32 bit system - change the i386 to suit your box.

Quick test - press 'e' at the grub splash screen and enter the above on two new lines. Follow the on screen instructions to boot.
_________________
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
rich4
n00b
n00b


Joined: 22 Feb 2008
Posts: 10

PostPosted: Sun Feb 24, 2008 9:57 pm    Post subject: Reply with quote

Not sure if I followed your instructions exactly, but I get "Error 15" attempting to boot from the entry I added to the table.

incase this helps:
Code:
 fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa27ea27e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        6528    52436128+   7  HPFS/NTFS
/dev/sda2            6529        8950    19454715   83  Linux
/dev/sda3            8951        9022      578340   82  Linux swap / Solaris
/dev/sda4            9023       12161    25214017+   5  Extended
/dev/sda5           12037       12161     1004031   82  Linux swap / Solaris
/dev/sda6            9023       12036    24209892   83  Linux

Partition table entries are not in disk order
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Feb 24, 2008 10:23 pm    Post subject: Reply with quote

rich4,

Error 15 means file not found. Grub loaded but could not find the file it was looking for.
Your fdisk reflects your /etc/fstab files provided Gentoo is on /dev/sda2 and Ubuntu is on /dev/sda6

My
Code:
title=gentoo
kernel (hd0,1)/usr/src/linux/arch/i386/boot/bzImage root=/dev/sda2
works only if you compiled your own kernel. If you used the networkless install and the kernel from the CD, you don't have a kernel at /usr/src/linux/arch/i386/boot/bzImage.

However, your posted
Code:
/boot/kernel-2.6.23-gentoo-r6
which is not the liveCD kernel, it uses kernel-2.6.19-gentoo-r5.
I suspect one of us made a typo in the path name.

Get into your Gentoo chroot and check that
Code:
/usr/src/linux/arch/i386/boot/bzImage
exists.
Tab completion is your friend.
_________________
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
rich4
n00b
n00b


Joined: 22 Feb 2008
Posts: 10

PostPosted: Sun Feb 24, 2008 10:41 pm    Post subject: Reply with quote

Code:
# cd /usr/src/linux/arch/i386/boot/bzImage
bash: cd: /usr/src/linux/arch/i386/boot/bzImage: No such file or directory

I did compile my kernel manually, and through poking around I was able to get into the kernel recompilation screen. I believe that screen showed the settings which I selected whilst compiling my kernel. Maybe this helps
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Feb 24, 2008 10:47 pm    Post subject: Reply with quote

rich4,

Your cd would fail as bzImage is a file, not a directory.
Code:
cd /usr/src/linux/arch/i386/boot
ls -l
would show it.

After you did
Code:
cd /usr/src/linux
make menuconfig
to set the kernel options, did you do
Code:
make
make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.23-gentoo-r6

Well, I know you did not do the last step, or it failed for some reason as there is no file /boot/kernel-2.6.23-gentoo-r6 on your system.
_________________
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
cylgalad2
n00b
n00b


Joined: 04 Dec 2007
Posts: 8

PostPosted: Thu Feb 28, 2008 11:22 am    Post subject: Reply with quote

emerge grub (update 0.97-r4, on amd64 but it's the same on x86 too) =>
Code:

mv -f .deps/libgrub_a-terminfo.Tpo .deps/libgrub_a-terminfo.Po
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../stage1  -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -Os -fno-stack-protector -fno-builtin -nostdinc  -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DSUPPORT_GRAPHICS=1 -DHAVE_CONFIG_H -I. -I.. -I../stage1 -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -m32 -g -MT start_eltorito_exec-start_eltorito.o -MD -MP -MF .deps/start_eltorito_exec-start_eltorito.Tpo -c -o start_eltorito_exec-start_eltorito.o `test -f 'start_eltorito.S' || echo './'`start_eltorito.S
start.S: Assembler messages:
start.S:399: Error: missing ')'
start.S:399: Error: junk at end of line, first unrecognized character is `K'
make[3]: *** [start_exec-start.o] Error 1
make[3]: *** Waiting for unfinished jobs....
tparm.c: In function ‘grub_tparm’:
tparm.c:719: warning: dereferencing type-punned pointer will break strict-aliasing rules
mv -f .deps/libgrub_a-tparm.Tpo .deps/libgrub_a-tparm.Po
start_eltorito.S: Assembler messages:
start_eltorito.S:320: Error: missing ')'
start_eltorito.S:320: Error: junk at end of line, first unrecognized character is `K'
make[3]: *** [start_eltorito_exec-start_eltorito.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-boot/grub-0.97-r4/work/grub-0.97/stage2'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-boot/grub-0.97-r4/work/grub-0.97/stage2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-boot/grub-0.97-r4/work/grub-0.97'
make: *** [all] Error 2


It does that on my 3 computers (2 amd64, 1 remaining x86), I must say that it does that on *every* grub updates ever, a link to a binary .tbz2 would be much appreciated (there's no real reason to compile it, and binaries for x86 work on amd64)

emerge --info (amd64) :
Code:

Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r8 x86_64 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz
Timestamp of tree: Thu, 28 Feb 2008 09:46:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -fomit-frame-pointer -mmmx -msse -msse2 -msse3 -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -fomit-frame-pointer -mmmx -msse -msse2 -msse3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg ccache distlocks metadata-transfer parallel-fetch sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ "
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LINGUAS="fr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync2.fr.gentoo.org/gentoo-portage"
USE="7zip X Xaw3d a52 aac acl acpi alsa amd64 amr ao apache2 audiofile bash-completion berkdb binary-drivers bitmap-fonts bittorrent bzip2 c++ cardbus ccache cdaudio cdb cdda cddb cdparanoia cdr cdrom chroot clamav clamd cli colordiff compress cpio cpudetection cracklib crypt cscope css ctype cups curl curlwrappers cursors cvs dbus dc1394 device-mapper dga dhcp dict divx dmi dmx dnd dv dvb dvd dvdnav dvdr dvdread dvi exif exim expat extensions fasttrack fbcon fbsplash ffmpeg fftw firefox flac flash fontconfig foomaticdb ftp fuse gammu gconf gd gdbm gif gimp gimpprint glib glut gmail gmp gnokii gnutls gphoto2 gpm gsm gtk gzip hal hddtemp html http hwmixer icons iconv icu id3 ident ieee1394 imagemagick ipv6 ipw3945 irda java javascript jpeg jpeg2k kde kdeenablefinal kdepim kdm keyring lame libsamplerate libwww lm_sensors logitech-mouse logrotate lzo lzw mad mailwrapper math matroska mbox mcal md5sum mdnsresponder-compat midi mikmod mime mjpeg mmap mmx mmxext mod modplug mouse mozdom mozilla mp2 mp3 mp4 mpd mpeg mpeg2 mplayer mplayer-bin mpm-prefork mudflap multiuser mysql nas nat ncurses net netjack network nfs nls nntp nptl nptlonly nsplugin ntfs nvidia nvram offensive ogg openal opengl openmp openntpd openssh openssl oss pam pam_chroot pam_timestamp parport pcre pda pdf perl php plugins png pnm pop3d portage posix ppds profile python qt3 qt3support qt4 quicktime rar rc5 rdesktop readline realmedia reflection remix resolvconf rle rpm samba scanner screen sdl sdl-image sdl-sound session shorten skins smp sms sndfile sound spamassassin speech spl sqlite3 srt sse sse2 ssl ssse3 subtitles subversion svg swat syslog t1lib taglib tcpd tga tidy tiff truetype truetype-fonts type1 type1-fonts unicode unzip upnp usb uuencode v4l2 vim vim-pager vim-syntax vim-with-x visualization vnc vncviewer vorbis wma wmp wxwindows x11vnc xanim xattr xcomposite xft xhtml xine xinerama xinetd xml xmlreader xmlwriter xorg xosd xpm xprint xrandr xrender xscreensaver xsettings xsl xslt xterm xvmc xvnc zeroconf zip zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="nvidia vga vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


I had this problem for years now, I'll like to understand why this happens, thanks in advance for any advice or solutions
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Feb 28, 2008 7:13 pm    Post subject: Reply with quote

cylgalad2,

I think amd64 needs grub-static as grub is known not to build on pure 64 bit systems.
_________________
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
anjames
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jul 2004
Posts: 115
Location: San Diego, CA

PostPosted: Thu Feb 28, 2008 10:22 pm    Post subject: GRUB Error 17 after migrating to new harddrive... Reply with quote

My old harddrive was filling up so I bought a new one and migrated everything over. I have the new drive attached using a USB/EIDE adaptor for migrating everything over. It is /dev/sda and (hd1).

I essentially copied the partition tables, excepting larger sizes on the new ones:

Code:
Helios2 ~ # fdisk -l /dev/sda    <--NEW DISK

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       24316   195318238+   7  HPFS/NTFS
/dev/sda2           24317       24329      104422+  83  Linux
/dev/sda3           24330       24452      987997+  82  Linux swap / Solaris
/dev/sda4           24453       30401    47785342+  83  Linux

Helios2 ~ # fdisk -l /dev/hda   <-- OLD DISK

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4864    39070048+   7  HPFS/NTFS
/dev/hda2            4865        4877      104422+  83  Linux
/dev/hda3            4878        5121     1959930   82  Linux swap / Solaris
/dev/hda4            5122        7296    17470687+  83  Linux


I created all the filesystems like so:
a1: NTFS (Windows XP)
a2: ext2
a3: swap
a4: ext3 (new) reiserfs (old)

Then I copied over all the data using cp -av for each respective partition (doing the windows one in XP). I used the Windows recovery console to write a windows boot sector to a1 by issuing
Code:
 fixboot d:


then I booted back into linux (on the old drive) and installed grub:
Code:
grub> root (hd1,1)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd1) (hd1)1+16 p (hd1,1)/boot/grub/stage2 /boot/grub/menu.ls
t"... succeeded
Done.

OK, so now everything should be set up the same as it was before but when I shut down, pull the old drive, insert the new one and boot back up I get something like:

Code:
Loading stage1_5...
GRUB Error 17

I thought I copied everything as similarly as possible, but I guess I missed something.

Here are the grub config files:
Code:
Helios2 ~ # mount /dev/sda2 /mnt/usb
Helios2 ~ # cat /mnt/usb/boot/grub/
default            ffs_stage1_5       jfs_stage1_5       splash.xpm.gz      ufs2_stage1_5
device.map         grub.conf          menu.lst           stage1             vstafs_stage1_5
e2fs_stage1_5      grub.conf.sample   minix_stage1_5     stage2             xfs_stage1_5
fat_stage1_5       iso9660_stage1_5   reiserfs_stage1_5  stage2_eltorito
Helios2 ~ # cat /mnt/usb/boot/grub/device.map
(fd0)   /dev/fd0
(hd0)   /dev/hda
(hd1)   /dev/sda
Helios2 ~ # cat /mnt/usb/boot/grub/grub.conf
root (hd0,1)
default 0
timeout 10

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

title=WindowsXP2
rootnoverify (hd1,0)
makeactive
chainloader +1

title=Gentoo
root (hd0,3)
kernel (hd0,1)/vmlinuz root=/dev/hda4

title=Old Gentoo
root (hd0,3)
kernel (hd0,1)/vmlinuz.old root=/dev/hda4

title=Known Working Gentoo
root (hd0,3)
kernel (hd0,1)/vmlinuz-2.6.16-gentoo-r9  root=/dev/hda4


Any ideas?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Feb 29, 2008 1:41 pm    Post subject: Reply with quote

anjames wrote:

OK, so now everything should be set up the same as it was before but when I shut down, pull the old drive, ...


That means (hd0) goes away and (hd1) becomes (hd0).
Grub embeds the (hd1,1) in the MBR at install time, so its looking for the right partition on the wrong drive.

Boot the liveCD, get into the chroot and reinstall grub to the MBR.
_________________
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
anjames
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jul 2004
Posts: 115
Location: San Diego, CA

PostPosted: Fri Feb 29, 2008 5:23 pm    Post subject: Reply with quote

Interesting... I would have expected a grub error 21 (disk not found) instead of error 17 in that case. So by chrooting to the new drive, grub looks at it as hd0 instead of hd1 then? I'll give it a try and we'll see how it works.

Thanks!
Alex
Back to top
View user's profile Send private message
anjames
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jul 2004
Posts: 115
Location: San Diego, CA

PostPosted: Fri Feb 29, 2008 5:51 pm    Post subject: Reply with quote

OK, so I tried it but I'm a little confused...
I did the chroot sequence as described in the Gentoo Handbook http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6

I did a 'touch NEWDISK' on the root and boot partition of the new disk so that I didn't get confused about which drive was which. Once inside the chroot I opened up grub and tried looking for the NEWDISK file on hd0 but it only appears on hd1!

Code:
grub> find (hd0,1)/
 Possible files are: lost+found .keep vmlinuz-2.6.16-gentoo-r9 vmlinuz System.map-2.6.16-gentoo-r
9 System.map config-2.6.16-gentoo-r9 config kernel grub vmlinuz-2.6.16-gentoo-r9.old vmlinuz.old
System.map-2.6.16-gentoo-r9.old System.map.old config-2.6.16-gentoo-r9.old config.old vmlinuz-2.6
.20-gentoo-r8 System.map-2.6.20-gentoo-r8 config-2.6.20-gentoo-r8 vmlinuz-2.6.20-gentoo-r8.old Sy
stem.map-2.6.20-gentoo-r8.old config-2.6.20-gentoo-r8.old

grub> find (hd1,1)/
 Possible files are: lost+found System.map System.map-2.6.16-gentoo-r9 System.map-2.6.16-gentoo-r
9.old System.map-2.6.20-gentoo-r8 System.map-2.6.20-gentoo-r8.old System.map.old config config-2.
6.16-gentoo-r9 config-2.6.16-gentoo-r9.old config-2.6.20-gentoo-r8 config-2.6.20-gentoo-r8.old co
nfig.old grub kernel vmlinuz vmlinuz-2.6.16-gentoo-r9 vmlinuz-2.6.16-gentoo-r9.old vmlinuz-2.6.20
-gentoo-r8 vmlinuz-2.6.20-gentoo-r8.old vmlinuz.old boot NEWDISK


I think I've found another way around it though... how about this?

Code:
grub> root (hd0,1)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd1)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd1)"...  16 sectors are embedded.
succeeded
 Running "install /grub/stage1 d (hd1) (hd1)1+16 p (hd0,1)/grub/stage2 /grub/menu.lst"... succeed
ed
Done.


It ran without error, so hopefully when I reboot on the new drive it'll just work! Here goes.
Back to top
View user's profile Send private message
anjames
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jul 2004
Posts: 115
Location: San Diego, CA

PostPosted: Fri Feb 29, 2008 7:54 pm    Post subject: Reply with quote

Well that didn't work too well. When I swapped in the new drive, I got a new error:

GRUB Hard disk error.

Hmm...
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Mon Mar 03, 2008 5:50 am    Post subject: Reply with quote

NeddySeagoon,

I want to thank you for this how-to. I used it on this machine, and it seemed to pep the performance of the both the SATA and PATA interfaces. The only departure that I have to make is I have to say "y" to ACHI SATA. Apparently, just choosing the Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support option wasn't enough. I had to add that one extra driver.

But I cut out the ATA/ATAPI/MFM/RLL support section entirely. It seems to be a good thing. The hard drive was SATA anyway, so it was already sda. No big deal, just reconfigure Gxine and a few other multimedia programs to use /dev/sr0. K3b and k9copy did it automatically...nice.

Which brings me to my Toshiba Laptop. It is all hdx (hda hard drive, hdc DVD ROM). If I don't enable the ATA/ATAPI/MFM/RLL support section, all the drives get renamed...and the kernel panics. In this case, I guess I have to set everything up in fstab, reboot, and run lilo modified for the drive name change afterward. Whatta ya think?

Well, wish me luck, I'm about to find out. It should be interesting!

Blessed be!
Pappy

EDIT: That didn't go so well. Can I change my drive names from hdx to sdx on the Toshiba laptop? Is GRUB a must to make this happen?
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
Wani
n00b
n00b


Joined: 26 Feb 2008
Posts: 31

PostPosted: Wed Mar 05, 2008 2:02 pm    Post subject: Reply with quote

Hi@all

I have got a really major problem.

The good news is: I know what I did wrong.
The bad new: I don't know how to fix it :lol: .

I typed a wrong kernel version in the grub.conf.
So I can't boot the normal kernel.
I am able to boot the rescue entry. When I type
Code:
nano -w /boot/grub/grub.conf

it looks like there is no file like that because the editor opens a clear one.

Can I edit the file with knoppix??
What can i do?
Back to top
View user's profile Send private message
Wani
n00b
n00b


Joined: 26 Feb 2008
Posts: 31

PostPosted: Wed Mar 05, 2008 3:19 pm    Post subject: Reply with quote

ok after more than one hour trying i made it by editing the command line through grub.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Mar 05, 2008 8:43 pm    Post subject: Reply with quote

pappy_mcfae,

Neither grub nor lilo know anything about kernel or udev allocated /dev entries during the time the bootloader is in charge of the system.
When you change /etc/lilo.conf and rerun /sbin/lilo, lilo generates an block list of the file(s) it needs to load and writes this to the MBR.
At boot time it blindly reads this block list into memory. This accounts for the unexpected or unpleasent results if you update your kernel and forget about /sbin/lilo ... it still reads whatever is at the old disk location.
If you are unlucky, its a part of a kernel and you have to find your liveCD. If you are 'lucky' its an old but intact kernel. I say 'lucky' because your system starts but the kernel changes you just made are missing, and tracking it down can take a while.

Grub is a little different. During booting, it knows nothing of any /dev/ entries, as they are not created until the kernel is loaded, mounted the root filesystem and started udev. (lilo is the same in this respect).
The grub stage 1 (the 448 bytes max in the MBR) loads the grub stage 1.5 from the sectors following the MBR. stage1.5 can read the filesystem on /boot, which it reads to load the grub stage 2 file. This reads grub.cnf to find out what to do.

When you drop the IDE kernel support from ATA/ATAPI/MFM/RLL support section, boot loader operation is unchanged. For the avoidance of doubt, the boot loader is finished when it jumps to the kernel start location. Grun and lilo do what they always did.

Things change when the kernel gets control. Your root=/dev/hd... needs to change to root=/dev/sd...
You will have real_root=/dev... if you use an initrd, its the real_root you need to change.
In grub, thats all you do. With lilo, rerun /sbin/lilo or the configuration change will not take effect.
As you have already suggested, you need to change /etc/fstab too, or your root will be read only and other filesystems will not be mounted.
You have have /dev/sd.. in place of the /dev/hd...

A twist is that if you used to leave a USB storage device connected, it may still be /dev/sda and your local hard drive will be /dev/sdb, which you were probably not expecting.
_________________
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
davidpedrosa1987
n00b
n00b


Joined: 05 Mar 2008
Posts: 2

PostPosted: Wed Mar 05, 2008 9:00 pm    Post subject: Reply with quote

Hi all

Im new to the linux world. I tried to install my first linux system with gentoo...
I made the installation by reading the Gentoo Linux x86 Handbook http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
I made everthing that its stated in the handbook and i didnt even changed a thing...

When the system starts booting, i get this error:

Quote:
*Checking root filesystem ...
fsck.ext3: No such file or directory while trying to open /dev/ROOT /dev/ROOT:
The superblock could not be read or does not describe a correct ex2 filesystem. If the device is valid and it really contains and ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with and alternate superblock:
e2fsck -b 8193 <device>

* Filesystem couldn't be fixes :( [ !! ]
Give root password for maintenance
(or type Control-D to continue):


This is my partition layout. Its the same as the handbook, the only difference is that my disk is bigger:
Quote:
Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 14 105808+ 83 Linux
/dev/hda2 15 81 506520 82 Linux swap
/dev/hda3 82 3876 28690200 83 Linux


The fstab is the same as handbook too:
Quote:
/dev/hda1 /boot ext2 defaults,noatime 1 2
/dev/hda2 none swap sw 0 0
/dev/hda3 / ext3 noatime 0 1

/dev/cdrom /mnt/cdrom auto noauto,user 0 0


This is my grub.conf file:
Quote:
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.23-gentoo-r9 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /boot/initramfs-genkernel-x86-2.6.23-gentoo-r9


Can someone please help me out?

Cumps
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2, 3 ... 15, 16, 17 ... 27, 28, 29  Next
Page 16 of 29

 
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