LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Desperate help with compile - in middle of now (https://www.linuxquestions.org/questions/linux-newbie-8/desperate-help-with-compile-in-middle-of-now-93203/)

rberry88 09-15-2003 08:16 PM

Desperate help with compile - Drozz version
 
I'm following Drozz's "how to compile a kernel -> newbie" guide and I get to this part:

-------------------
Next remove existing initrd.img file:
rm -rf /boot/initrd.x.x.x.img

..And create the new one:
/sbin/mkinitrd /boot/initrd-x.x.x.img x.x.x
(Note: )
The last set of x.x.x is the eqivalent to your new kernel version and it looks to /lib/modules for that version.

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

when I put in the /sbin/mkinitrd /boot/initrd-linux-2.4.22.img linux-2.4.22 I get an error that says

/sbin/mkinitrd Can't create temp dir, exiting

I just did a clean install of SuSE 8.2 and am trying to install the linux-2.4.22 kernel.

Any help, I'm at this point right now but afraid to proceed without correcting this issue first.

rberry88:newbie:

rberry88 09-15-2003 11:08 PM

Let me guess, I'm the first person running SuSE 8.2 that has tried to compile their kernel using drOzz's tutorial and run into this problem???

rberry88

rberry88 09-15-2003 11:27 PM

Sorry to be a pest but is there someone that could help me get my correct kernel installed into my boot sequence so that it will boot properly. It appears I need to get my linux-2.4.22 kernel associated with my initrd . The big question is HOW???

rberry88

mdg 09-16-2003 02:14 AM

Just a guess here, but maybe directory /sbin/mkinitrd doesn't exist? You could try making it (mkdir /sbin/initrd) before the problematic step. It won't do any harm to the process.

rberry88 09-16-2003 02:24 AM

I tried that, it seems there is no mkinitrd in SuSE 8.2. There is a mk_initrd but it requires the use of both options -k and -i and I cannot figure out how to implement them in this line:

mk_initrd /boot/initrd-linux-2.4.22.img linux-2.4.22

this is the man mk_initrd, if someone could help I would appreciate it:

------------------------------------------------------
linuxxp:/home/rberry88 # mk_initrd -h
mk_initrd creates initial ramdisk images for booting linux
with enviroments which need loading modules before
mounting the root device (e.g SCSI controller)

mk_initrd [options] [root_dir]

options:
-h This Text.
-k "kernel list" list of kernel images for which initrd files
are created (relative to boot_dir)
defaults to "vmlinuz vmlinuz.shipped"
-i "initrd list" list of file names (relativ to boot_dir) for
the initrd; position have match to "kernel list"
defaults to "initrd initrd.shipped"
-m "module list" modules to include in initrd, defaults to
INITRD_MODULES variable in /etc/sysconfig/kernel
-b boot_dir boot dir, defaults to "/boot"
-d root_device root device, defaults to the device from which
the root_dir is mounted; overwrites the rootdev
enviroment variable if set
-s size Add splash animation and bootscreen to initrd.
-o file Add OEM resize support.
-t tmp_dir tmp dir, defaults to "/tmp"

root_dir: the directory the root partition is mounted to
defaults to "/"
linuxxp:/home/rberry88 #

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

rberry88

mdg 09-16-2003 02:27 AM

Sorry, I misunderstood your post. Disregard what I said before.

Quote:

when I put in the /sbin/mkinitrd /boot/initrd-linux-2.4.22.img linux-2.4.22 I get an error that says
The "linux-2.4.22" part looks unfinished. I use Mandrake, and the name of my kernel is linux-2.4.22-6mdk. I don't know what Suse calls it, but it shouldn't be hard to find

rberry88 09-16-2003 07:17 AM

The kernel file started as linux-2.4.22.tar.gz

Maybe this will help find where my problem is:

--------------------------------------------------------------
linuxxp:/home/rberry88 # uname -r
2.4.20-4GB-athlon
linuxxp:/home/rberry88 # cd /usr/src
linuxxp:/usr/src # ls -alc
total 35807
drwxr-xr-x 5 root root 200 2003-09-16 01:25 .
drwxr-xr-x 12 root root 344 2003-09-14 02:50 ..
drwxr-xr-x 2 root root 80 2003-09-15 18:20 kernelconfigs
lrwxrwxrwx 1 root root 12 2003-09-16 01:25 linux -> linux-2.4.22
drwxr-xr-x 18 573 573 864 2003-09-16 02:16 linux-2.4.22
-rw-r--r-- 1 rberry88 users 36627604 2003-09-15 19:37 linux-2.4.22.tar.gz
drwxr-xr-x 7 root root 168 2003-09-14 02:50 packages
linuxxp:/usr/src #
-----------------------------------------------------------

I'm really at my wits end trying to figure this out.

rberry88

BigBadPenguin 09-16-2003 08:45 AM

you're doing this as root right? Going back to the original error message, if it can't create a temp dir it might be a permissions problem. The name of the kernel is fine, what working directory are you issuing this command from?

rberry88 09-16-2003 09:41 AM

In Kde I hit the Konsole button on the taskbar at the bottom. I then type su and my root password. Then cd /usr/src/linux and then I try to type /sbin/mkinitrd /boot/initrd-linux-2.4.22 linux-2.4.22.

I'm starting to think that mkinitrd isn't a working command in SuSE 8.2 since there is no man page for it and when I type mkinitrd -h it gives me an error and says "try mk_initrd -h", which I do and get the help file as shown in my above post.

My question is : Has someone else that uses SuSE 8.2 been able to compile their kernel using this method or is there another method that will accomplish the same task?? I've read through the How-to's here, at TLDP, and at the Suse.com portal but none of them mention this step. They stop after the make modules_install and then the "cp /usr/src/linux/arch/i386/boot/bzImage /boot/" and the "cp /usr/src/linux/System.map /boot/" steps.

I do these but then it tells how to configure LILO but that is useless to me since I use GRUB. And in order to get my kernel installed so that I can use it to boot I need to make this initrd so GRUB knows what to boot and that there is actually something there.

whew, that is a lot. Any help is appreciated.

rberry88

rberry88 09-16-2003 03:17 PM

Patience is nice until my post falls to page two, then I get bumped.

rberry88 :)


All times are GMT -5. The time now is 09:37 PM.