# Gentoo - a few problems of gentoo beginner

## Bp44

Hello  :Smile:  I installed Gentoo few days ago. I installed it on my removable disk (2.5" HD with enclosure; connected by USB). First i had problem with run my linux. Everytime when i tried to do that my kernel said 

```
VFS: Cannot open root device "sda3" or unknown-block(2,0)

Please appen a correct "root=" boot option; heare are available partitions
```

 and then 

```
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
```

On other forum someone suggest me to use initrd compiled by genkernel with --slowusb option. I did it and it solved part of my problem. Now when i run my linux i gott message that linux couldn't mount main filesystem and ask me to type root directory. When i do that my linux boot properly.

And here is first question: What can i do with that? I don't want to type "/dev/sda3" every time when i run my linux.

Here is my grub.conf file:

```
# 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 60

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

title Gentoo Linux 2.6.26-r3

root (hd0,0)

kernel /boot/kernel-2.6.26-gentoo-r3 root=/dev/sda3 real_root=/dev/sda3

initrd /boot/initrd-2.6.26-gentoo-r3

# vim:ft=conf:

```

Second problem is when i try to use network. I don't have internet on my linux. i tried to use net-config but  I don't even have it.  When i try to use ifconfig eth0 i got message that informs me that linux couldn't find device. when i just type 

```
ifconfig
```

 i get 

```
lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

And here is second question: What can i do about that? What can i solve it?

And the last thing. I think that i don't have mice in my linux. Sometimes when you don't use your computer, console screen just goes black and still like that untill you move the mice or press some button (that's what i had in live cd). In my linux if i move mice nothing happens. Does it mean i don't have configured mice?

PS. Sorry for my english but i'm in england from 5 months and i still don't sprak fluently. I hope that you understand my problems  :Smile: 

----------

## szczerb

Welcome ;]

1. Post your fstab ('cat /etc/fstab')

2. Try 'ifconfig -a'. What network card do you have?

3. To have mouse in the console you need to 'emerge -va gpm' and then '/etc/init.d/gpm start' (this will start the gpm daemon which will give you support for mouse in the VTs (console). If you want it to start automatically on boot do 'rc-update add gpm default' (this will add gpm to your default runlevel).

EDIT:

If I guess correctly who you are then polish is your native language. Here is a guide for gpm in polish:

http://www.gentoo.org/doc/pl/gpm.xml (although what I posted above should be enough nowadays.

Browse through these guides - I'm sure some of them will be usefull:

http://www.gentoo.org/doc/pl/list.xml?desc=1Last edited by szczerb on Wed Dec 03, 2008 6:17 pm; edited 1 time in total

----------

## redgsturbo

root=/dev/sda3 should be root=/dev/ram0 if you're loading an initial ramfs... whats on the internal drive anyway?Last edited by redgsturbo on Wed Dec 03, 2008 6:18 pm; edited 1 time in total

----------

## redgsturbo

post the output of lspci and then the output of lsmod, and the output of "dmesg | grep eth" for good measure

----------

## Bp44

OK then. 

lspci: 

```
-bash: lspci: command not found
```

 Now i need to go to school but i'll back in about 2 hours and i'll install it using chroot  :Smile: 

dmesg | grep eth: 

```
Parsing all Control Methods:

Table [DSDT](id 0001) - 699 Objects with 62 Devices 189 Methods 38 Regions

Initializing Device/Processor/Thermal objects by executing _INI methods:..

Executed 2 _INI methods requiring 1 _STA executions (examined 69 objects)

Driver 'sd' needs updating - please use bus_type methods

Driver 'sr' needs updating - please use bus_type methods
```

/etc/fstab: 

```
# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

/dev/sda1      /boot      ext3      defaults,noatime,noauto   1   2

/dev/sda2      none      swap      sw         0   0

/dev/sda3      /      ext3      noatime         0   1

/dev/sda4      /dysk      ntfs      noauto         0   0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

#shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
```

and ifconfig -a:

```
lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
```

On internal hardware i've (forgive me) windows....

PS. Yes szczerb, you guessed correctly  :Smile:  Thanks forindormation about mice  :Smile:  I'll use it when i'll (hopefully) get access to the internet from linux  :Very Happy: 

----------

## redgsturbo

once you're chroot'ed into the gentoo enviroment again, 'emerge pciutils' and then 'lspci -q'

----------

## KarlisRepsons

I'll be watching this thread, as I'm interested in how will it end. For me it ended as: throw away initramfs and throw me into kernel reality. Perhaps, is too much for OP, but as I believe, there is no really good alternative in gentoo. Correct me, if you think, I'm wrong. Last time when I tried genkernel, I really did not want to do things manually...

----------

## szczerb

Definitely your own kernel is the way to go - and one can always use Pappy's seeds as a nice starting point (never tried but heard only good of them).

----------

## KarlisRepsons

>Pappy's seeds

What??

----------

## szczerb

https://forums.gentoo.org/viewtopic-t-707499.html

----------

## KarlisRepsons

I guess, that would have saved me quite a lot of time, but I took all the pain on me already...

----------

## NeddySeagoon

Bp44,

Your problem with having linux on a USB drive is that linux normally mounts root before USB has been started.

Thats an issue if you need USB to mount your root.

The solution is to add rootdelay=15  to your kernel line in grub.conf

This delays the kernel mounting root for 15 seconds, meanwhile USB is started and everything works as expected.

Values from 7 to 30 are reported to work.

----------

## Bp44

Thank you NeddySeagoon  :Smile:  That solved my first problem. 

And lspci: 

```
00:00.0 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge

00:00.1 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge

00:00.2 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge

00:00.3 Host bridge: VIA Technologies, Inc. PT890 Host Bridge

00:00.4 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge

00:00.7 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge

00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge

00:0f.0 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)

