Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub Error Collection [Part 6]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12, 13  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
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Sun Aug 13, 2006 10:02 pm    Post subject: Reply with quote

FcukThisGame,

actually your boot device won't necessarily be /dev/sda. Your BIOS should allow you to select what disk you want to boot. However, the kernel should call /dev/sda to the first SATA disk. So GRUB might call hd0 to the disk the kernel calls /dev/sdb.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
taewon
n00b
n00b


Joined: 07 Mar 2004
Posts: 2

PostPosted: Sun Aug 13, 2006 10:33 pm    Post subject: Reply with quote

ArsDangor wrote:
To get to grub.conf you can either use the live CD, and then chroot or boot using the grub console. If you do the latter you don't need to mount anything. Just check the "root" line is correct and select a working kernel.


could you help me and give me some more details doing the chroot? thanks in advance!
_________________
--
http://www.taewon.de
h@taewon.de
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Aug 13, 2006 10:52 pm    Post subject: Reply with quote

taewon,

Welcome to gentoo.

To get back into the chroot when your new kernel will not boot, start the liveCD with the nox option if you have the GUI version. Now follow the install guide steps for mounting your partitions, proc and /dev and swapon.
Do not use fdisk. Do not make any filesystems - those steps will destroy your install.

Now follow the guide to chroot and set the environment inside the chroot.

You are now back inside the chroot with your install running on top of the liveCD kernel.
_________________
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
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Mon Aug 14, 2006 1:49 am    Post subject: Reply with quote

On my subthread,

I chrooted in with the livecd and by the grace of god, I got it to boot. Now... I've recompiled my own kernel... and I'm getting a kernel panic referring to my root= param.

My /boot:
Code:
brewer ~ # ls -l /boot
total 8328
lrwxrwxrwx  1 root root      27 Aug 13 20:46 System.map -> System.map-2.6.17-gentoo-r4
-rw-r--r--  1 root root 1123607 Aug 13 20:46 System.map-2.6.17-gentoo-r4
-rw-r--r--  1 root root 1110573 Aug 12 20:21 System.map-genkernel-x86_64-2.6.17-gentoo-r4
lrwxrwxrwx  1 root root       1 Aug 12 19:35 boot -> .
lrwxrwxrwx  1 root root      23 Aug 13 20:46 config -> config-2.6.17-gentoo-r4
-rw-r--r--  1 root root   41201 Aug 13 20:46 config-2.6.17-gentoo-r4
drwxr-xr-x  2 root root    1024 Aug 13 15:40 grub
-rw-r--r--  1 root root 1617023 Aug 12 20:27 initramfs-genkernel-x86_64-2.6.17-gentoo-r4
-rw-r--r--  1 root root 2279642 Aug 12 20:21 kernel-genkernel-x86_64-2.6.17-gentoo-r4
drwx------  2 root root   12288 Aug 12 19:07 lost+found
lrwxrwxrwx  1 root root      24 Aug 13 20:46 vmlinuz -> vmlinuz-2.6.17-gentoo-r4
-rw-r--r--  1 root root 2296586 Aug 13 20:46 vmlinuz-2.6.17-gentoo-r4

My grub.conf:
Code:
default 0
timeout 10
splashimage=(hd0,0)/grub/splash.xpm.gz

title Gentoo Linux 2.6.17-r4
root (hd0,0)
kernel /vmlinuz-2.6.17-gentoo-r4 root=/dev/sda3 vga=0x31B video=vesafb,ywrap,mtrr:3

title Gentoo Linux 2.6.17-r4 (Genkernel)
root (hd0,0)
kernel /kernel-genkernel-x86_64-2.6.17-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 vga=0x31A video=vesafb,ywrap,mtrr:3
initrd /initramfs-genkernel-x86_64-2.6.17-gentoo-r4


I always thought that real_root= for genkernel and root= for a manually compiled kernel point to the same drive.
Of course mine currently are and it doesn't work.

Any suggestions?
_________________
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Mon Aug 14, 2006 2:10 am    Post subject: Reply with quote

FcukThisGame,

