kjell-e skrev:
1.Vad är det för linuxdistribution som du kör?
2.Anger du rätt fil till kärnan som argument till kärnan vid boot?
3.Vad och hur gör du för att skapa din initramfs?
1.gentoo
2.jag har satt argumentet vid boot av grub1 :
mybox hedmo # mount /dev/md127 /boot
mybox hedmo # cat /boot/grub/grub.conf
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
#
http://www.gentoo.org/doc/en/handbook/h ... #doc_chap2# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo
root (hd0,0)
kernel /boot/kernel-3.3.0-rc1-mm1 root=/dev/md3
initrd /boot/my-initramfs.cpio.gz
#video=radeonfb:1024x768-32@60
#iommu=on
title Gentoo1
root (hd0,0)
kernel /boot/kernel-3.3.0-rc1-mm1.noinit root=/dev/md3
#iommu=calgary
mybox hedmo # ls /boot
boot initramfs.igz kernel-3.3.0-rc1-mm1 lost+found
grub kernel-3.1.0-rc3-mm1 kernel-3.3.0-rc1-mm1.noinit my-initramfs.cpio.gz
mybox hedmo #
3.jag har gjort en ganska enkel init :
mybox initramfs # cat init
#!/bin/busybox sh
# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
# Do your stuff here.
echo "This script mounts rootfs and boots it up, nothing more!"
# Mount the root filesystem.
raidautorun /dev/md3
mount -o ro /dev/md3 /mnt/root
# Mount the devtmpfs filesystem
mount -t devtmpfs none /dev
# Mount my lvm`s
lvm vgscan --mknodes
lvm lvchange -aly vg/{distfiles,home,opt,portage,tmp,usr,var,vartmp}
# Clean up.
umount /proc
umount /sys
umount /dev
# Boot the real thing.
exec switch_root /mnt/root /sbin/init
rescue_shell() {
echo "Something went wrong. Dropping you to a shell."
busybox --install -s
exec /bin/sh
}
mount -o ro /dev/md3 /mnt/root || rescue_shell
mybox initramfs #
mybox initramfs # cp -a /sbin/lvm /usr/src/initramfs/sbin/
sistnämda commandot är ett exempel vad hag har kopierat över till min initramfs,och busybox(statisk).
när detta är gjort,kompilerasdes kärnan med initramfs stöd.packade och kopierade cpio-arkivet till /boot
m.v.h andy