# Help with manually configuring the kernel [solved]

## h2sammo

It is my first time.

I have been scorned enough for running genkernel.  I am doing it manually.  Can i get some pointers?

My pressing question is: What settings do i need enabled/disabled so the system boots up properly?Last edited by h2sammo on Thu Mar 19, 2009 2:01 pm; edited 1 time in total

----------

## FizzyWidget

http://62.3.120.141/~pappy/working.html - should tell you all you need  :Smile: 

----------

## bobspencer123

off the top of my head the most important to have compiled (checked) are:

1) Your processor architecture

2) Your filesystem types (i.e. ext3, ext2, jfs, etc...)

3) Your ethernet/network card 

4) SATA, IDE, USB, PCMCIA, SCSI, FIREWIRE, drivers (if applicable)

5) pciexpress or agp for graphics

.... I think most everything else is optional for your setup ... and also there are many options that are prechecked in the gentoo-sources kernel that are pretty standard and you might want to leave alone at first.

then of course just:

make && make modules_install

cp the bzimage

edit: grub as appropriate

----------

## RedSquirrel

```
# lspci -vv
```

provides a great deal of useful info.

----------

## h2sammo

how can i scroll up and down through the huge lspci list generated?

----------

## WastingBody

To view it in the current term you can use this.

```
lspci -vv | less
```

----------

## h2sammo

ok, its configured, im at the installing GRUB point where i write up its configuration file.

there are two lines indicating the partition where the kernel image (or operating system) is located. the manual has it as 

root (hd0,0)

but i didnt setup a hd0 partition.

i have hd1 (as boot), hd2 (as swap) and hd3 (the rest of the hard drive).

is the line in grub.conf correct or i have to alter it so it reflects my own partitions.  if so, how should it look? what is the second 0 past the comma sign refer to?

----------

## h2sammo

ok i finished the installation, reinstalled and it gave me some root related errors on boot from HD.

i think i know what i did wrong, i set the root=/dev/hda3...and i only have 1 HDD installed.

i need to change that to root=/dev/sda3.  this is in grub.conf.

how can i access a terminal so i can edit grub.conf once i boot from hdd? can i do this somehow with the minimal install cd?

----------

## h2sammo

figured out how to chroot (but a tutorial would still be nice to have in this thread) but didt fix my problem.

i am confused about setting filesystems on my partitions.  my system would NOT take sd1(2 or 3) partitions but hd1(2 or 3).  throughtout the instalation, i cannot use sd1(2 or 3) as it becomes unrecognizable.  i set my boot partition sd1 as ext2 (and enabled that in the kernel) and my largest partition where the root resides, sd3 as ext3.  This is how the gentoo handbook instructs me to do it as an example.

the latest error on boot is:

fsck.ext: No such file or directory while trying to open /dev/hda3

/dev/hda3: The superblock could not be read or does not describe a correct ext2 filesystem (remember this was set as ext3 by me).  If the device is valid and it really vcontains an ext2 filesystem then the superblock is corrupt abd you  might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>.

is there a way to get my partitions to register as sd1(2 or 3) in the beggining? does it have to do with the fact that my hard drive is IDE?

----------

## TheAbu

For your hd vs. sd problem first:

Depending on your hardware, your first hard drive will be seen either as /dev/hda or /dev/sda (hda for a hard drive connected to an ide controller, sda for hard drive connected to a sata controller or a SCSI controller).

So, if you see /dev/hda, there is nothing wrong.

No depending on how you decided to partition your hard drive the numbers will change. If we take the case of a hard drive connected to an ide controller (it seems to be the case for you, you have a few scenarii based on the Gentoo handbook).

1) you followed the hand book and created a primary partition for /boot and one for root  / + maybe one for /home

In that case, chances are, you will have for your fstab:

/dev/hda1     /boot

/dev/hda2     swap

/dev/hda3     /

/dev/hda4     /home

in that case, your grub must be

root(hd0,0)

kernel /boot/kernel-(the name you gave it) root=/dev/hda3 

As you can see, /dev/sdX becomes /dev/hdX

2) you used the same setting but inside an extended partition (that's what I do, but it's not really standard so I only mention it for "completness" sake

/dev/hda5      /boot

/dev/hda6     swap

/dev/hda7      /

/dev/hda8      /home

here your grub would be 

root(hd0,4)

kernel /boot/kernel--the name you gave it) root=/dev/hda7

The main thing you have to remember her are 

sda ----> hda (tailing number doesn't change)

in grub root(hdX,X) refer to your /boot partition, not your / (root), can be tricky sometimes

in grub hd0 = first hard drive, hd1 = second hard drive (ide, sata or SCSI, it doesn't matter, it remains hd)

in grub hd0,0 = first hard drive, first partition (indexing start at 0)

I hope it will help you, remember, I'm also very much a beginner and I tell you that from the top of my head, so, someone with more experience might proove me wrong  :Smile: 

----------

## h2sammo

ok, i will stick with the hdx denomination throughout the installation and in all conifg files.

another question is, does it matter if the filesystems on the partitions differ?  the sample given in the installation handbook puts an ext2 filesystem on the boot partition and ext3 on the root.

----------

## FizzyWidget

you can change them as you see fit, i have ext3 for boot and / and i have xfs for storage, just remember to tell fstab what it is you are using

----------

## h2sammo

solved here:

https://forums.gentoo.org/viewtopic-t-747395-highlight-.html

----------

