Click to See Complete Forum and Search --> : Configuring the Kernel


kidsleep
07-25-2002, 05:36 PM
I just compiled the kernel 2.4.18 and everything has gone smooth enough yet when I boot into the new kernel during the bootup process it gives me an error of "can't mount wrong fs type, bad superblock or too many filesystems mounted" when trying to mount my windows partitions. I can still see them when it boots up, but they show to be empty.

I used make xconfig to configure the kernel, can someone point me to what needs changing to mount my win drives?

Thanks

Gaxus
07-25-2002, 06:19 PM
It sounds like you need to add 'vfat' filesystem support into your kernel....... that or you need to edit your /etc/fstab.....

File systems -------> <*>VFAT (Windows 95) fs support

kidsleep
07-25-2002, 08:28 PM
I've checked VFAT in xconfig but it's still having problems. Can anyone tell me if it is my fstab? or a least point me to a HOWTO or something?

Thanks

fancypiper
07-25-2002, 08:56 PM
Why not post your /etc/fstab for examination?

kidsleep
07-26-2002, 12:11 AM
My /etc/fstab reads like this:


/dev/hda8 / ext2 defaults 1 1

none /dev/pts devpts mode=0620 0 0

none /dev/shm tmpfs defaults 0 0

/dev/hda12 /home ext2 defaults 1 2

/dev/scd0 /mnt/cdrom auto user,iocharset=iso8859-1,umask=0,exec,codepage=850,ro,noauto 0 0

/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,umask=0,sync,exec,codepage=850,noauto 0 0

/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

/dev/hdb1 /mnt/win_c2 vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

/dev/hda5 /mnt/win_d vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

/dev/hda6 /mnt/win_e vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

/dev/hda7 /mnt/win_f vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

none /proc proc defaults 0 0

/dev/hda13 /share ext2 defaults 1 2

/dev/hda10 /usr ext2 defaults 1 2

/dev/hda11 /var ext2 defaults 1 2

/dev/hda9 swap swap defaults 0 0

---------------------------------------------------------------------------

I've also typed the EXACT commands I used to configure and compile the kernal here:


Steps I used

I started with kernel.tar.gz and unpacked in the /root directory

1)gzip -d kernel.tar.gz

2) tar -xvf kernel.tar

3) cd linux

4) make clean

5) make xconfig

6) I changed just the file systems (choosing yes for dos fs and VFAT fs)

7) make dep

8) make bzImage

9)cp arch/i386/boot/bzImage /boot/kernel-2.4.18

10) make modules

11) make install

12) make modules_install

13) I then edited my lilo.conf adding these lines:

image=/boot/kernel-2.4.18
label=newker
root=/dev/hda8
append=" hdc=ide-scsi devfs=mount quiet"
vga=788
read-only

14) lilo

15) I boot into my new kernel

slapNUT
07-26-2002, 08:00 AM
When you boot the new kernel and type uname -r does it say 2.4.18?

If you are using the new kernel then I would suggest you comment out all the lines in /etc/fstab with vfat in them and then one-at-a-time uncomment the line and try to mount the partition. See if you can localize the problem to one partition.

What does it tell you when you type cat /proc/filesystems?

If the above doesn't help then if you have a windows bootdisk try to mount that, mount /dev/fd0.

kidsleep
07-26-2002, 10:52 AM
OK, I typed uname -r and got a response of
2.4.18

So I'm using the new kernel

Also, my windows drives do show up in /mnt however they show up empty.

BTW, I checked my /proc/filesystems and got this:
------------------------------------------
nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev tmpfs
nodev pipefs
nodev binfmt_misc
ext2
vfat
iso9660
nodev nfs
nodev smbfs
nodev autofs
nodev devpts

--------------------------------------

Some of that may be misspelled because, don't laugh, since I can't save it to my windows partition, I took a pic of it with my dig. camera and it's kind of blurry.


Also, I checked /var/log/messages

and found that the file /lib/modules/2.4.18/modules.dep didn't exist. I checked /lib/modules and found the only directory was for the OLD kernel 2.4.8. There was no 2.4.18 directory. Could this be part(or all) of my problem. Did I do something wrong in the install?

Thanks for all your help.

fancypiper
07-26-2002, 11:13 AM
/usr/src/linux is a symbolic link, so you need to remove it and make a new one pointing to the new source or edit it so it points to the correct source directory.

kidsleep
07-26-2002, 11:45 AM
My /usr/src directory only had a directory called RPM in it. I installed the kernel in /root so would the new link point to /root/linux ? Thanks again

fancypiper
07-26-2002, 12:13 PM
You will have to look at it and see where it points.