please post your exact error. If you get the "unknown block device /dev/sda3 (hdX,Y)" error, you probably are missing the driver for your storage controller in the kernel <*> and not as a module <M>.
You should look at the output of lspci to determine your storage controller.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Aug 14, 2006 9:26 am    Post subject: Reply with quote

FcukThisGame,

If your problem is with the ICH7 based board in your sig, check your kernel against this post
_________________
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
heri0n
n00b
n00b


Joined: 07 Feb 2006
Posts: 27

PostPosted: Tue Aug 15, 2006 12:51 am    Post subject: Reply with quote

I just left the country for a couple months and when i got back grub seems to be messed
Anyways I'm trying to reinstall grub with knoppix
So I mounted gentoo and proc
mount /;dev/hda4 /mnt/gentoo
mount -t proc none /mnt/gentoo//proc
chroot /mnt/gentoo
then i just tried installing grub
Code:

grub> root (hd0,3)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no

Error 15: File not found


And if I try re-emergin grub
Code:

emerge grub
Calculating dependencies

!!! Problem in sys-boot/grub dependencies.
!!! [Errno 30] Read-only file system: '/var/cache/edb/dep/aux_db_key_temp.portage_lockfile' exceptions


Can you guys help me out please
I've been out of the loop for awhile so please forigve..
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Tue Aug 15, 2006 1:12 am    Post subject: Reply with quote

heri0n,

are you sure that you don't have a /boot partition? You didn't mount it. Look at the output of fdisk -l.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
heri0n
n00b
n00b


Joined: 07 Feb 2006
Posts: 27

PostPosted: Tue Aug 15, 2006 5:09 am    Post subject: Reply with quote

yes
i just added the /boot dir to my main partition on /dev/hda4
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 15, 2006 9:55 am    Post subject: Reply with quote

heri0n,

You missed mount -o bind /dev/ /mnt/gentoo/dev
Knoppix will already have your partitions mounted read only, you need to umount them so you can mount them somewhere else read write. Explicity giving the -o rw may help 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
Crooksey
Apprentice
Apprentice


Joined: 26 Apr 2006
Posts: 239
Location: Vatican City

PostPosted: Sun Aug 20, 2006 9:29 pm    Post subject: Reply with quote

I looked through this thread and havent found my answer, so here goes...

I know that somewhere in your grub.cof you can add the line "vga=775". to change the resolution of the shell to 1280x1024, what part of my grub.conf do i need to add this to, thanks.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sun Aug 20, 2006 9:34 pm    Post subject: Reply with quote

Crooksey wrote:
I looked through this thread and havent found my answer, so here goes...

I know that somewhere in your grub.cof you can add the line "vga=775". to change the resolution of the shell to 1280x1024, what part of my grub.conf do i need to add this to, thanks.

The kernel line.

Here's an example
Code:
kernel /boot/kernel-2.6.16-gentoo-r13 root=/dev/sda2 vga=0x31a splash=silent,theme:livecd-2005.1 CONSOLE=/dev/tty1 quiet

Don't worry about the 0x, you can use hexidecimal or decimal.
Back to top
View user's profile Send private message
Crooksey
Apprentice
Apprentice


Joined: 26 Apr 2006
Posts: 239
Location: Vatican City

PostPosted: Mon Aug 21, 2006 9:31 am    Post subject: Reply with quote

Thanks :)
Back to top
View user's profile Send private message
d_logan
n00b
n00b


Joined: 09 May 2006
Posts: 73

PostPosted: Tue Aug 22, 2006 10:45 pm    Post subject: Gentoo / Windows XP Dual Boot / Grub: Error 13 Reply with quote

Grub gives me "Error 13: Invalid or unsupported executable format"
when I try to boot Windows XP.

Windows XP was installed after Gentoo, and Gentoo still boots fine.

fdisk -l gives

Code:

/dev/hda1   *           1      232514   117187024+  83  Linux
/dev/hdb1   *           1       14588   117178078+   7  HPFS/NTFS
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         136      987997+  82  Linux swap / Solaris
/dev/sda3             137        4500    35053830   83  Linux
/dev/sdb1   *           1       19457   156288321   83  Linux


Gentoo is installed / = /dev/sda3
/boot = /dev/sda1

