Making an initrd if you can't boot your installation?
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.
Making an initrd if you can't boot your installation?
Hi all, I have just bought an Acer Aspire One netbook and had no interest in using the pre-installed Linpus, so wanted to install Slackware. I did this and I didn't manage to get it to boot completely. It gets to saying "no new kernel modules found" (or something to that effect, can't check because I'm not near another box right now) and then appears to hang. I did wait quite a while before giving up (though perhaps that still wasn't long enough).
What I would like to try is the generic kernel, but obviously if I can't get my installation to boot, I can't make an initrd. I've installed Ubuntu for the time being and am wondering if it would be possible to "get into" my Slackware installation somehow (chroot?) so I can make an initrd. If not, is there anyway I can make an initrd on my other machine for this one (i.e. somehow fooling mkinitrd I guess). Any other suggestions for things I could do? I have seen this page about installing Slack on an AAO, but the problem is that the page has a load of yellow boxes where commands are meant to be :/.
Before the boot disk starts it will give instructions that go something like in case of emergency you can boot with this kernel. Follow those instructions to boot into your system and make your initrd.
Edit: I just noticed that you have over 5,000 posts. This makes me think that you must be more knowledgeable then me. So you must of thought of this already.
I know that when you boot from the CD, you can boot the system with a kernel, but I think that's just the huge kernel (though I'll see what it says anyway). Also, number of posts is irrelevant - I tend to answer relatively simple questions and there's lots I don't know!
I had some other thoughts for things to do: what if I could recompile the generic kernel, so I wouldn't need an initrd? If I could do that and then recreate the packages for the generic SMP kernel and the kernel modules, I could put the packages on my Ubuntu partition and use that when I select the source for packages when I install. I can't do an NFS install because my network card won't work without a newer kernel than 2.6.24.5. How would I go about rebuilding the kernel packages? Obviously I'd have to recompile the kernel source, but I'm guessing the whole package creation bit is a bit more involved than just running the SlackBuild script.
excerpt from 'CHANGES_AND_HINTS.TXT';
As stated earlier, it is recommended that you use one of the generic kernels
rather than the huge kernels; the huge kernels are primarily intended as
"installer" and "emergency" kernels in case you forget to make an initrd.
For most systems, you should use the generic SMP kernel if it will run,
even if your system is not SMP-capable. Some newer hardware needs the
local APIC enabled in the SMP kernel, and theoretically there should not be
a performance penalty with using the SMP-capable kernel on a uniprocessor
machine, as the SMP kernel tests for this and makes necessary adjustments.
Furthermore, the kernel sources shipped with Slackware are configured for
SMP usage, so you won't have to modify those to build external modules
(such as NVidia or ATI proprietary drivers) if you use the SMP kernel.
If you decide to use one of the non-SMP kernels, you will need to follow the
instructions in /extra/linux-2.6.24.5-nosmp-sdk/README.TXT to modify your
kernel sources for non-SMP usage. Note that this only applies if you are
using the Slackware-provided non-SMP kernel - if you build a custom kernel,
the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
correct kernel source so long as you don't (re)move it.
If you decide to use one of the huge kernels anyway, you will encounter
errors like this:
kobject_add failed for uhci_hcd with -EEXIST, don't try to register
These occur because the respective drivers are compiled statically into the
huge kernels but udev tries to load them anyway. These errors should be safe
to ignore, but if you really don't want them to appear, you can blacklist the
modules that try to load in /etc/modprobe.d/blacklist. However, make sure you
remove them from the blacklist if you ever decide to use th
I know that when you boot from the CD, you can boot the system with a kernel, but I think that's just the huge kernel (though I'll see what it says anyway). Also, number of posts is irrelevant - I tend to answer relatively simple questions and there's lots I don't know!
I had some other thoughts for things to do: what if I could recompile the generic kernel, so I wouldn't need an initrd? If I could do that and then recreate the packages for the generic SMP kernel and the kernel modules, I could put the packages on my Ubuntu partition and use that when I select the source for packages when I install. I can't do an NFS install because my network card won't work without a newer kernel than 2.6.24.5. How would I go about rebuilding the kernel packages? Obviously I'd have to recompile the kernel source, but I'm guessing the whole package creation bit is a bit more involved than just running the SlackBuild script.
Thanks.
The creation of a 'initrd' is not that difficult. You can create one from the examples in '/boot/README.initrd' or use 'mkinitrd_command_generator' by Alien_Bob.
As for the compiling of a custom kernel you should do a 'lspci -vv' on the new system to provide the means to know what is needed in the new kernel. You can always build a new kernel on another system and move the kernel along with the lib modules to the new system. I do this all the time, a little more work but doable.
You could do a usb install with 'SlackwareŽ 12.1 USB_Install', a USB Install using a USB Flash as the installer source.
These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
onebuck, I'm not really sure what information in CHANGES_AND_HINTS.TXT is helpful? The excerpt you posted doesn't really help me, but I'll go and look at the rest to see if there's anything useful there.
I know that making an initrd is not hard, the problem is I can't boot my system to make one in the first place. I also know how to compile a kernel normally, the problem here is doing everything correctly so I can recreate the packages. Can you offer any advice on this? Like I said in one of my other posts, I would like to recompile the generic kernel (really to make ext3 support built-in, rather than as a module), recreate the packages and then I can probably go from there. Re-read my first post in this thread..
You could try Eric's script to make a initrd. Why can't you boot? Try and pass parameters to the kernel. Which kernel(s) do you have installed?
A lot of people choose the installer kernel(s), as stated in the 'CHANGES_AND_HINTS.TXT' the user should use one of the generic kernels preferably the generic-smp even if a single processor.
Code:
excerpt from 'CHANGES_AND_HINTS.TXT';
As stated earlier, it is recommended that you use one of the generic kernels
rather than the huge kernels; the huge kernels are primarily intended as
"installer" and "emergency" kernels in case you forget to make an initrd.
For most systems, you should use the generic SMP kernel if it will run,
even if your system is not SMP-capable. Some newer hardware needs the
local APIC enabled in the SMP kernel, and theoretically there should not be
a performance penalty with using the SMP-capable kernel on a uniprocessor
machine,
Maybe I should underline the section, my fault. What boot errors are you getting? Post a little more information. Not speculative.
The easiest way would be to use the LiveCD/install cd1 to boot the system as if you were going to install.
After you get to the login then from the cli (command line);
Code:
~#mkdir /slacktemp #temporary mount point
~#mount /dev/your_device /slacktemp #this is the device you installed to
~#chroot /slacktemp #change to yours
~#cd /slacktemp/boot #change to directory
~#mkinitrd -c -k 2.6.24.5-smp -m ext3 -f ext3 -r /dev/hdb3
#/boot/README.initrd reference sample
#setup your parameters
The easiest way would be to use the LiveCD/install cd1 to boot the system as if you were going to install.
After you get to the login then from the cli (command line);
Code:
~#mkdir /slacktemp #temporary mount point
~#mount /dev/your_device /slacktemp #this is the device you installed to
~#chroot /slacktemp #change to yours
~#cd /slacktemp/boot #change to directory
~#mkinitrd -c -k 2.6.24.5-smp -m ext3 -f ext3 -r /dev/hdb3
#/boot/README.initrd reference sample
#setup your parameters
This is essentially exactly what I was asking for. I didn't know if chrooting would work. I did have several ideas about what to try, needed hints on how to implement them. If I can just boot the CD, log in, mount and chroot like you've posted then that's good enough (and will take less time than trying to do something else).
the boot hangs with a whole series of errors running in a loop which look like
Quote:
INIT: cannot execute "/sbin/agetty"
INIT: Id "c1" respawning too fast: disabled for 5 minutes
INIT: no more processes left in this runlevel
I am guessing here but I think this may have something to do with my installing Slackware on a jfs filesystem...? Maybe the huge-2.26.24.5 kernel does not have support for that filesystem compiled in...? Was I supposed to have chrooted over and run the mkinitrd script immediately after completing the setup/installer while the kernel I booted to install was still running? OK I didn't do that *slapping my forehead*
This is thin client hardware with no way to attach or boot from a CD/DVD drive so booting the installer again will be tough. Might there be any kernel options that I might be able to pass from the bootloader to boot the huge-2.26.24.5 kernel that I installed on the jfs filesystem without an initrd?
Last edited by valuequest; 11-10-2008 at 03:11 PM.
You don't need any special options to boot the huge kernels without an initrd, as they've got most important things compiled in (like filesystem support), rather than as modules.
I booted from the CD, mounted my root partition, did a chroot and then made an initrd. I'm now trying to boot with the generic kernel, but it's still taking a very long time. It gets to "Module dependencies up to date (no new kernel modules found)." and doesn't appear to be doing anything (this is exactly what happened before). If I plug a memory stick in, for example, I do get the usual kernel messages responding to that, so really it hasn't hung, but I don't know what's going on.
Try the apci=off parameter to the kernel. Another possible problem could be apic so pass the noapic. Once you get booted then you can diagnose the problem and start to step through.
My Gentoo-instinct on this would be to boot a LiveCD and chroot in to the installation and compile my own kernel in order to avoid initrd. With a reasonably standard system you only need to remember to compile in a handful of things into the kernel (like ext2 and ext3 fs support).
These are mostly based on Gentoo kernels, but there are some vanilla ones in there too. The netbook might require some additional tweaks in "make menuconfig".
I am guessing here but I think this may have something to do with my installing Slackware on a jfs filesystem...? Maybe the huge-2.26.24.5 kernel does not have support for that filesystem compiled in...?
I don't know about the errors you're getting, but the huge kernel does have support for JFS built in, so you don't need an initrd and shouldn't need to pass any options to the kernel.
Edit: about my problem: I will try turning ACPI off and with noapic as well. I also do want to chroot and compile my own kernel.. job for this weekend me thinks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.