QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: satimis

Where to find initrd .img and

[复制链接]
发表于 2005-8-10 08:28:56 | 显示全部楼层
[quote:bf54ad8fec="satimis"]However I'm interested to learn blackwoft's method "let the hostsystem out of your harddisk and run LFS only".  How to make it.[/quote]
After the kernel is builded, you must copy the bzImage & System.map to /boot of LFS system(/mnt/lfs/boot). and run /etc/grub in chroot enviroment.
[code:1]grub> root (hd0,5)   # But very stronger you can not do this?? :?:
grub> setup (hd0)
grub> quit
[/code:1]
then edit the file /boot/grub/menu.lst of LFS system(/mnt/lfs/boot/grub/menu.lst) follow the LFS book. when you restart the PC, if you see a green grub menu, the grub of LFS is working and the hostsystem can be remove.
回复

使用道具 举报

 楼主| 发表于 2005-8-10 09:46:02 | 显示全部楼层
Hi blackwolf,

Tks for your advice.

Assuming your suggestion starting on FC3, the Host.  I shall perform following steps after starting FC3;
$ su
password
# export LFS=/mnt/lfs
# mount /dev/hda6 /mnt/lfs
# mkdir -p $LFS
# echo $LFS
/mnt/lfs

After the kernel is builded, you must copy the bzImage & System.map to /boot of LFS system(/mnt/lfs/boot).


# find /mnt/lfs/ -name System.map*[code:1]
/mnt/lfs/sources/linux-2.6.11.12/System.map
/mnt/lfs/boot/System.map-2.6.11.12[/code:1]
# ls /mnt/lfs/boot/[code:1]
config-2.6.11.12  grub  lfskernel-2.6.11.12  System.map-2.6.11.12[/code:1]System.map is already there

# find /mnt/lfs/ -name bzimage*
No output

Whether I have to run "make bzImage" ONLY on "linux-2.6.11.12" source directory to generate it also in chroot environment???  

Where bzimage will be generated, in which directory???

After finish then run
# ln -s /path/to/bzimage /mnt/lfs/boot/bzimage

and run /etc/grub in chroot enviroment.

Then continue
Enter chroot environment:
New chroot in Section After 6.62. Cleaning Up
http://www.linuxfromscratch.org/lfs/view/stable/chapter06/revisedchroot.html

# /usr/sbin/chroot "$LFS" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login

then run
# /etc/grub
and edit[code:1]grub> root (hd0,5) [ENTER]
grub> setup (hd0) [ENTER]
grub> quit [ENTER][/code:1]

then edit the file /boot/grub/menu.lst of LFS system(/mnt/lfs/boot/grub/menu.lst) follow the LFS book.

Whether you meant following
8.4. Making the LFS System Bootable
http://www.linuxfromscratch.org/lfs/view/stable/chapter08/grub.html

Create a “menu list” file defining GRUB's boot menu:[code:1]cat > /boot/grub/menu.lst << "EOF"
# 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,3)
kernel /boot/lfskernel-2.6.11.12 root=/dev/hda4
EOF[/code:1](Remark: I already completed this part previously, confirmed on my Notes)

and then run "The FHS stipulates that GRUB's menu.lst  file should be symlinked to /etc/grub/menu.lst. To satisfy this requirement, issue the following command:"[code:1]
mkdir /etc/grub &&
ln -s /boot/grub/menu.lst /etc/grub[/code:1]

when you restart the PC, if you see a green grub menu, the grub of LFS is working
How to get back/boot to FC3, the Host afterwards.

and the hostsystem can be remove.
You meant removing[code:1]title LFS 6.1 (2.6.11.12)
        root (hd0,5)
        kernel /boot/lfskernel-2.6.11.12 ro root=/dev/hda6 vga=795
[/code:1]from /etc/grub.conf of FC3, the Host

TIA

B.R.
satimis

P.S. with the grub.img floppy I can now boot straight to LFS 6.1
回复

使用道具 举报