I installed Windows to /dev/hdb1.
I can boot Windows for some reason if I put in the Windows install CD, and just don't boot from it when it says "Press any key to boot from CD". It boots right into the Windows XP.

My grub.conf:
Code:


timeout 30
default 0
fallback 1

title  kernel-2.6.17-gentoo-r4
root (hd0,0)
kernel /boot/kernel-2.6.17-gentoo-r4 root=/dev/sda3

title Windows XP
rootnoverify (hd3,0)
makeactive
chainloader +1


I've tried using (hd0,0), (hd1,0), (hd2,0), and (hd3,0) for rootnoverify.

rootnoverify (hd2,0) just hangs, no messages at all show on the console. The rest give the Error 13.

I've also tried putting this at the end of my grub.conf:
Code:

map (hd0) (hd3)
map (hd3) (hd0)


No change in behavior.
I don't know what else to try.
Back to top
View user's profile Send private message
RageOfOrder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Aug 2006
Posts: 99
Location: EH?!?!

PostPosted: Tue Aug 22, 2006 11:55 pm    Post subject: Re: Gentoo / Windows XP Dual Boot / Grub: Error 13 Reply with quote

d_logan wrote:

I installed Windows to /dev/hdb1.


That is (hd2,0), which is the one you want to use, that is why you get the different result. The blank screen means you used mapping incorrectly, or not at all.

Code:

timeout 30
default 0
fallback 1

title  kernel-2.6.17-gentoo-r4
root (hd0,0)
kernel /boot/kernel-2.6.17-gentoo-r4 root=/dev/sda3

title Windows XP
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
makeactive
chainloader +1


That should do it.
_________________
...And then stuff happened.


Last edited by RageOfOrder on Wed Aug 23, 2006 12:13 am; edited 1 time in total
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Wed Aug 23, 2006 12:09 am    Post subject: Reply with quote

Hi.

Try using the following:
Code:
title Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
makeactive
chainloader +1

Does it work?
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Wed Aug 23, 2006 12:17 am    Post subject: Reply with quote

[mod]Merged above three posts here.[/mod]
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
d_logan
n00b
n00b


Joined: 09 May 2006
Posts: 73

PostPosted: Wed Aug 23, 2006 3:29 am    Post subject: Re: Gentoo / Windows XP Dual Boot / Grub: Error 13 Reply with quote

RageOfOrder wrote:

That is (hd2,0), which is the one you want to use, that is why you get the different result. The blank screen means you used mapping incorrectly, or not at all.

Code:

timeout 30
default 0
fallback 1

title  kernel-2.6.17-gentoo-r4
root (hd0,0)
kernel /boot/kernel-2.6.17-gentoo-r4 root=/dev/sda3

title Windows XP
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
makeactive
chainloader +1


That should do it.

That worked like a charm. Thanks a lot. But why is it (hd2,0)?? Shouldn't that be the 3rd drive? It seems to me that depending on whether the PATA or SATA drives were counted first, it would either be the 2nd or the 4th drive.

Again, thanks a ton, just trying to understand where I went wrong.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Wed Aug 23, 2006 5:34 am    Post subject: Re: Gentoo / Windows XP Dual Boot / Grub: Error 13 Reply with quote

d_logan wrote:
That worked like a charm. Thanks a lot. But why is it (hd2,0)?? Shouldn't that be the 3rd drive? It seems to me that depending on whether the PATA or SATA drives were counted first, it would either be the 2nd or the 4th drive.

Again, thanks a ton, just trying to understand where I went wrong.


It all depends on how you've set your BIOS up and which order your BIOS sends them in.

Grub doesn't actually do any "counting" other than the first disk that the BIOS reports is (hd0) and the next one is (hd1).

