Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Greetings grub issues with booting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Cyberman.ff
n00b
n00b


Joined: 30 Dec 2008
Posts: 8

PostPosted: Sun Oct 07, 2012 3:03 pm    Post subject: Greetings grub issues with booting Reply with quote

Greetings I've had difficulties with booting gentoo for a while it appears to be a combination of grub and AHCI support (not proven but none the less this appears to be the issue).

This is my boot partition (contents)
{actual boot partiion device}
Code:
/dev/sda1

dir contents
Code:
total 21773
-rw-r--r-- 1 root root 1836477 Oct 29  2011 System.map-genkernel-x86_64-2.6.39-gentoo-r3
-rw-r--r-- 1 root root 1896157 Sep 16 14:47 System.map-genkernel-x86_64-3.4.9-gentoo
lrwxrwxrwx 1 root root       1 Aug 18  2011 boot -> .
-rw-r--r-- 1 root root     512 Aug 18  2011 boot.0800
drwxr-xr-x 2 root root    1024 Sep 17 18:55 grub
-rw-r--r-- 1 root root 3717841 Oct 29  2011 initramfs-genkernel-x86_64-2.6.39-gentoo-r3
-rw-r--r-- 1 root root 3992501 Sep 16 14:58 initramfs-genkernel-x86_64-3.4.9-gentoo
-rw-r--r-- 1 root root 4240528 Aug 27  2011 kernel-2.6.39-gentoo-r3
-rw-r--r-- 1 root root 3084352 Oct 29  2011 kernel-genkernel-x86_64-2.6.39-gentoo-r3
-rw-r--r-- 1 root root 3310672 Sep 16 14:47 kernel-genkernel-x86_64-3.4.9-gentoo
drwx------ 2 root root   12288 Aug 16  2011 lost+found
-rw------- 1 root root   99840 Aug 27  2011 map


/boot/grub/ directory contents
Code:
total 438
-rw-r--r-- 1 root root    197 Sep 17 18:55 default
-rw-r--r-- 1 root root     45 Aug 18  2011 device.map
-rw-r--r-- 1 root root   8616 Sep 17 18:55 e2fs_stage1_5
-rw-r--r-- 1 root root   7904 Sep 17 18:55 fat_stage1_5
-rw-r--r-- 1 root root   7164 Sep 17 18:55 ffs_stage1_5
-rw-r--r-- 1 root root    900 Sep 17 18:49 grub.conf
-rw-r--r-- 1 root root   7180 Sep 17 18:55 iso9660_stage1_5
-rw-r--r-- 1 root root   8616 Sep 17 18:55 jfs_stage1_5
lrwxrwxrwx 1 root root      9 Aug 18  2011 menu.lst -> grub.conf
-rw-r--r-- 1 root root   7332 Sep 17 18:55 minix_stage1_5
-rw-r--r-- 1 root root   9564 Sep 17 18:55 reiserfs_stage1_5
-rw-r--r-- 1 root root  33856 Sep 17 17:32 splash.xpm.gz
-rw-r--r-- 1 root root    512 Sep 17 18:55 stage1
-rw-r--r-- 1 root root 104620 Sep 17 18:55 stage2
-rw-r--r-- 1 root root 107736 Aug 18  2011 stage2.old
-rw-r--r-- 1 root root 104620 Sep 17 17:32 stage2_eltorito
-rw-r--r-- 1 root root   7432 Sep 17 18:55 ufs2_stage1_5
-rw-r--r-- 1 root root   6796 Sep 17 18:55 vstafs_stage1_5
-rw-r--r-- 1 root root   9264 Sep 17 18:55 xfs_stage1_5


grub.conf (/boot/grub/grub.conf)
Code:
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

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

title Gentoo Linux 3.4.9
root (hd0,0)
kernel /boot/kernel-genkernel-x84_64-3.4.9-gentoo root=/dev/sda2 video=uvesafb:mtrr3,ywrap,1024x768-32@60
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

title Gentoo Linux 3.4.9 (rescue)
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-genkernel-x84_64-3.4.9-gentoo root=/dev/sda2 init=/bin/bb
#kernel /boot/kernel-2.6.39-gentoo-r3 root=/dev/sda2 init=/bin/bb


# vim:ft=conf:

I get complaints about not finding the kernal.

FYI I had to do a reinstall after clobering an emerge (I've got too much talent for my own good and not the right kind of talent the reverse midas touch {sigh}). Not as though that were important. So if you are confused by the Aug 2011 files that is their origin. I wiped the root and most of the /usr partition data (not erased). I have the old /home parition (hopefully it won't nuke things).

