Problem with Grub and accessing Gentoo after instillation
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Problem with Grub and accessing Gentoo after instillation
And thank you for tackling my problem with any assistance, I figured I'd spent enough time trying to figure this out on my own.
So to start out, I'm somewhat experienced with Linux. I haven't explicitly used it but have a general knowledge of technology and understand it with guides no problem.
I decided that since I recently built a rig for performance, I'd go for a performance distribution with Gentoo. Downloaded latest Live CD and used online manual from a laptop for assistance in installing.
AMD Phenom II X6
OCZ Reaper 8 Gigs
ATI Radeon 5830
I also have 2 Hard Drives installed. 1 1.5 TB drive, and a 400 Gig drive.
I have Windows installed on the TB drive, and then I wiped my 400 Gig and installed my Linux boot/swap/root drive.
I pretty much followed the Gentoo handbook entirely, figured out my Chost settings properly, installed packages, and everything was going well on my 2nd install (the first time I had to nail down my CHOSTS and what not). The 1st and 2nd time I've run into a problem with grub getting to load my Gentoo after leaving the Live CD. The first night I just gave up and decided to re-install.
But now I'm pretty sure (hopeful) I've nailed everything in the install, and that now I'm just experiencing a problem with how grub is set up or how my system is getting read or if something is messed up...
Also, in the Live CD it referred to my 2 hard drives as sda, and hdb (HDB being the 400 gig and where Linux was installed). This is something that may be confusing me as well here... As far as I can tell, when reading in grub it sees the hard drive as sda, and has sda[1,2,3,5] which kind of confuses me...
HOW GRUB READS THE PARTITION TABLE:
102400 sda1 (Boot?)
1183420192 sda2 (Root [based on size?])
1 sda3 (NO clue whatsoever)
147885056 sda5 (SWAP, as I set 1 gig)
When I use the grub.conf I used:
kernel /boot/kernel-2.6.34-gentoo-r11 root=/dev/sda3
No filesystem could mount root, tried: resierfs ext3 vfat msdos iso660
I did install reiserfs on my root drives, and ext2 on my boot drive. I also configured the kernel for these file systems as well.
I also get the error
Kernel panic -- not syncing: VFS: Unable to mount root fs on unkown-block (8,3)
So any more details you need, or anything I can try I'll definitely be willing to work with as I want this working
A point of information. Since kernel version 2.6.22 or thereabouts, all hard drives are refered to as sdX (where X is a letter [a,b,c,etc]). Drives are either SCSI or SCSI-emulated. Prior kernels seperated drives into two groups - IDE and SCSI/SATA.
So, Gentoo telling showing you sda and hdb means one is (probably) SATA and the other IDE.
Now, did you disconnect the windows drive before installing Gentoo? The reason I ask is that your grub.conf is treating your 400G drive as the first drive (which it would do if it didn't recognize the existence of another drive). The grub.conf would be written to suit that case. Then you reconnect the windows drive, and now the grub.conf is looking in the wrong place for the rest of it's files.
If you disconnected the windows drive prior to installation of Gentoo, the fix would be to boot the liveCD, mount your /boot partition, and edit grub.conf.
Change references to sda to sdb in the Gentoo config. Change the reference root (hd0,0) to root (hd1.0) to correctly point to the first partition of the second drive.
Also, if the windows drive was disconnected, you will have to manually compose a config stanza in order to boot windows via grub.
Last edited by bigrigdriver; 10-19-2010 at 02:24 AM.
So reading your posts to be honest I gained nothing.
I had already realized these things, which is why I'm so baffled by all of this.
Like it reads in my config, I refer to the harddrives as (hd0,0) and refer to the partition as being on sda3 (also set it to sd5 for tests as well)
I came up with using sda rather than hdb like in my actual Linux environment reading the grub errors.
I have edited the boot files from grub and tried to load them endless times and have exhausted all possible options I could come up with, including sda, sdb, hda, hdb (in case for whatever reason it was reading the Windows HD)
I had my Windows drive plugged in both times, both are SATA. Again in the environment it referred to my Windows drive as sda and I could see the partitions I had created and that they weren't recognized file systems. The other SATA drive (400 gig ) that I installed my 3 linux partitions on is referred to as hdb, but is sda according to GRUB.
Yet I still get the same error as mentioned above... I can mix my grub options up and get a multitude of GRUB errors. I can get it to where it properly refers to the sd2 partition to find the root (again look at how grub reads my partition table... odd), but then it will give me an error about reiserfs, and I've recompliled the kernel multiple times insuring that capability had been added and everything...
The hard drive definition isn't too much a problem as far as I can tell. It's jsut gonna have to adapt to how grub realizes the hard disks are setup.
My confusion is WHY it's so different between Gentoo and grub loading up the disks. In gentoo, even loading it backup on the live disk if I fdisk my hard drive, it shows the 3 partitions correctly. In grub it shows the 4 partitions. I have (in Gentoo) hdb which is partitioned 3 times, I have boot on hdb1, I put swap on hdb2, and then I put root on hdb3. That's just how I had figured I'd do it when partitioning... but as far as I can tell grub shows up with this crazy partition table apparently, where as I can access it perfectly fine from Gentoo.
There are two root keywords there. You seem fixated with just the first.
It is complaining about mounting the root - which is the "root=..." You haven't answered my question about why you are still using /dev/sda3.
You can use almost any liveCD to get the bootinfoscript - just run it from the liveCD. You can burn the liveCD itself from Windows in need. Problem diagnosis without hard data is largely guesswork.
I've now decided to dive into this matter again... and it's leaving me just as frustrated and confused as before. None of this makes sense, and everything with the install was going perfectly up until just getting the god damned install to load properly, which neither grub or lilo can do now. Why is my hard drive being read so stupidly to a bootloader?
I've now removed grub, reinstalled my boot partition, and reformat it. Compiled my kernel, copied kernel image over to /boot, installed lilo and still getting the same problems. I unplugged my Windows hard drive, and now when it can't load the "root", it's telling me my available partitions are
1048576 sr0 driver: sr
And that's it. How is it loading the bootloader from the proper MBR, but it doesn't detect any partitions on the drive the MBR resides on? This entire issue makes NO SENSE to me.
Another thing is that in my fdisk I noticed my Windows hard drive was being read funky as well. The way it was setup there matches the partition table that grub was originally reading for me. So this means that GRUB was telling me that my window shard drive was where the available root partitions were, but when I set root to (hd0,2) it told me the filesystem was reiserfs?!?!?!? It seems like my bootloaders change their story every other damned line.
Any help here is appreciated. And again guys, I've tried A LOT already to get this fixed... please read my posts before posting something I've already done or know.
And again why I use /dev/sda3 (also remember I've tried every toehr variant here, this is just what I think SHOULD be right), is that in the installation I created 3 partitions. My boot (hdb1), my swap (hdb2), and my root (hdb3).
And bootscript will be hard to run, I don't have any live CDs on me that boot into an actual environment... just my gentoo text-based CD. If I absolutely have to I'll boot back into Windows and get a different live cd -.-
Okay, so I finally got my resources pulled together and got SLAX running from my USB.
And so I got to run bootinfoscript, and a couple things caught my eye. First, I found they're being recognized indeed as sda (for my Windows 1 TB drive) and hdb (for my Linux 400 gig drive).
Here's the Drive/Partition info for my hdb, Linux drive.
=========================== Drive/Partition Info: =============================
Drive: hdb ___________________ _________________________________________________
Disk /dev/hdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x01687af0
Partition Boot Start End Size Id System
/dev/hdb2 80,325 2,200,904 2,120,580 82 Linux swap / Solar
/dev/hdb3 2,200,905 421,641,989 419,441,085 83 Linux
/dev/hdb4 421,641,990 421,915,094 273,105 83 Linux
Drive: sda ___________________ _________________________________________________
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Is there something wrong with my boot partition? I remember thinking that it was acting very odd everytime I've had to go through and try to recreate the boot sector. I was attempting to make it for a 32 MB partition every time, but when I originally did it seemed too small, I remember after that I deleted the original one, created hdb4, formatted, copied over the kernel and everything... so it should be okay.
Also my fstab hadn't updated like I thought I had with the /boot being hdb4 rather than hdb1, would that keep lilo from being able to load it? Or cause a problem/issue with just Gentoo that I could fix after getting it to boot?