Jump to content

Quick and Easy Kernel Compile Upgrade


ianw1974
 Share

Recommended Posts

Hi Ian!

I ve followed your instructions and now the cdrom is mounted automatically on /media/cdrom... :D BUT (he he he) I still can t acces it if I click on the cdrom icon in the "devices" section of my KDE Desktop, :wall:

 

Any Clue?

 

Stef

Link to comment
Share on other sites

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

You're going to have a hard time getting patches from older versions working ianw1974. Most

patches are extremely version version dependent, especially things like supermount which is somewhat invasive.

 

If mandrake is still including supermount in their kernels, you can get your hands on a copy by extracting the src.rpm.

 

iphitus

Link to comment
Share on other sites

Hi Ian!

I ve followed your instructions and now the cdrom is mounted automatically on /media/cdrom... :D BUT (he he he) I still can t acces it if I click on the cdrom icon in the "devices" section of my KDE Desktop, :wall:

 

Any Clue?

 

Stef

you cant access it using the cdrom icon on your desktop since that icon is still pointed to the entry in your fstab which uses supermount, so to access the cdrom drive, you have to open your file browser and browse into

.

/media/cdrom

.

or put a shortcut or link of it on your desktop, the side effect, under supermount, you can just right click on the cdrom icon then unmount it, now, in my box, there is no option to unmount it, I should have to eject the cd to unmount.

 

btw, when pointing the cdrom into /mnt/cdrom. it affected all the folder under /mnt, I can't see them anymore once autofs start, so I changed it to /mnt/media/cdrom ( same by doing /media/cdrom) and all works fine, cdburning now also works fine, The onyl thing I still have'nt tested is the floppy ..

Edited by aioshin
Link to comment
Share on other sites

Hi

 

Thanks Aishin, It does work perfectly now. The cd and DVD Writing and ISO creating works here too.

 

Thanks to all, really great howtos, please keep the link alive and help newbies like me to make the most of the kernel!

 

Stef

Link to comment
Share on other sites

That's funny, cos I can access my CD through my devices icon. I've changed /etc/fstab, so that my /dev/hdc is now /media/cdrom instead of /mnt/cdrom as it was previously.

 

Here is my stuff, so you can see all my config files relating to the cdrom configuration:

 

[ian@europa ~]$ cat /etc/modprobe.conf | grep autofs
alias autofs autofs4

[ian@europa ~]$ cat /etc/auto.master
#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc  /etc/auto.misc --timeout=60
#/smb   /etc/auto.smb
#/misc  /etc/auto.misc
#/net   /etc/auto.net
/media /etc/auto.cdrom

[ian@europa ~]$ cat /etc/auto.cdrom
cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

[ian@europa ~]$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/hda2 / reiserfs notail,noatime 1 1
/dev/hdc /media/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec,users 0 0
/dev/hda1 /mnt/windows ntfs umask=0,nls=iso8859-15,ro 0 0
none /proc proc defaults 0 0
/dev/hda3 swap swap defaults 0 0

 

and attached screenshot to prove the devices cdrom browsing.

Link to comment
Share on other sites

Hi There!

 

Since I compiled 2615 I have a few "symptoms" indicating threre are a few bugs in my config. Not quite sure what to do about it so I thought I d grep /var/log/messages and ask you all what's the situation.

Practically, I have a ~30% failed booting where the system just stops after the 10 first lines of verbose -> reset button and it all starts as if nothing happen (not even a filesystem check). Otherwise my cdrom still is not that perfect it seems it doen t want to mount /media/cdrom (normal if there in no cd in the drive isn t it?)

 

Code is a s folloW:

 

 
[root@linux-box stephane]# tail -500 /var/log/messages |grep failed
Mar 16 07:32:29 linux-box kernel: hda: IRQ probe failed (0xfffffcfa)
Mar 16 07:32:29 linux-box kernel: hdb: IRQ probe failed (0xfffffcfa)
Mar 16 07:32:29 linux-box kernel: hdb: IRQ probe failed (0xfffffcfa)
Mar 16 07:32:33 linux-box netfs: Mounting other filesystems:  failed
Mar 16 07:32:33 linux-box mandi: bind failed
Mar 16 07:32:33 linux-box mandi: mandi startup failed
Mar 16 07:32:36 linux-box sshd[4896]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Mar 16 07:32:49 linux-box mailman: python startup failed
Mar 16 07:32:57 linux-box kernel: cdrom: open failed.
Mar 16 07:32:57 linux-box automount[5966]: mount(generic): failed to mount /dev/cdrom (type iso9660) on /media/cdrom
Mar 16 07:32:57 linux-box automount[5966]: failed to mount /media/cdrom
Mar 16 07:33:41 linux-box smb: smbd shutdown failed

 

Thanks!

 

Stef

Link to comment
Share on other sites

mandi is failing because of the kernel, because it's probably patched for it. I mentioned this somewhere on page 1 of this whole post and how to get around this. Basically urpme mandi and shorewall, and then reinstall shorewall but do not use the interactive option and click cancel when prompted to install mandi-ifw.

 

The rest don't look like kernel problems. sshd is saying something else is already listening on port 22. use netstat -tan to check what is running. Bind could have failed because of a config option, this is normally the case when I've been using it. Try starting the services manually once your system is booted, and then see what errors you get for each one.

 

I can only suggest looking at the log files in more detail for more specific issues that might be the cause, not necessarily the kernel. Boot back to previous kernel, what version are you running prior to the upgrade?

Link to comment
Share on other sites

Waow! I have a new symtom doctor, what a plague I am!

 

Here we go : I can t start my diskdrake anymore!

[root@linux-box stephane]# diskdrake
mkdir: error creating directory /media/cdrom: No such file or directory
[root@linux-box stephane]# mkdir /media/cdrom
mkdir: cannot create directory `/media/cdrom': No such file or directory
[root@linux-box stephane]#

 

And Guess what? I don't have aclue what I 've done to deserve that!

 

I know it's probably not a pb of Kernel, but it is since I have gone to 2615 that I got that.

 

Any Idea?

 

Stef

:D

Link to comment
Share on other sites

Autofs causes this. If you stop the autofs service, you'll probably find it'll create the directory. I tried to manually create /media/cdrom and it gave the same error message.

 

It locks the /media directory so that nothing else can create the same directory names as it is using for it's automounting. When the service is stopped, of course, then the directory can be created.

Link to comment
Share on other sites

ok, as mentioned on my other post related to automount|autofs with a problem that it wont auto-unmount, now, I've tested it on my 2.6.15 kernel mounting cdrom with time-out of 10 sec., after not using the cdrom, it will now auto unmount it.. :P

 

Remove autofs then replace it by installing autofs from source .

.

from here:

http://www.kernel.org/pub/linux/daemons/autofs/v4/

.

and it fix the problem

 

Edit:

btw, with regards to mounting floppy if using entry below

floppy  -fstype=vfat,defaults,user,suid :/dev/fd0

it will not allow you to mount or open the floppy as a regular user, but you can as root only, using the entry below

floppy  -fstype=auto,sync,nodev,nosuid,gid=floppy,umask=002	 :/dev/fd0

allow a regular user to open it or mount it...

.

and after several seconds (as set in timeout say 6 seconds) it will auto unmount (should be) and a user may remove it without needing to manually unmount it

Edited by aioshin
Link to comment
Share on other sites

  • 2 weeks later...
Guest moriarty

Greetings to my fellow open source idealists.

I have come across a even easier way to upgrade the kernel, from the Mandriva Club and other Mandriva forums, I upgraded from 2.6.12-12mdk to 2.6.12-18mdk on a Mandriva 2006 power pack-Athlon XP system.This is not my own work as I am just at the begining of understanding of linux configuration :)

 

Step 1 Mandriva Kernel Update

 

There are a few steps to installing a new kernel that is released by Mandriva for the Mandriva Linux distribution. While it is certainly easier to install kernels now than it used to be, a few precautions will ensure that if you do have any difficulties with the new kernel, you can boot into the previous one.

 

x86 and amd64 Kernel Updates :

Open a terminal as root and update your urpmi sources: (# denotes su command in a terminal )

 

# urpmi.update -a

 

Read the advisory so you know what kernel version to install; for instance if the filename is

kernel-2.4.19.24mdk-1-1mdk.i586.rpm you will want to execute :

 

# urpmi kernel-2.4.19.24mdk

 

This will install the new kernel alongside any old kernels that are currently on your system.

Next, edit the /etc/lilo.conf or /boot/grub/menu.lst file (depending upon your bootloader). Ensure that you will be able to boot your old kernel by making sure a stanza exists for it specifically. If this is your first kernel update on the system, you likely will have two stanzas that point to symlinks; the kernel installer always updates these to point to the latest vmlinuz and initrd.img files. Usually a copy and paste of the new kernel stanza and modifying the kernel number is all you will need. For instance, if the new kernel is 2.4.19-24mdk and the release kernel is 2.4.19-16mdk, copy the -24mdk stanza and replace -24mdk with -16mdk.

If you use lilo, once you have modified your /etc/lilo.conf file, you must execute "lilo -v".

Grub users do not have to do anything extra. Now you can reboot into the new kernel.

 

(When I did this it automatically updated my lilo.conf and executed lilo)

 

PPC Kernel Updates :

The PPC kernel updates are virtually identical to the x86 updates, the only real difference is

that PPC uses yaboot for a boot loader, rather than lilo or grub. The file you need to edit is

/etc/yaboot.conf and, like x86 users, ensure there is a stanza for the old kernel so you can

easily boot into it again if you encounter problems.

On some older PPC distributions, you may need to manually create a new initrd image with USB

support for keyboards and mice. This can be done by executing, as root :

 

# mkinitrd --with=usb-ohci /boot/initrd-2.4.8-31.3mdk 2.4.8-31.3mdk

 

Of course, replace the kernel version with that of the kernel you just installed.

Finally, to commit the changes to the bootloader, execute "/sbin/ybin -v".

 

Step 2 DKMS

 

( All I did here, after Step1 & kernel-source upgrade, was uninstall all of my nvidia 7174 packages and installed dkms-nvidia 8174 package with MCC ,,then success :) )

 

Suppose you install a new kernel (because it has been updated) on your system. Usually, you need to install new versions of 3rd kernel drivers through the club. For example: the nvidia drivers. In the club downloads, you will find the different versions of nvidia-kernel in http://rpms.mandrakeclub.com/rpms/mandrake...86/NByName.html

However, this system has several disadvantages:

- one has to care about the kernel version he uses to install the correct version of the

nvidia-kernel (nvidia-kernel-enterprise, smp ?)

- it is difficult to maintain. For example, when the kernel is updated (e.g from 2.6.8.1-10mdk to 2.6.8.1-12mdk), it may take some time before you get the new version of the nvidia-kernel package (e.g. from nvidia-kernel-2.6.8.1-10mdk to nvidia-kernel-2.6.8.1-12mdk)

 

So there is now a new way that solves both issues : dkms (Dynamic Kernel Module Support Framework). A dkms package is specific to a module, but not to the kernel version. It is installed as usual (using Rpmdrake or urpmi), then it transparently compiles and installs the driver for your running kernel. Advantage : only one package to select (ex: dkms-nvidia) whatever kernel you are running. And when you update your kernel, you just need to uninstall/reinstall the package so that it is updated to your new kernel ! No need to wait for a new version ! Also, dkms comes with a /usr/bin/dkms program that allows you to uninstall/reinstall drivers without uninstalling/reinstalling packages.

 

Note : a dkms package replaces the modulename-kernel package series. You should not install any

modulename-kernel package, which is kernel version dependent. A dkms package is not

kernel-version dependent and will work for any kernel minor version. However, it may need other binary packages (e.g. ati-3.14.1 or nvidia-6111 packages for dkms-ati and dkms-nvidia, respectively), but these requirements will be solved as dependencies by the software installer Rpmdrake or urpmi.

 

However, there is just one small thing to do when you want to install the dkms modules : you need to install the kernel-source-2.x or the kernel-source-stripped-2.x package corresponding to your kernel (with x = 4 or 6 for 2.4 or 2.6). This dependency is automatically solved by the software installer though, when you want to install dkms. Another requirement are compilation tools (gcc and libraries), that would also be installed as dependencies when dkms modules packages are installed. People who installed Mandrakelinux with "Development" tools have these requirements already.

 

Also, when you update your kernel, you also need to update your kernel source, i.e. the kernel-source-2.x package, which is always available and is also taken care of by the auto-updating with Rpmdrake/urpmi. Then, you need to update your dkms drivers for the new kernel, either by uninstalling/reinstalling the dkms-modulename packages (not very academic, but easy), either by using the /usr/sbin/dkms tool (see man dkms for information about how to use it). EDIT : according to this excellent paper http://linux.dell.com/dkms/dkms-ols2004.pdf you need to use dkms --match to reinstall the same modules that you used with your old kernel on the new kernel.

 

A clarification : you don't compile a kernel at all ! dkms automatically compiles the specific driver, and it needs the kernel-source package to have the headers of the kernel (it is called compiling against the source of the kernel.) No technical skill about compilation is actually needed, basically it is just a package install operation. It is why compilation of a driver is specific to a kernel version. But the kernel is not compiled or reinstalled, it is untouched. Drivers are installed in 3rd party directory in the kernel modules directory.

 

As of today, there are dkms packages for:

 

dkms-aic79xx for the Adaptec AIC-7901 on-board controller

dkms-ati for ATI 3D graphical cards

dkms-ipw2100 for Centrino ipw2100 (in testing)

dkms-ipw2200 for Centrino ipw2200 (Buchan Milne's repository, see below)

dkms-ivtv for iTVC15/16 and CX23415/16 driver. These chips are commonly found on Hauppauge's

WinTV PVR-250 and PVR-350 TV capture cards.

dkms-lazyfs Lazyfs is a kernel module needed by the Zero Install system.

dkms-nvidia (club commercial only) for nVidia 3D graphical cards

dkms-slmodem (10.1 Official CD/DVD, club)

dkms-zaptel for the Zapata Telephony Interface

rt2500-dkms for the Ralink RT2500 802.11g chipset

dkms-fcusb2

dkms-fcdslusba

dkms-fcdslsl

dkms-fcpci

dkms-fxusb

dkms-hcfpcimodem

dkms-madwifi

dkms-unicorn

dkms-pwc Logitech and Philips webcams (Buchan Milne's repository, see below)

and more will be made available regularly.

 

Note 1: a lot of dkms packages are available on the Powerpack CD3, in the /media/dkms directory. 12/01/05: They have also been added to the club media.

 

Note 2: Another example of using dkms is presented by Buchan Milne, who is the major contributor of dkms in Mandrakelinux :http://forum.mandrakeclub.com/viewtopic.php?p=119002#119002

Here he shows the install of the pwc driver (Logitech/Philips webcam). He has also many dkms drivers, still in testing, there: http://plf.zarb.org/~bgmilne/dkms/ This FTP resource may be added as a urpmi media (see documentation, the knowledge base or my guide at http://www.zebulon.org.uk/ICML0.HTML ).

 

Note 3: dkms packages are in process of renaming from xxx-dkms to dkms-xxx, especially in cooker

(the development version of Mandrakelinux, that leads to the next stable release). Just make a

search in Rpmdrake or using urpmq -y dkms to see which dkms kernels are available in your media

and their names. Another on-line search engine is available there: http://rpms.mandrakeclub.com/

 

 

To summarise:

dkms-modulename replaces the set of modulename-kernel-xx packages that are specific to one

kernel. There is one dkms package per module, ex: dkms-nvidia, dkms-ati, dkms-slmodem, etc...

Other dependencies may be required, exactly like for modulename-kernel-xx (e.g. nvidia-kernel-xx also leads to install the binary proprietary nvidia-6111 driver package, so dkms-nvidia does. But don't worry, dependencies are automatically handled by the software installer, Rpmdrake or urpmi).

 

For illustration, just compare on CD3 of Powerpack 10.1 the content of /Drivers and /media/dkms : these are the dkms equivalents.

If you don't want or cannot compile on your machine, stick to the classic modulename-kernel-xx

set packages for 3rd party drivers. If you have the tools for compilation, try dkms packages (but note you don't need to have compilation skills, this is handled automatically during the package installation procedure, nor do have to compile the kernel itself).

 

Disadvantages:

- The kernel-source package corresponding to your kernel (2.6 or 2.4) has to be installed. It is a big package, needs space, but there is a lightweight version of this package, kernel-source-stripped-xx that contains everything you need to compile 3rd party drivers.

- Development tools must be installed, like the compiler gcc. Not very difficult with Rpmdrake

Smile

 

Advantages: they are huge:

no risk of error: there's only one package dkms-modulename per module to install, whatever kernel version is run

- in case of kernel update/change, no need to wait for the new modulename-kernel-xxx: reboot with new kernel, install of new kernel-source, reinstall the same dkms-modulename and it simply works

!

- it also works for "housemade" kernels.

 

Many thanks to all the developers who maintain the dkms packages and thanks to all working on the kernel

Link to comment
Share on other sites

I cant believe mandrake still use supermount. Ugh.

 

You ought to be able to get their patches, by grabbing a src.rpm for one of their kernels, and extracting that.

how does arch handle the pseudo filesystem?, or the removable media... or what's the equivalent of supermount on arch anyway?

Link to comment
Share on other sites

Greetings to my fellow open source idealists.

I have come across a even easier way to upgrade the kernel, from the Mandriva Club and other Mandriva forums, I upgraded from 2.6.12-12mdk to 2.6.12-18mdk on a Mandriva 2006 power pack-Athlon XP system.This is not my own work as I am just at the begining of understanding of linux configuration :)

...

We know about the urpmi kernel feature. The problem is the latest kernel is only 2.6.12 (regardless of .12, .15, .18 they are still 2.6.12).

 

This post was to use a more up-to-date kernel, 2.6.15, hence the manual creation, which was pretty easy and straightforward, apart from the fact that Mandriva heavily patch them, and we worked around these issues with autofs instead of supermount, etc, etc.

 

This post is useful for those who have new hardware, that's not supported by the urpmi kernels, and therefore allowing you to use Mandriva on your machine with the new kernel and the hardware that you can now use! :P

 

It probably wasn't clear, I suppose I should have explained why this method was being used instead of the so-simple urpmi kernel upgrade.

Link to comment
Share on other sites

how does arch handle the pseudo filesystem?, or the removable media... or what's the equivalent of supermount on arch anyway?

You gotta remember, that these automounting solutions are generic and could work on any distro. Arch by default does not setup any automounting. If you do want it though, you could use any of ivman, supermount, autofs, and others. There's a range in the repositories.

 

Under KDE and Gnome, their respective inbuilt automounting tools are enabled.

 

James

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...