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

Goto page Previous  1, 2, 3, 4 ... 29, 30, 31  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
ASID
Apprentice
Apprentice


Joined: 22 Mar 2006
Posts: 195

PostPosted: Sat Sep 20, 2008 4:01 pm    Post subject: Reply with quote

NeddySeagoon,
first of all, thanks for the quick reply.
NeddySeagoon wrote:
ASID,
Does it get as far as the grub menu ?
I presume not.

No
Quote:

What is in your /boot/grub/device.map is it what you expect ?

I guess so...
Code:
(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/sdb
(hd2)   /dev/sdc

Quote:

Are you using grub-install or the grub shell to install?
The grub shell is more robust.

The grub shell. I tried the grub-install once but it froze.
Quote:

Go into the grub shell and type
Code:
root (hd
press tab and grub lists your drives (hd0, hd1, and hd2 would be corrct)

ok
Code:
grub> root (hd
 Possible disks are:  hd0 hd1 hd2

Quote:
Choose one of them and make the line read
Code:
root (hd0,
press tab again and gub lists the partitions on the drive.
Does that look like your (hd0) ?

ok
Code:

root (hd0,
 Possible partitions are:
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 1,  Filesystem type unknown, partition type 0x82
   Partition num: 2,  Filesystem type is ext2fs, partition type 0x83

Quote:
Rinse and repeat for the other drives. Are they waht you expect ?

For hd1 it gives me only 0 as an option.
For hd2:
Code:

root (hd2, 
 Possible partitions are:
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 4,  Filesystem type unknown, partition type 0x7

All as I expected them... :(

To setup I run:

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

grub> setup (hd0)
 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 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Sep 20, 2008 5:03 pm    Post subject: Reply with quote

ASID,

That all looks good.

In your BIOS, you will have options to Boot from SCSI/SATA or IDE first - be sure you choose IDE.
Then choose the first hard drive.

The first option controls how the drives are enumerated, the SATA ones first or not, thus your IDE drive can be (hd0) or (hd2)
If you have to change anything in the BIOS, you may need to reinstall grub to the MBR.

I suspect that your IDE drive is swapping between (hd0) and (hd2) depending on how you 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
moya
n00b
n00b


Joined: 20 Sep 2008
Posts: 4

PostPosted: Sat Sep 20, 2008 7:01 pm    Post subject: Reply with quote

hello,
I apologize for reposting this but i think that my post has gone unoticed.
I compiled my kernel, but the kernel image does not appear anyware in the /boot directory. Do i need to recompile and build my kernel again and what may have caused this problem?
Thanks in advance!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Sep 20, 2008 8:30 pm    Post subject: Reply with quote

moya,

If you compiled the kernel yourself, its for you to copy it from the build location to /boot.

If you used genkernel, then genkernel copies both your kernel and initrd files to /boot

Its also possible that your kernel is actually in /boot but you can't see it. By default, gentoo does not mount your boot partition to the /boot mount point and what you see there is the content of the /boot directory on the root filesystem, which should be empty.
When you mount /boot you can see the content of the boot partition there but you will need to explicitly mount it.
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Sun Sep 21, 2008 6:40 pm    Post subject: Grub won't Reply with quote

Hey guys!


This is my first experience with installing Gentoo and everything went just fine, but I'm stuck with Grub.
I can't boot first primary partition(hd0,0) where root FS and kernel image is located. It recognizes the FS but it won't list any files.

I also have Suse installed on the same laptop and there's no problem with mounting that partition ( /dev/sda1 ).

Here is the output from Grub:
-------------------------------------------------------
grub> root (hd0,0)
root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> kernel /boot/vmlinux
kernel /boot/vmlinux

Error 2: Bad file or directory type
-------------------------------------------------------

And this one is from Suse:
------------------------------------------------------
Linux-DRM:/home/drm # mount /dev/sda1 /mnt/tmp_mnt/
Linux-DRM:/home/drm # ls -l /mnt/tmp_mnt/boot/
total 6684
lrwxrwxrwx 1 root root 1 2008-09-20 22:37 boot -> .
-rw-r--r-- 1 root root 0 2008-06-11 19:44 .keep
-rwxr-xr-x 1 root root 6830090 2008-09-21 01:13 vmlinux-
------------------------------------------------------

Why???
Back to top
View user's profile Send private message
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Sun Sep 21, 2008 6:41 pm    Post subject: Reply with quote

ooh crap..I didn't finished the subject title :oops:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 21, 2008 6:55 pm    Post subject: Reply with quote

me_and_linux,

Welcome to Gentoo. You can edit your own posts - including the subject, thats how posters add solved to the title when their issue is solved.


Suse shows an extra hypen
Code:
vmlinux-
vs your grub>
Code:
kernel /boot/vmlinux

as vmlinux- <> vmlinux, vmlinux is not there.

Moved these three posts to the grub sticky - NeddySeagoon
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Sun Sep 21, 2008 7:44 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Suse shows an extra hypen
Code:
vmlinux-
vs your grub>
Code:
kernel /boot/vmlinux



Oh sorry, my mistake! That hypen doens't belong there :)

So, yes kernel image is there...it must be there, but it won't read any file in that FS.
You know when you press tab (in Grub) twice you get list of all files...well here I only get error message.
Back to top
View user's profile Send private message
ASID
Apprentice
Apprentice


Joined: 22 Mar 2006
Posts: 195

PostPosted: Sun Sep 21, 2008 7:58 pm    Post subject: Reply with quote

NeddySeagoon wrote:
ASID,

That all looks good.

In your BIOS, you will have options to Boot from SCSI/SATA or IDE first - be sure you choose IDE.
Then choose the first hard drive.

NeddySeagoon,
the only options in the BIOS are:
- SATA configuration ->
which has three available modes (Disable, Compatible and Enhanced)
When set to Enhanced another option is available
- Configure SATA as (IDE, RAID or AHCI)
The bold ones are what were selected.
No other option is available in the BIOS.

Quote:
The first option controls how the drives are enumerated, the SATA ones first or not, thus your IDE drive can be (hd0) or (hd2)
If you have to change anything in the BIOS, you may need to reinstall grub to the MBR.

I suspect that your IDE drive is swapping between (hd0) and (hd2) depending on how you boot.

I'm not quite sure how to use this info. When I run the grub setup, the IDE drive is always sda -> hd0 independent of the choices in the BIOS.
Back to top
View user's profile Send private message
moya
n00b
n00b


Joined: 20 Sep 2008
Posts: 4

PostPosted: Sun Sep 21, 2008 10:19 pm    Post subject: Reply with quote

NeddySeagoon,
Thank you for the reply.
I encounter now a problem that i think is similar with the one that me_and_linux is describing above.
I found vmlinux inside the directory that i build the kernel (/usr/src/linux), and i copied it to the boot directory. When i try to boot my system i get the following error:
Code:

Booting 'Gentoo Linux 2.6.25-hardened-r7'

root (hd0, 0)
 Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinux root=/dev/sda3

Error 13: Invalid or unsupported executable format


Thanks in advace!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 22, 2008 7:02 pm    Post subject: Reply with quote

moya,

Grub is looking for a compressed kernel image. vmlinux is not compressed.
You need either vmlinuz (notice the z) or /usr/src/linux/arch/<your_arch>/boot/bzImage, which is the more usual kernel file to copy 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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Mon Sep 22, 2008 9:43 pm    Post subject: Reply with quote

I'm still unable load the kernel from the Grub.

I can mount that partition, which is also a root partition, from another Linux installation, but Grub, even dough it recognizes the FS type, can't see any files in that partition.
So after the <root (hd0,0)> command recognizes FS type, I type <kernel /> and press tab key to get list of all files the in root directory, but that doesn't happen. Instead it outputs: Error 2: Bad file or directory type
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 22, 2008 9:53 pm    Post subject: Reply with quote

me_and_linux,

Explain your partition layout I need to know partition names and filesystems abd what each partition is for.
Explain also where all your kernels for all of your distros are.

To avoid going insane, its a good idea to have a single shared /boot for all your distros but its not essential.
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Tue Sep 23, 2008 2:06 pm    Post subject: Reply with quote

NeddySeagoon wrote:
me_and_linux,

Explain your partition layout I need to know partition names and filesystems abd what each partition is for.
Explain also where all your kernels for all of your distros are.

To avoid going insane, its a good idea to have a single shared /boot for all your distros but its not essential.



Code:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3824    30716248+  83  Linux                      //Gentoo installtion -> root partiiton and linux kernel
/dev/sda2            3825        5130    10490445   83  Linux                      //Suse linux root primary partition
/dev/sda3            5131       30401   202989307+   f  W95 Ext'd (LBA)            //Extended partition
/dev/sda5            5131        5653     4200966   82  Linux swap / Solaris       //Suse linux swap
/dev/sda6            5654        5673      160618+  83  Linux                      //Suse linux /boot logical partition -> linux kernel
/dev/sda7            5674        8284    20972826   83  Linux                      //Suse linux /home logical partition
/dev/sda8            8285       17422    73400953+  83  Linux                      //Suse linux /usr logical partition
/dev/sda9           17423       17684     2104483+  83  Linux                      //Suse linux /tmp logical partiiton
/dev/sda10          17685       18207     4200966   83  Linux                      //Suse linux /var logical partition
/dev/sda11          24736       24858      987966   83  Linux                      //Ext3 empty logical partition
/dev/sda12          18208       24735    52436128+  83  Linux                      //Suse linux /opt logical partition


All partitions are EXT2.
I will try to put gentoo-vmlinux kernel image to Suse's boot partition.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 23, 2008 6:16 pm    Post subject: Reply with quote

ASID,

As you are using the AHCI driver, you need to select Enhanced, then from the submenu, AHCI.
Look at your lspci output ... it mentions AHCI and IDE on the SATA line.
Your kernel should already have the AHCI option selected.
_________________
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
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 23, 2008 6:31 pm    Post subject: Reply with quote

me_and_linux,

As SUSE was there first, its grub is installed the the MBR of /dev/sda and it reads the grub.conf in
Code:
/dev/sda6            5654        5673      160618+  83  Linux                      //Suse linux /boot
when it boots. There is no need to change that but the booting stanza for Gentoo must be added there.
You could chainload Gentoos' grub from SUSEs' but thats a complexity we can both do without, so I won't describe it further.

Gentoos' booting files need to be somewhere your BIOS can read, other than that, there is no restriction on file placement
First, lets put them in Gentoos /boot, which is a directory on /dev/sda1

In SUSEs grub.conf (you can only usefully have a single grub.conf) add
Code:
title=Gentoo Linux
root (hd0,0)
kernel /boot/...<rest of kernel line>
initrd /boot/...<initrd_file_name>


You can browse a grub setup with multiple kernels here thats a year old image of my laptop.

IF you put the files in SUSEs' /boot, check that you have a symlink there that shows as
Code:
boot -> .

then all that changes is the root (hd0,0) statement to point to /dev/sda6, which is root (hd0,5).
That should already be in your SUSE boot block too, as thats where SUSEs' kernel is.
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Tue Sep 23, 2008 7:57 pm    Post subject: Reply with quote

Nope...I doesn't work!

Problem still stands. Grub knows that first partition is 0x83, but for some strange reason it won't list any files in it...

Code:

Linux-DRM:/home/drm # mount /dev/sda1 /mnt/tmp_mnt/
Linux-DRM:/home/drm # cd /mnt/tmp_mnt/
Linux-DRM:/mnt/tmp_mnt # ls
.bash_history  boot  etc   lib     lost+found  opt   root  sys  usr
bin            dev   home  .links  mnt         proc  sbin  tmp  var
Linux-DRM:/mnt/tmp_mnt #


This is the proof that FS works...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 23, 2008 8:07 pm    Post subject: Reply with quote

me_and_linux,

0x83 as a partition type is just the value from the partition type byte in the partition table.
Its not linked to any filesystem that may be installed on the partition

Code:
df -T
will show the filesystem types of all the mounted filesystems. I suspect that they are not all ext2.
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Tue Sep 23, 2008 8:35 pm    Post subject: Reply with quote

NeddySeagoon wrote:
me_and_linux,

0x83 as a partition type is just the value from the partition type byte in the partition table.
Its not linked to any filesystem that may be installed on the partition

Code:
df -T
will show the filesystem types of all the mounted filesystems. I suspect that they are not all ext2.


Yeah, I know...it is written in MBR.

Mounting that partition from Suse only show that nothing is "broken" in that filesystem. But still Grub can't see any files or directories in that partition.
It just doesn't make any sense...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 23, 2008 8:41 pm    Post subject: Reply with quote

me_and_linux,

Grub can read exactly one filesystem type - the one that the stage1.5 was installed for.
It cannot read any other filesystem type unless you reinstall it to the MBR.
ext2 and ext3 count as one the same type.

Thats why I suspect that sda1 and sda6 use different filesystem types.
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Tue Sep 23, 2008 8:57 pm    Post subject: Reply with quote

NeddySeagoon wrote:
me_and_linux,

Grub can read exactly one filesystem type - the one that the stage1.5 was installed for.
It cannot read any other filesystem type unless you reinstall it to the MBR.
ext2 and ext3 count as one the same type.

Thats why I suspect that sda1 and sda6 use different filesystem types.


hmm...well:
Code:

Linux-DRM:/mnt/tmp_mnt # df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sda2     ext3    10325780   1288160   8513100  14% /
udev         tmpfs     1033432       104   1033328   1% /dev
/dev/sda6     ext3      155543     22166    125347  16% /boot-------------------------->
/dev/sda7     ext3    20641788  15570524   4022624  80% /home
/dev/sda9     ext3     2071384    787284   1178876  41% /tmp
/dev/sda8     ext3    72246408   4171868  64404496   7% /usr
/dev/sda10    ext3     4134900    570296   3354556  15% /var
/dev/sda1     ext3    30233896   1724560  26973524   7% /mnt/tmp_mnt-------------->
Linux-DRM:/mnt/tmp_mnt #


They are all ext3...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 23, 2008 9:20 pm    Post subject: Reply with quote

me_and_linux,

Its not that then ... and sda1 is right at the start of the disk, so its not that your BIOS cannot read it.

Copy or move your gentoo booting files to /dev/sda6, so grub does not need to read /dev/sda1.
Thats skipping the problem rather than understanding it though and I don't really like that.
_________________
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
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Tue Sep 23, 2008 10:17 pm    Post subject: Reply with quote

NeddySeagoon wrote:
me_and_linux,

Its not that then ... and sda1 is right at the start of the disk, so its not that your BIOS cannot read it.

Copy or move your gentoo booting files to /dev/sda6, so grub does not need to read /dev/sda1.
Thats skipping the problem rather than understanding it though and I don't really like that.


It works after copying it to /dev/sda.
But the problem still remains the mystery...

Anyway, Neddy thank you for helping me! :wink:
Back to top
View user's profile Send private message
Georg Kraml
n00b
n00b


Joined: 22 Sep 2008
Posts: 2

PostPosted: Tue Sep 23, 2008 11:36 pm    Post subject: grub strictly refuses to find any files whatsoever Reply with quote

Apologies if this has been asked before; Google doesn't seem to turn up anything immediately pertinent:

I have an old x86 box with one drive split in two partitions. My (hd0,0) is an ext2fs boot partition; (hd0,1) is an ext2fs root file system. I can mount and work with these partitions. I can even boot from them, just not with grub: grub recognizes the file systems themselves but claims to be unable to find any files on them:

Code:

# fdisk -l /dev/sda | grep sda
Disk: /dev/sda: 40.0 GB, 40007761920 bytes
/dev/sda1                1         100      803218+  83  Linux
/dev/sda2              101        4864     3826630   83  Linux
# mount | grep sda
/dev/sda2 on / type ext2 (rw)
/dev/sda1 on /boot type ext2 (rw)
# ls /boot/grub/stage1 /etc/passwd
/boot/grub/stage1  /etc/passwd
# grub
[...]
grub> root(hd0, [TAB]
 Possible partitions are:
   Partition num: 0,  file system type ext2fs, partition type 0x83
   Partition num: 1,  file system type ext2fs, partition type 0x83

grub> root(hd0,1)
  File system type is ext2fs, partition type 0x83

grub> find (hd0,0)/grub/stage1

Error 15: file not found

grub> find (hd0,0)/boot/grub/stage1

Error 15: file not found

grub> find (hd0,1)/etc/passwd

Error 15: file not found


I've tried all 27 combinations of path (/grub/stage1, /boot/grub/stage1, /etc/passwd), partition prefix ((hd0,0), (hd0,1), empty) and preceding root command (root (hd0,0), root (hd0,1), neither) but none will work. I installed the system off the 2008.0 Live CD; my grub identifies as GNU GRUB 0.97. What am I missing? How stupid should I feel? Any pointer would be greatly appreciated.
Back to top
View user's profile Send private message
me_and_linux
n00b
n00b


Joined: 21 Sep 2008
Posts: 12

PostPosted: Tue Sep 23, 2008 11:57 pm    Post subject: Re: grub strictly refuses to find any files whatsoever Reply with quote

Georg Kraml wrote:
Apologies if this has been asked before; Google doesn't seem to turn up anything immediately pertinent:

I have an old x86 box with one drive split in two partitions. My (hd0,0) is an ext2fs boot partition; (hd0,1) is an ext2fs root file system. I can mount and work with these partitions. I can even boot from them, just not with grub: grub recognizes the file systems themselves but claims to be unable to find any files on them:
.


Seems like you have exactly the same problem as I do. Look few posts above....but don't know any solution to it.
I hope you'll have more luck!
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, 4 ... 29, 30, 31  Next
Page 3 of 31

 
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