The easiest way to find out which grub device to use is to boot into grub and then press the letter C which sends you to the grub command line. Then you type in
Code:
root (hd
and hit tab. Now it'll list all the drives. Choose one. So now you'll have something like
Code:
root (hd1,
and now press tab again. This'll list the partitions of that drive. Repeat these steps until you've figured out which drive is which.

Also helps because I've even had it where if I boot from the livecd for some reason grub would give a different (hd0) than when I booted from disk (which made my grub config file not work).
Back to top
View user's profile Send private message
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Sun Aug 27, 2006 3:37 am    Post subject: Reply with quote

This has now happened to me twice: I've used the 2006.0 amd64 livecd installer to install grub into /dev/sda (hd0,0). It responds with 'success' or something of the sort and I take that as it'd work. I reboot and it doesn't load grub. It is the first drive and it wasn't installed into my second sata3g drive because the windows bootloader is still intact (that's the one it goes to) It is set in the bios to boot my gentoo drive first; I've tried either first. I went back into the livecd, chrooted, re-emerged grub, updated my mtab and used grub-install /dev/sda again, which came back with success. Reboot, no grub. I repeat the process and use
Code:
livecd boot # grub
grub > root (hd0,0)
grub > setup (hd0)
grub > quit
It comes back with success and it STILL doesn't work. Is there something obvious I'm missing?
_________________
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4734
Location: Angra do Heroísmo (PT)

PostPosted: Sun Aug 27, 2006 4:26 am    Post subject: Reply with quote

Have you tried creating /boot/grub/device.map? Using something like:
Code:
(fd0)   /dev/fd0
(hd0)   /dev/sda

and then running grub with the following?
Code:
# grub --device-map=/boot/grub/device.map

_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Sun Aug 27, 2006 9:29 pm    Post subject: Reply with quote

Turns out that the problem is with the amd64 livecd installer. (Or quite possibly with myself for not seeing a place to toggle the bootable flag on my /boot partition). I went in and fdisk'ed my drive, toggled /boot bootable and all's fine now.
_________________
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Back to top
View user's profile Send private message
JHe
n00b
n00b


Joined: 26 Aug 2006
Posts: 8

PostPosted: Sun Aug 27, 2006 9:51 pm    Post subject: Grub error 17, and screen looking a bit messed up Reply with quote

Hello all;

Im trying a stage3 Gentoo installation and so far so good except I'm getting Grub error 17: "cannot mount selected partition. Plus the screen looks a bit mucked up; the resolution looks off and there are vertical lines across the screen. :evil:

My computer is a Dell Centrino Inspiron 9300 with 2gigs of ram, an Nvidia Geforce 6800 go, 1.86ghz Pentium-M processor.

Here is the fstab file i made up for my system:

    /dev/sda2 /boot ext2 defaults,noatime 1 2
    /dev/sda6 / ext3 noatime 0 1
    /dev/sda3 none swap sw 0 0
    /dev/sda5 /mnt/audio reiserfs defaults,noatime 0 2
    /dev/crdom0 /mnt/cdrom udf, iso9660 auto, ro, user 0 0
    /dev/cdrw /mnt/cdrw udf, iso9660 auto, rw, user 0 0
    /dev/dvd /mnt/dvd udf, iso9660 auto, ro, user 0 0
    /dev/dvdrw /mnt/dvdrw udf, iso9660 auto, rw, user 0 0


There is no sda1 since that is the Dell system tools partition

And here is the Grub config that I typed up as well:

    default 0
    timeout 30
    splashimage=(hd0,0)/boot/grub/spash.xpm.gz

    title=Gentoo Linux 2.6.17-r4

    root (hd,0)
    kernel /boot/2.6.17-gentoo-r4 root=/dev/sda6

Help! :)

Thanks in advance
Back to top
View user's profile Send private message
JHe
n00b
n00b


Joined: 26 Aug 2006
Posts: 8

PostPosted: Sun Aug 27, 2006 9:58 pm    Post subject: Reply with quote

Ok I solved the craped out screen by commenting out the splashimage. Now on to the boot problem....
Back to top
View user's profile Send private message
JHe
n00b
n00b


Joined: 26 Aug 2006
Posts: 8

PostPosted: Sun Aug 27, 2006 10:37 pm    Post subject: Reply with quote

hmm I after looking at a previous post I changed the line in the grub.conf file where "root" is to,

root (hd0,5)

And now I am getting...

Booting Gentoo Linux -----

root (hd,05)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/2.6.17-gentoo-r4 root=/dev/sda6

Error 15: File not found

I am assuming that hd0,5 is actually sda6 since sda4 is the extended partition which Grub is ignoring? :?
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 ... 8, 9, 10, 11, 12, 13  Next
Page 9 of 13

 
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