发表于 2005-8-10 11:03:37 | 显示全部楼层
# ls /mnt/lfs/boot/ [code:1]
config-2.6.11.12  grub  lfskernel-2.6.11.12  System.map-2.6.11.12 [/code:1]
System.map is already there

you had copied the kernel and system.map to here.
[code:1]
# /etc/grub
grub> root (hd0,5) [ENTER]
grub> setup (hd0) [ENTER]
grub> quit [ENTER]
[/code:1]
Are you get any error here? if not, you are sucessed.
[code:1]
cat > /boot/grub/menu.lst << "EOF"
# 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,3)                                      # you must change here to root (hd0, 5)
kernel /boot/lfskernel-2.6.11.12 root=/dev/hda4       # and here to /dev/hda6
EOF
[/code:1]
You meant removing ...from /etc/grub.conf of FC3, the Host

you can remove the FC3 from your harddisk(remove the partition of FC3 if you want). Before you do this please make sure you can boot you PC with LFS grub (a green menu with only "LFS 6.1" when the PC startup and can get into LFS system by it).
回复

使用道具 举报

 楼主| 发表于 2005-8-10 12:02:24 | 显示全部楼层
Hi blackwolf

you had copied the kernel and system.map to here.
"lfskernel-2.6.11.12  System.map-2.6.11.12" are already there.  I could not find another kernel.

# find /mnt/lfs/ -name kernel[code:1]
/mnt/lfs/sources/linux-2.6.11.12/arch/alpha/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/arm/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/arm26/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/cris/arch-v10/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/cris/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/frv/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/h8300/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/i386/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ia64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ia64/sn/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/m32r/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/m68k/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/m68knommu/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/mips/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/parisc/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ppc/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ppc64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/s390/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sh/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sh64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sparc/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sparc64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/um/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/v850/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/x86_64/kernel
/mnt/lfs/sources/linux-2.6.11.12/kernel
/mnt/lfs/lib/modules/2.6.11.12/kernel[/code:1]

# find /mnt/lfs/ -name kernel -type d[code:1]
/mnt/lfs/sources/linux-2.6.11.12/arch/alpha/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/arm/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/arm26/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/cris/arch-v10/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/cris/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/frv/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/h8300/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/i386/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ia64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ia64/sn/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/m32r/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/m68k/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/m68knommu/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/mips/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/parisc/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ppc/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/ppc64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/s390/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sh/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sh64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sparc/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/sparc64/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/um/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/v850/kernel
/mnt/lfs/sources/linux-2.6.11.12/arch/x86_64/kernel
/mnt/lfs/sources/linux-2.6.11.12/kernel
/mnt/lfs/lib/modules/2.6.11.12/kernel[/code:1]
They are all directories.  Do I need symbolic linking bzimage to /mnt/lfs/boot/bzimage ???

[code:1]
# /etc/grub
grub> root (hd0,5) [ENTER]
grub> setup (hd0) [ENTER]
grub> quit [ENTER]
[/code:1]
Are you get any error here? if not, you are sucessed.
Yes, there was error[code:1]grub> root (hd0,5)

Error 21: Selected disk does not exist

grub> setup (hd0)      

Error 12: Invalid device requested

grub> quit[/code:1]I suggested to re-run these commands on "chroot environment" on my previous posting.

others noted with thanks.

My concern is how to get back to boot FC3 after the test???

TIA

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-10 19:21:40 | 显示全部楼层
Could you please explain further what is it.

1, Install the grub
http://www.linuxfromscratch.org/lfs/view/stable/chapter06/grub.html

2, Config the menu.lst
http://www.linuxfromscratch.org/lfs/view/stable/chapter08/grub.html

In my case , i just install the grub of lfs into the partition's mbr(hd0,x) not the main  mbr(hd0), and use the chainloader to switch the lfs's grub that is installed in the (hd0,x).

If you want to use the grub of lfs , just install to the main mbr, and finish the
menu.lst. that's all.  
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 17:02 , Processed in 0.045854 second(s), 13 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表