LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-09-2008, 04:08 AM   #1
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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 :/.

All suggestions appreciated!
 
Old 11-09-2008, 05:47 AM   #2
empcrono
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 104

Rep: Reputation: 15
Boot the Slackware install disk,

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.

Last edited by empcrono; 11-09-2008 at 05:49 AM.
 
Old 11-09-2008, 06:06 AM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
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.
 
Old 11-09-2008, 08:45 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 10,883
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
Hi,

There's some information in the 'CHANGES_AND_HINTS.TXT';

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, 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
 
Old 11-09-2008, 08:55 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 10,883
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
Hi,
Quote:
Originally Posted by Nylex View Post
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!
 
Old 11-09-2008, 11:10 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
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..

Last edited by Nylex; 11-09-2008 at 12:06 PM.
 
Old 11-09-2008, 01:06 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 10,883
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
Hi,

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
You should now be able to re-boot your system.
 
Old 11-09-2008, 01:15 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by onebuck View Post
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).

Thanks!

Last edited by Nylex; 11-09-2008 at 01:19 PM.
 
Old 11-10-2008, 08:41 AM   #9
valuequest
LQ Newbie
 
Registered: Sep 2006
Posts: 12

Rep: Reputation: 0
OK I installed the huge-2.26.24.5 kernel on a jfs filesystem. So now if I try to boot the huge-2.26.24.5 kernel that I installed with
Quote:
kernel /boot/huge-2.26.24.5 noinitrd ro root=/dev/hda1
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 02:11 PM.
 
Old 11-10-2008, 10:37 AM   #10
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
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.
 
Old 11-12-2008, 02:48 AM   #11
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
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.
 
Old 11-12-2008, 08:44 AM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 10,883
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
Hi,

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.
 
Old 11-12-2008, 09:20 AM   #13
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
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).

I have found this site useful:
http://62.3.120.141/~pappy/

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".

Mons
 
Old 11-12-2008, 12:09 PM   #14
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by valuequest View Post
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.

Last edited by Nylex; 11-12-2008 at 12:11 PM.
 
Old 11-13-2008, 02:36 AM   #15
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
Update: I'm not getting any further after trying apci=off and noapic, so I think I'm going to have to try compiling a kernel.
 
  


Reply

Tags
acer, aspire


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
making a linux boot disk (busybox initrd issue) win32sux Linux - Software 3 10-01-2006 08:09 PM
Making an initrd for a squashfs steveo_mcg Linux - General 1 09-12-2006 10:06 AM
how to use initrd for making RAMdisk Boudewijn Debian 1 12-08-2004 03:34 AM
making an initrd file lyonsd Linux - General 4 03-14-2004 06:26 AM
Problem when making an installation boot CDROM... Alf829 Linux - General 3 02-17-2004 02:41 PM


All times are GMT -5. The time now is 12:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration