satimis 发表于 2005-8-5 07:21:14

Where to find initrd .img and

Hi folks,

Installation of LFS 6.1 has been finished.Now I'm going to edit /etc/grub.conf of the FC3 Host making dual boot at starting the PC.

I found LFS Kernel = lfskernel-2.6.11.12

Under
The path to the kernel image........
On 8.3. Linux-2.6.11.12
http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html

Where can I find its initrd .img and the kernel parameter.

TIA

B.R.
satimis

druggo 发表于 2005-8-5 09:19:01

use mkinitrd to create.

blackwolf 发表于 2005-8-5 09:28:01

the initrd.img is not needed for LFS. In this section, the initrd is for your host system. the initrd can be found in the /boot of you host system.
you can find it by:
#cd /mnt
#mkdir hostroot
#mount /dev/hda3 /mnt/hostroot          (change /dev/hda3 to the root filesystem of you host system)
#cd hostroot
#cd boot
#ls
you can find the file kernel-..., and initrd-...
then:

#cat >> /boot/grub/menu.lst << "EOF"
>title Red Hat
>root (hd0,2)                     (change hd0,2 to you hostsystem's root)
>kernel /boot/kernel-2.4.20 root=/dev/hda3      (change /dev/hda3 to you hostsystem's root, kernel-2.4.20 to the filename you found in previous step)
>initrd /boot/initrd-2.4.20   (change initrd-2.4.20 to the filename you found in previous step)
>EOF

blackwolf 发表于 2005-8-5 09:28:22

the initrd.img is not needed for LFS. In this section, the initrd is for your host system. the initrd can be found in the /boot of you host system.
you can find it by:
#cd /mnt
#mkdir hostroot
#mount /dev/hda3 /mnt/hostroot          (change /dev/hda3 to the root filesystem of you host system)
#cd hostroot
#cd boot
#ls
you can find the file kernel-..., and initrd-...
then:

#cat >> /boot/grub/menu.lst << "EOF"
>title Red Hat
>root (hd0,2)                     (change hd0,2 to you hostsystem's root)
>kernel /boot/kernel-2.4.20 root=/dev/hda3      (change /dev/hda3 to you hostsystem's root, kernel-2.4.20 to the filename you found in previous step)
>initrd /boot/initrd-2.4.20   (change initrd-2.4.20 to the filename you found in previous step)
>EOF

satimis 发表于 2005-8-5 17:24:37

Hi blackwolf,

Tks for your advice.

Hereunder is /etc/grub.conf of the FC3 Host
#boot=/dev/hda
default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
# hiddenmenu
title Fedora Core (2.6.12-1.1372_FC3)
      root (hd0,0)
      kernel /vmlinuz-2.6.12-1.1372_FC3 ro root=LABEL=/ rhgb quiet
      initrd /initrd-2.6.12-1.1372_FC3.img
title Fedora Core (2.6.11-1.35_FC3)
      root (hd0,0)
      kernel /vmlinuz-2.6.11-1.35_FC3 ro root=LABEL=/ rhgb quiet
      initrd /initrd-2.6.11-1.35_FC3.img
I'm going to add LFS kernel here so that LFS can be booted if selected at start#boot=/dev/hda
default=0
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
# hiddenmenu
title Fedora Core (2.6.12-1.1372_FC3)
      root (hd0,0)
      kernel /vmlinuz-2.6.12-1.1372_FC3 ro root=LABEL=/ rhgb quiet
      initrd /initrd-2.6.12-1.1372_FC3.img
title Fedora Core (2.6.11-1.35_FC3)
      root (hd0,0)
      kernel /vmlinuz-2.6.11-1.35_FC3 ro root=LABEL=/ rhgb quiet
      initrd /initrd-2.6.11-1.35_FC3.img
title LFS (lfskernel-2.6.11.12)
root (hd0,5)
kernel /lfs_kernel ro root=/dev/hda5 lfs_kernel_parameter
initrd /lfs_initrd.img
LFS is on /dev/hda6

Please advise where can I find those information, lfs_kernel, lfs_kernel_parameter, etc.   Is it the information of LFS or the FC3 Host.

TIA

B.R.
satimis

blackwolf 发表于 2005-8-7 11:39:30

For the LFS, after you compile the kernel, you must copy the kernel... from your source directory to /boot(/mnt/lfs/boot).
cp arch/i386/boot/bzImage /boot/lfs_kernel
cp System.map /boot/System.map
cp .Config /boot/Config

then in the grub.conf, add

title LFS (lfskernel-2.6.11.12)
root (hd0,5)
kernel /boot/lfs_kernel ro root=/dev/hda6

satimis 发表于 2005-8-7 19:26:03

Hi blackwolf,

Tks for your advice.

For the LFS, after you compile the kernel, you must copy the kernel... .I completed follows;

8.3.1. Installation of the kernel
cp arch/i386/boot/bzImage /boot/lfskernel-2.6.11.12
cp System.map /boot/System.map-2.6.11.12
cp .config /boot/config-2.6.11.12

I left out running "chown -R 0:0 on the linux-2.6.11.12 directory".Whether it matters?

then in the grub.conf, add........ Then I manually edited /mnt/lfs/etc/grub.conf

adding:
title LFS 6.1 (2.6.11.12)
      root (hd0,5)
      kernel /boot/lfskernel-2.6.11.12 ro root=/dev/hda6 vga=795I think this step should be mentioned on LFS 6.1 book.I could not discover it.

B.R.
satimis

linky_fan 发表于 2005-8-7 21:51:49


I left out running "chown -R 0:0 on the linux-2.6.11.12 directory". Whether it matters?

NO matter.

I think this step should be mentioned on LFS 6.1 book. I could not discover it.

http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html

This page and the next page.

satimis 发表于 2005-8-7 22:38:23

Hi linky_fan

<snip>

http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html

This page and the next page.I went through both pages.From my Notes it indicates;grub> root (hd0,5) [Enter]

Error 21: Selected disk does not exist

grub> setup (hd0) [Enter]

Error 12: Invalid device requested

grub> root

Tab no functionThere was problem here unsolved.The HD is connected to Primary IDE as master withoug SLAVE attacehed to its cable.Therefore I havc to edit /mnt/lfs/etc/grub.conf manually.

B.R.
satimis

blackwolf 发表于 2005-8-8 08:56:54

type "root (hd0, " and press Tab, you can see all the partition of hd0, and make sure you select the correct partition of the LFS.

satimis 发表于 2005-8-8 09:22:46

Hi blackwolf,

type "root (hd0, " and press Tab......Sorry, no output.I tried before as;

root(pressing TAB, no output)
root (hd(pressing TAB, no output)
root (h(pressing TAB, output=(hd)

On my previous post, I posted
"The HD is connected to Primary IDE as master without SLAVE attacehed to its cable."

which was just for your information, if suspecting cable connection problem.

On searching Internet I found postings concerning this problem but without solution and the threads just hanging there.

B.R.
satimis

blackwolf 发表于 2005-8-8 10:58:40

In my PC, One harddisk, One cdrom, One FD,
grub>root (       (press TAB)
Possible disks are:   fd0, hd0
grub>root (hd0,   (press TAB)
Possible partitions are:
      Partition num: 0 ,Filesystem type is ext2fs, partition type 0x83
      Partition num: 1 ,Filesystem type unknown, partition type 0x82
grub>root (hd0,0)

I'm sorry I have a mistake on
For the LFS, after you compile the kernel, you must copy the kernel... from your source directory to /boot(/mnt/lfs/boot).
cp arch/i386/boot/bzImage /boot/lfs_kernel
cp System.map /boot/System.map
cp .Config /boot/Config

then in the grub.conf, add

title LFS (lfskernel-2.6.11.12)
root (hd0,5)
kernel /boot/lfs_kernel ro root=/dev/hda6

It must be /boot/grub/menu.lst but not grub.conf, sorry.

satimis 发表于 2005-8-8 11:21:42

Hi blackwolf,

In my PC, One harddisk, One cdrom, One FD,........
Tried as follows on FC3 Host;

# grub
GNU GRUBversion 0.95(640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported.For the first word, TAB
   lists possible command completions.Anywhere else TAB lists the possible
   completions of a device/filename.]

grub> r(pressed TAB)
Possible commands are: read reboot root rootnoverify

grub> root (pressed TAB)
Possible commands are: root rootnoverify

grub> root

.......It must be /boot/grub/menu.lst but not grub.conf.On FC3 Host
# mount /dev/hda6 /mnt/lfs
# cat /mnt/lfs/boot/grub/menu.lst# Begin /boot/grub/menu.lst

# By default boot the first menu entry.
default 0

# Allow 30 seconds before booting the default.
timeout 30

# Use prettier colors.
color green/black light-green/black

# The first entry is for LFS
title LFS 6.1
root (hd0,5)
kernel /boot/lfskernel-2.6.11.12 root=/dev/hda6
title Windows
rootnoverify (hd0,0)
chainloader +1
I did not performed this step.Is it mentioned somewhere.

Tks

B.R.
satimis

blackwolf 发表于 2005-8-8 11:34:27

what happend when you type "root (" and press TAB?

satimis 发表于 2005-8-8 11:41:43

what happend when you type "root (" and press TAB?grub> root (hd0,

B.R.
satimis
页: [1] 2 3
查看完整版本: Where to find initrd .img and