In the mean time I'm a bit puzzled here it seems Grub < 1 has issues with SATA drives. there is this lovely diatribe about 'grub 2 will be better' however there is no grub 2 or grub 2 documentation (let alone the original). So what do we use in the mean time? I've been using the boot dvd (apri/may edition is all that's available) but it can be a bit of a pain to be sure your root partition doesn't overflow (yes it's humorous but I sware everything wants to dump garbage in there heh).

Aside from my personal 'mess ups' the issue with SATA drives is quite annoying. I'm not sure how to boot squarely. What I was doing was I turned off all AHCI settings in the bios. This time I tried them on. What's the deal? The MB is 2009/2010 era Gigabit board. It originally lacked support for about 8 months because it was 'too new'. Erstwhile to get the thing too boot originally. I have 2 1.5 T drives and it seems to create issues with grub. I boot from drive one. Will I have more trouble when I add a 3T drive in as well? Seems strange to be honest, I've nary had this much trouble with linux until newer mother boards came out.

Suggestions welcome, if you have questions I'll do my best to answer in as detailed and clear a manner possible.

Erstwhile thanks for at least gazing at my dilema. It might be difficult to get you my bios configuration (as this is the boot machine I'm using) so I'm puzzling over that one.

Cyb
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Oct 07, 2012 3:23 pm    Post subject: Reply with quote

Cyberman.ff,

grub has no interest in how the HDD is electrically connected to the system as grub makes BIOS calls to load the files.
It follow that if your BIOS works with your HDD so does grub.

Your /boot, /boot/grub and grub.conf appear to be self consistent.
That means its none of the usual typos that are so hard to spot until someone looks over your shoulder and points them out :)

The exact text of the error message would be good.

It looks like you may not have installed grunb to the MBR since your last install in 2011 as you /boot/grub/device.map has a 2011 date and it should be written every time that grub is installed to the MBR.
This may mean that you have a mix of grub versions in use. Sometimes this does not work.

Reinstall grub to the MBR. If thats not enough, remove the device.map file and do it again. If its still broken, post the exact error mesage and the content of /boot/grub/device.map.
Do you have a mix of SATA and IDE HDDs?

If you have a genkernel configured kernel, your system still won't boot as genkernel makes a fully modular kernel and must have an initramfs loaded and used 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
Cyberman.ff
n00b
n00b


Joined: 30 Dec 2008
Posts: 8

PostPosted: Sun Oct 07, 2012 4:06 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Cyberman.ff,

grub has no interest in how the HDD is electrically connected to the system as grub makes BIOS calls to load the files.
It follow that if your BIOS works with your HDD so does grub.

Your /boot, /boot/grub and grub.conf appear to be self consistent.
That means its none of the usual typos that are so hard to spot until someone looks over your shoulder and points them out :)

The exact text of the error message would be good.

It looks like you may not have installed grunb to the MBR since your last install in 2011 as you /boot/grub/device.map has a 2011 date and it should be written every time that grub is installed to the MBR.
This may mean that you have a mix of grub versions in use. Sometimes this does not work.

Reinstall grub to the MBR. If thats not enough, remove the device.map file and do it again. If its still broken, post the exact error mesage and the content of /boot/grub/device.map.
Do you have a mix of SATA and IDE HDDs?

If you have a genkernel configured kernel, your system still won't boot as genkernel makes a fully modular kernel and must have an initramfs loaded and used to boot.


Additional information.
I guess I made the mistake of assuming genkernel knew what it was doing.
I could not get grub to install using the normal script so I tried to manually do so, it would just hang when I attempted otherwise. I thought I had installed things but if I follow you correctly the device.map file should ahve been updated to indicate the MBR was written?

I noticed a complaint when I emerged the new kernel about the initramfs but I didn't think it was an issue since it was for a later version than was emerged for that particular package. It seems that a lot of conflict is occuring with initialization and boot in linux. The initramfs documentation is rather confusing to be honest and it is hard to connect what one needs to do to make things work based on genkernel and emerge references (if at all). So I am getting close to being at a loss here.

As I stated before using grub straight up without doing so manually caused everything to hang. There were NO ERROR MESSAGES either, or I would have stated that already. So manual was the only option at that point. It very consistantly hung at that point otherwise.

It seems I must have missed something, during the manual install (hmmm).

The initramfs I assume is because of the use of dynamic modules for devices needing to be loaded before something else is happening in the boot process? It would seem a bit problematic to run initialization scripts from a partition that you can't read because you can't load the module for it (hrmm). Is the easy way around this to statically link the file system type used in the boot partition and other patition types into the kernel?

Probably not a good place for such a discussion but it seems that was always a big issue of not including certain support in the kernel by default with dynamic drivers. I don't know what solution there is for it either.

Since I did this all 3 weeks ago at least I can see my memory works OK.

I'm concerned about the documentation however, I'll have to reread the procedure for manual kernel install using grub. I remember it was a pain the first time as well. (I believe it took me a week but ... something seems to be missing here).

Thanks for your insite I appreciate it, that gives me a direction to work on it with.

Cyb
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Oct 07, 2012 4:35 pm    Post subject: Reply with quote

Cyberman.ff,

Get into your chroot and install grub manually. Use the --no-floppy option (that may not be quite right) if you don't have a floppy drive.

If you have a mix of IDE and SATA drives, the BIOS ordering will be affected by the boot order. Its a trap for the unwary but if you are careful. it will be OK.

When you build your kernel with genkernel all, you are giviung genkernel its head. When you do that it builds you an initramfs, which you must use.
Your present grub.conf has it commeneted out, so its not loaded and the kernel command line attempsts to mount root without using the initrd. Thats doomed for the reasons you give and more.

To avoid the need for an initrd you must have
    Your partition table type built in
    The SCSI Option On
    SCSI Disk Support
    Your boot HDD Controller built in from the SATA Menu (even if its IDE)
    Your root filesystem

If you want to boot from USB, you need a few more things

As you don't get anything - I suspect that grub is not installed to the MBR, or its installed to one MBR and you are trying to boot from another drive.
Sight of your
Code:
fdisk -l
may be useful.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum