Messed Slackware after attempt to compile new kernel
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Messed Slackware after attempt to compile new kernel
So I was into experimenting on how to compile a kernel.
1. downloaded linux-2.6.29.3.tar.bz2 from kernel.org
2. cp ./linux-2.6.29.3.tar.bz2 /usr/src
3. tar -xvjf linux-2.6.29.3.tar.bz2
4. cd /linux-2.6.29.3
5. make clean
6. cp ../linux-2.6.27.7/.config ./
7. make menuconfig (loaded the .config which was copied)
8. make && make install
9. make bzImage
10. cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.29.3-CUSTOM
11. edited /etc/.conf
12. restarted
Then I got a tazmanian devil instead of tux in the bootloading.
Then booting stopped, with my keyboard caps lock and other lights blinking.
Next,
Booted the DVD installer, deleted, /boot/vmlinuz-2.6.29.3-CUSTOM /usr/src/linux-2.6.29.4 and /lib/modules/2.6.29.3 in an attempt to go back to my working kernel.
mounted /dev/sda5 (my /) to /mnt/
mounted /dev/sda1 (my /boot) to /mnt/boot
chroot /mnt
/sbin/lilo -b /dev/sda1
got 5 warnings, then restarted my PC.
I still got the tazmaninan devil instead of Tux, them here is the error
List of all partitions:
No filesystem could mount root, tried: romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,5)
Is your /etc/lilo.conf pointing to the right (original) kernel?
Try configuring it to use the 'huge' kernel, normally called /boot/vmlinuz (actually a soft link).
With the huge kernel it should boot fine, then you can start playing around again
Is your /etc/lilo.conf pointing to the right (original) kernel?
Try configuring it to use the 'huge' kernel, normally called /boot/vmlinuz (actually a soft link).
With the huge kernel it should boot fine, then you can start playing around again
Ok, I will boot from the DVD installer,
mount my drives in /mnt/ and chroot to /mnt,
One more thing. What could have happened or was there something i did that make the new compilation not work?
Well this were the steps I made
1 downloaded linux-2.6.29.3 to /usr/src
2. copied a working .config from the default 2.6.27 kernel to /usr/src/linux-2.6.29.3
3. make clean
3. make menuconfig (and loaded the .config which was copied)
4. make && make install
5. make bzImage
6. copied the bzImage to /boot/vmlinuz-2.6.29.3
7. Edited lilo and entered an entry for the new kernel.
8. Restarted, then freeze
Are there any steps which I didnt make? what other steps for me to take or commands to execute to have a new kernel. Is the making of initram the next step? How?
I *think* the problem lies in the config file you picked.
It was probably from the "generic" kernel, not the "huge" kernel.
The generic kernel is lighter and better for day-to-day use, but does not include all the modules (especially the file-system modules needed to mount ext3 / ext4 / reiser partitions etc.).
So you can go two ways:
1) use the config file from the huge kernel as a basis to configure your own kernel (copy from /boot/config-huge-smp-2.6.27.7-smp)
2) build as you did before, but you will need to create an initial ram disk (initrd). Use these steps before rebooting:
Code:
cd /boot
mkinitrd -c -k 2.6.29.3-CUSTOM -m jbd:ext3 -f ext3 -r /dev/sda5 # change ext3 if you use another file system, like ext4, reiserfs etc.
The -o option defines the output file, where you replace <yourversion> with whatever you want, like the -CUSTOM tag.
Don't forget to change the 'initrd = /boot/initrd.gz' likewise in your lilo.conf
You don't need an initrd if you built-in the filesystem modules.
ok, if jemate18 accepts an extra exercise...
This would be done as follows:
- when in make menuconfig, go to the file systems sub-menu and change "ext3" from "M" (built as Module) to "*" (Built in).
Then compile normally and you won't need to make an initrd.
The 'jbd' module is automagically selected by the menuconfig script to be built in as well.
@H_TeXMeX_H: I didn't mention the option to build in the modules, as jemate18 is a new user and I think it is good to understand the basic process of making an initrd, changing lilo.conf, etc.
But, we're talking Slackware here - it is even better to always take it up to the next level
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.