01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5500] (rev a1)
```

By the way: how can i change my console font? Now i have very huge font and i want to change it to small one as is in MinimalCD  :Smile: 

----------

## redgsturbo

 *Bp44 wrote:*   

> Thank you NeddySeagoon  That solved my first problem. 
> 
> And lspci: 
> 
> ```
> ...

 

thats likely not a font issue, but rather the minimal CD runs in framebuffer mode.  Add a vesa framebuffer in your kernel config, enable framebuffer console support, and add vga=791 to your kernel params (for 1024x768... vga=795 for 1280x1024).  For the network issue, make sure you have a via Rhine driver compile in or as a module (if the later, do an lsmod after you've booted and ensure that you have the via rhine module loaded "lsmod | grep rhine"

----------

## Bp44

When i try to compile rhine module i get few errors  :Neutral: 

```
make -C /lib/modules/2.6.26-gentoo-r3/build SUBDIRS=/temp/src modules

make[1]: Entering directory `/usr/src/linux-2.6.26-gentoo-r3'

  CC [M]  /temp/src/rhine_main.o

/temp/src/rhine_main.c: In function 'rhine_found1':

/temp/src/rhine_main.c:681: error: implicit declaration of function 'SET_MODULE_OWNER'

/temp/src/rhine_main.c: In function 'rhine_receive_frame':

/temp/src/rhine_main.c:1229: error: 'struct sk_buff' has no member named 'mac'

/temp/src/rhine_main.c:1229: error: 'struct sk_buff' has no member named 'mac'

/temp/src/rhine_main.c:1229: error: 'struct sk_buff' has no member named 'mac'

/temp/src/rhine_main.c:1229: error: 'struct sk_buff' has no member named 'mac'

/temp/src/rhine_main.c: In function 'rhine_open':

/temp/src/rhine_main.c:1587: error: 'SA_SHIRQ' undeclared (first use in this function)

/temp/src/rhine_main.c:1587: error: (Each undeclared identifier is reported only once

/temp/src/rhine_main.c:1587: error: for each function it appears in.)

/temp/src/rhine_main.c:1587: warning: passing argument 2 of 'request_irq' from incompatible pointer type

/temp/src/rhine_main.c: In function 'rhine_xmit':

/temp/src/rhine_main.c:1737: error: 'CHECKSUM_HW' undeclared (first use in this function)

/temp/src/rhine_main.c:1738: error: 'struct sk_buff' has no member named 'nh'

/temp/src/rhine_main.c: In function 'rhine_init_module':

/temp/src/rhine_main.c:1954: error: implicit declaration of function 'pci_module_init'

make[2]: *** [/temp/src/rhine_main.o] Error 1

make[1]: *** [_module_/temp/src] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.26-gentoo-r3'

make: *** [default] Error 2
```

What can i do with that?

----------

## redgsturbo

 *Bp44 wrote:*   

> When i try to compile rhine module i get few errors 
> 
> ```
> make -C /lib/modules/2.6.26-gentoo-r3/build SUBDIRS=/temp/src modules
> 
> ...

 

Here's where I'm starting to get on sketchy ground.  I've written linux kernel modules before but always used the kernel's build scripts to build them so that all needed linking and symbols are present.  You should probably do the same as there is obviously some stuff getting left out in the above that it can't find.  :Smile: 

----------

## Bp44

What is kernel's build script? Where can i find it and how can i use it?

----------

## redgsturbo

 *Bp44 wrote:*   

> What is kernel's build script? Where can i find it and how can i use it?

 

just go into /usr/src/linux/, type make menuconfig, select the rhine module, save the config when you exit, and the type "mount /boot && make && make modules_install &&, make install", point grub to it, and you should be good

----------

## Bp44

 *redgsturbo wrote:*   

>  *Bp44 wrote:*   What is kernel's build script? Where can i find it and how can i use it? 
> 
> just go into /usr/src/linux/, type make menuconfig, select the rhine module, save the config when you exit, and the type "mount /boot && make && make modules_install &&, make install", point grub to it, and you should be good

 

Select the rhine module? Where can i select it? I can't find it  :Sad: 

Sorry for that. I'm new user and i don't know how to do that things ;(

----------

## redgsturbo

 *Bp44 wrote:*   

>  *redgsturbo wrote:*    *Bp44 wrote:*   What is kernel's build script? Where can i find it and how can i use it? 
> 
> just go into /usr/src/linux/, type make menuconfig, select the rhine module, save the config when you exit, and the type "mount /boot && make && make modules_install &&, make install", point grub to it, and you should be good 
> 
> Select the rhine module? Where can i select it? I can't find it 
> ...

 

once you are in menuconfig, go to device drivers -> network devices -> 100M Ethernet -> Rhine

or something very similar to that (going off memory here)

----------

## Bp44

Hmm i compiled it as a module and i added it to /etc/modules.autoload.d/kernel-2.6 but when i run my kernel it says that module couldon't be loaded. Module is in /lib/modules/2.6.26-kernel/kernel/net/

Module file ends with .ko

----------

## NeddySeagoon

Bp44,

run dmesg - that will show why the module could not be loaded.

You can modprobe via-rhine just before you run dmesg so yu get the error right at the end.

----------

