View previous topic :: View next topic |
Author |
Message |
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Wed Apr 02, 2003 12:55 am Post subject: Total newbie! eth0 not found after install |
|
|
Hello, I am a complete newbie to Linux and have done something incredibly stupid. I followed the Installation Guide religiously and successfully installed 1.4rc3 and rebooted, only to find that I no longer have an eth0, so cannot connect to the internet or anything.
I did not autoload my network card as a module because I was sure I compiled it into the kernel and not as a module, but now I am not so sure if I did that.
Is there any way I can find out if I compiled my network card as a module or not?
Thanks :)
Mohan |
|
Back to top |
|
|
Valen Apprentice
Joined: 18 Aug 2002 Posts: 197 Location: Toronto, Ontario, Canada
|
Posted: Wed Apr 02, 2003 2:10 am Post subject: |
|
|
Assuming you haven't changed your configuration file for your kernel you can go back into the /usr/src/linux directory and run make menuconfig and have a look at what you have selected. |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Wed Apr 02, 2003 7:38 am Post subject: |
|
|
Valen wrote: | Assuming you haven't changed your configuration file for your kernel you can go back into the /usr/src/linux directory and run make menuconfig and have a look at what you have selected. |
this works only when u didnt do 'make mrproper' after the compilation - i usually safe the kernel-config in an additional file 'mykernel' for example - this config doesnt get deleted and u can load it anytime u want in the 'make menuconfig' ncurses interface...
but the most important thing: Dont panick! just because the network doesnt work on the first boot doesnt mean u have to redo a lot of things - only thing needed is a little tweak here or there
also try to 'rc-update add net.eth0' and '/etc/init.d/net.eth0 start' before u toy with the kernel again... _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Fri Apr 04, 2003 1:06 am Post subject: |
|
|
Thanks Valen,
I tried what you said, I got:
net.eth0already installed in runlevel default; skipping
Caching service dependencies
rc-update complete
And when I ran /etc/init.d/net.eth0 start I got:
Bringing eth0 up...
Failed to bring eth0 up
Should I run make menuconfig now?
Cheers
Mohan |
|
Back to top |
|
|
arkhan_jg Apprentice
Joined: 18 Mar 2003 Posts: 199 Location: Dorset, UK
|
Posted: Fri Apr 04, 2003 1:43 am Post subject: |
|
|
Run lsmod when you are booted from the livecd; that should tell you which type of network card you have in the working install.
Then, when you are chrooted and run make menuconfig, you can make sure you have that same network card compiled into your kernel (or, do it as a module and add it to /etc/modules.autoload).
Then make dep && make clean bzImage modules modules_install
as usual, copy the bzImage to boot, and configure your grub.
Hopefully that will solve the problem! _________________ make menuconfig not war |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Fri Apr 04, 2003 2:38 am Post subject: |
|
|
I cannot chroot. The only way I can chroot is to again start from the livecd stage2 tarball. Is that what i am supposed to do? Gentoo is already installed, can't I boot into that as root and make menuconfig again?
Cheers
Mohan |
|
Back to top |
|
|
Jeff Binder Tux's lil' helper
Joined: 06 Dec 2002 Posts: 117 Location: RPI (Troy, NY, US, etc.)
|
Posted: Fri Apr 04, 2003 5:27 am Post subject: |
|
|
chroot doesn't wipe yor system out or anything. It just creates a shell that is `inside' your system. You can chroot all you want without making any changes to your system.
If you're having trouble chrooting when you've booted off the livecd, make sure you've got your partitions mounted and did the
Code: |
mount -t proc proc /mnt/gentoo/proc
|
. You should also do the
after you chroot. _________________ Anyone who attributes a quote to themself is a pompous fool.
--me |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Fri Apr 04, 2003 11:53 am Post subject: |
|
|
Thanks Jeff, what you said is exactly what I tried to do and could not. I could not mount proc because proc did not exist once I booted off the livecd and so I could not chroot. That is why I asked if I should start again from stage 2.
I really do not mind starting all over again, hell, I can only learn more by doing that *grin*
Cheers
Mohan |
|
Back to top |
|
|
michaelb l33t
Joined: 06 Jun 2002 Posts: 686 Location: Ann Arbor, MI
|
Posted: Fri Apr 04, 2003 2:15 pm Post subject: |
|
|
There's got to be a step we're missing here, because there is no reason you should not be able to chroot into your install after booting from the live CD. So, if you would humor me, boot the lived CD and then do the following Code: | # mkdir /mount/gentoo
# mount -t reiserfs /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/proc
# mount -t proc /proc /mnt/gentoo/proc
# swapon /dev/hda2
# chroot /mnt/gentoo /bin/bash
# source /etc/profile | Now, I'm assuming from your first post that you set up your partitions exactly as they are stated in the install docs. If not, then obviously you have to tweak these commands slightly to match your setup. If this doesn't work, what specifically is the error?
Michael |
|
Back to top |
|
|
rtn Guru
Joined: 15 Nov 2002 Posts: 427
|
Posted: Fri Apr 04, 2003 2:48 pm Post subject: |
|
|
What type of network card do you have?
What does `dmesg | egrep eth0` return, if anything?
--rtn |
|
Back to top |
|
|
C-Otto n00b
Joined: 02 Mar 2003 Posts: 51 Location: Aachen, Germany
|
Posted: Fri Apr 04, 2003 4:39 pm Post subject: |
|
|
As rtn mentioned, looking up "dmesg" should show, whether your kernel finds the card or not. Because you are a newbie (you said so ) I think you could have done everything right without recognizing: type "ifconfig" in your "harddisk-gentoo". If it shows "eth0" your card is running and you just have to configure the IP (ifconfig eth0 192.168.0.2" or something, DHCP also possible).
Tell me if this was your problem |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Sat Apr 05, 2003 1:37 am Post subject: |
|
|
Thanks rtn & c-otto. dmesg returns 'command not found' and ifconfig only shows lo.
I am going now to try what michael said (after booting from the livecd) and get back here with my feedback.
Apparently c-otto, I did not do everything right *grin*
Cheers and thanks again to everyone here for being so patient and helpful.
Mohan |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Sat Apr 05, 2003 1:44 am Post subject: |
|
|
Michaelb, I did what you asked me to, and it worked! I can chroot again, thank you. I shall now try what arkhan_jg suggested and come back with my feedback.
Thanks once again and cheers
Mohan |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Sat Apr 05, 2003 3:53 pm Post subject: |
|
|
OK, feedback time. My ethernet is a Windbond 840, but I found that I had included all network cards the previous time I did "make menuconfig". Anyway, this time I only included WinBond and did "make menuconfig", after that I ran the make dep and had problems.
Make dep resulted in the following:
make[2]: *** [ksyms.o] Error 1
make[2]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r2/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r2/kernel'
make[: *** [_dir_kernel] Error 2
And then it came back to the system prompt.
Cheers
Mohan |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Sun Apr 06, 2003 6:54 am Post subject: |
|
|
mdoss wrote: | dmesg returns 'command not found' and ifconfig only shows lo.
|
thats strange dmesg *should* work - try to locate it (usually /bin/dmesg) and give us the output of:
as for the failing 'make dep' - try to change the way u put the driver into the kernel - module or not module - if there is an '<M>' besides the driver it will be compiled as module if there is '<*>' besides it, it will be compiled into the core system... change it and recompile...
be sure to 'make clean' after every 'make dep' and do all the steps in correct order
Code: | cd /usr/src/linux
# make sure the symlink is to the latest sources
make menuconfig
# safe config to alternate name and to '.config'
make dep && make clean && make bzImage
make modules && make modules_install
# notice the undescore in the line above
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.20
# set up grub or lilo
reboot |
if the rc-script fails again - provide the output of 'dmesg | grep eth' and 'ifconfig eth0 up' _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Sun Apr 06, 2003 2:08 pm Post subject: |
|
|
Thank you slartibartfasz. I did not type /bin/dmesg, I only typed dmesg, maybe that was the problem. Anyway, I started the install from scratch again, onlythis time I started from Stage 3.
dmesg gives me an eth0 and an eth1 which is odd because I only have one ethernet in there. Like I said earlier, it is a WinBond 840.
Earlier when I started from Stage 2, I had put the driver in not as a module but built in. I shall be doing the same this time too, followed by make dep etc. I shall keep you all posted on my progress.
By the way I have a question: You mention:
make dep && make clean && make bzImage
make modules && make modules_install
However the install guide grom Gentoo suggests:
make dep && make clean bzImage modules modules_install
Plus you mention:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.20
whereas the install guide mentions:
cp arch/i386/boot/bzImage /boot
What is the difference (if any), especially concerning copying the boot image?
Thanks and cheers
Mohan |
|
Back to top |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Sun Apr 06, 2003 2:30 pm Post subject: |
|
|
no difference - its the same - as for the bootimage - thats just the way i name my kernels - u can copy it to 'you_better_work_faster_than_the_old_one' if u like - just be sure to configure your bootloader correctly _________________ To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be. |
|
Back to top |
|
|
mdoss n00b
Joined: 02 Apr 2003 Posts: 11
|
Posted: Sun Apr 06, 2003 4:28 pm Post subject: |
|
|
OK, feedback and frustration time again :)
I installed from scratch, this time starting from Stage3, followed all instructions to the letter, RTFMed every single option in "make menuconfig" before choosing to include in my compile, chose my correct eth0 and all other devices correctly.
The only difference this time was that (I have 2 hard disks) I chose to install /boot and swap on hdb1 and hdb2 respectively, using hda1 completely for /root.
I made /etc/fstab to reflect my correct drives and partitions for boot, swap and root, I made grub.conf to reflect my driveas and partitions correctly as follows:
title=Gentoo Linux
root (hd1,0)
kernel (hd1,0)/boot/bzImage root=/dev/hda1
Then when I remove the Gentoo CD and boot, I get:
GRUB Loading stage1.5
GRUB loading, please wait...
Error 17
Thank you all. I am grateful to everyone here for their patience and help and very happy to have been treated very well by everyone, but I am giving up. I am going back to a more idiot-oriented distro like Suse or Red Hat.
Thank you all and cheers
Mohan |
|
Back to top |
|
|
mjoswig Tux's lil' helper
Joined: 05 Feb 2003 Posts: 122 Location: Hamburg, Germany
|
Posted: Tue Apr 08, 2003 7:59 am Post subject: |
|
|
According to the documentation (info grub):
Quote: | 17 : Cannot mount selected partition
This error is returned if the partition requested exists, but the
filesystem type cannot be recognized by GRUB.
|
You should check the partition types.
And remember: Never give up, never surrender! |
|
Back to top |
|
|
|