The standard place for the source code of the kernel is /usr/src/linux-version and a symbolic link to the source directory is placed in /usr/src.

What I would do is place the symbolic link in /usr/src and point it to /boot/new-source-directory where ever you placed the new source.

Then cd /usr/src/linux and compile from there. after configuring, I use make dep && make clean bzImage modules modules_install and copy the bzImage to /boot (if you have a separate /boot partition, mount it before copying). Of course, rename your working kernel and adjust your bootloader so that you can choose between the new and old kernels jic.

mingshun
07-26-2002, 12:49 PM
Originally posted by kidsleep
My /usr/src directory only had a directory called RPM in it. I installed the kernel in /root so would the new link point to /root/linux ? Thanks again

That's not advisable.
Next time, always reserve your /usr/src for kernel compilation so
that if some hardware drivers screw up and you need to
download another program to fix it, it wouldn't complicate
matters.

slapNUT
07-26-2002, 07:59 PM
My /usr/src directory only had a directory called RPM in it. I installed the kernel in /root so would the new link point to /root/linux ? Thanks again

So all you need to do is:
ln -s /root/linux /usr/src/linux
Then do depmod -a

slapNUT
07-26-2002, 08:05 PM
Also, my windows drives do show up in /mnt however they show up empty.

Actually those are only mount points in the /mnt directory. They are always empty untill you mount a partition or device in them.

Also the vfat in /proc/filesystems is probably from the last kernel not the new one.

fancypiper
07-26-2002, 08:13 PM
/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

Your fstab entry does look peculiar. Here is my entry for a vfat (fat32) partition that I mount/unmount myself rathar than have them mount automatically./dev/hdb1 /mnt/winc vfat user,exec,dev,suid,rw,noauto,uid=500 0 0

kidsleep
07-26-2002, 09:29 PM
Thanks for all your help guys, I really appreciate it.

I looked in my /boot directory and System.map is still pointing to a file associated with the old kernel. The same goes for a config file. (Sorry for the vagueness, with the new kernel I can't save the files onto my windows partition to post it.)

Is there a system.map file that is for the new kernel that I should use?

If my /proc/filesystems is from the old kernel, how do I see it for th4e new kernel?

Also, I do a lsmod and it returns nothing.

I do notice that when I'm compiling the kernel and do

make modules

I get alot of "Nothing to do in directory xxx" or something like that.

Once again guys, Thanks a million. I'm really learning alot!!

slapNUT
07-26-2002, 09:49 PM
I do notice that when I'm compiling the kernel and do

make modules

I get alot of "Nothing to do in directory xxx" or something like that.
Thats because you haven't done a make clean since the last make modules, but thats OK! Don't do a make clean as there is no need to remake the modules again unless you patch the kernel or somehow change the kernel-sources.

Did you make the symlink to /usr/src/linux -> /root/linux and do depmod -a?

cp /usr/src/linux/System.map /boot/System.map-2.4.18
ln -fs /boot/System.map-2.4.18 /boot/System.map
Should fixup the system map.

kidsleep
07-26-2002, 10:32 PM
I GOT IT!!!!!!!!!!!

I edited my /etc/fstab and replaced the lines like this:

/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

with this:

/dev/hda1 /mnt/win_c vfat 0 0

I'm such a stupy!

I should've done that in the first place

:confused:

OH well,

THANK YOU GUYS!!!!!!!

I'm forever in your debt.


One last thing though,

When I'm running the default install kernel, it boots into a nice looking gui telling me what's going on. But my newly compiled kernel shows a text based boot. How do I get my new kernel to boot the nice gui?


THAnks again guys!

slapNUT
07-27-2002, 09:40 PM
I GOT IT!!!!!!!!!!!

I edited my /etc/fstab and replaced the lines like this:

/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,umask=0,codepage=850 0 0

with this:

/dev/hda1 /mnt/win_c vfat 0 0

I'm such a stupy!

I should've done that in the first place
Well actually no one else thought of that either. I have always wondered why Mandrake uses codepage=860,iocharset=iso8859-1 when the recommended way to mount vfat is utf8,codepage=437. :confused:

VFAT MOUNT OPTIONS (http://www.linuxhq.com/kernel/v2.0/doc/filesystems/vfat.txt.html)

Or maybe that document is outdated but just for kicks I compiled 2.4.18 and used codepage=860,iocharset=iso8859-1 in fstab and guess what? Right corrupted... too many mounted... etc...etc...

So then I changed it to utf8,codepage=437 and guess what? It mounts fine.

/me makes a mental note: Mount vfat utf8,codepage=437

slapNUT
07-27-2002, 09:55 PM
Well now I know it's in File systems under Native Language Support.

/me makes a mental note: Always check Native Language Support when compiling a kernel.