неделя, 14 декември 2008 г.

slackware mkinitrd

mkinitrd - no big deal

!!! All options must be supplied, because mkinitrd change on the fly when create initrd image !!!

mkinitrd - first time to create tree

mkinitrd -c -L -f ext3 -r /dev/mapper/Sea1t-root -k 2.6.27 -k 2.6.27 -m ext3 - for My with LVM2

-c - remove old initrd
-L - LVM support - copy some LVM commands
-f - type of Root FS - look carefully for EXT3 some times mkfs do not create journal must be made on hand tune2fs -j /dev/... . This will brooke initrd if it's for root or other auto mount part.
-r - which part to use for rootfs only /dev/mapper/... is right
-k - load modules from /lib/modules/supplied by You argument - VERSION HERE/... !!! - if not supplied
-m - initrd try to load modules

mkinitrd get 'uname -r' which is wrong in most cases !!!

OPTIOPNS:
1. cat initrd /init to see for changes:
mount -o ro /dev/' Your root' /mnt
exit

This will boot Your System in not very proper way if something is wrong with initrd, and you stuck in prompt inside initrd.

2. initrd - can be chaged ot Fly with boot Live CD.

-See Blog for - Grub install and

- use:
mkdir 'some dir'
cd 'some dir'
gzip 'initrd image.gz'
cpio -id < 'initrd image'


This will unshrink image, edit
!!! mkinitrd ... with all options


!!! After many try i figured out that SELinux troubling boot with:
these Errors :

"Can't execute /bin/init"


"linux failed to execute /init"


"No init found"


and some strange errors like module for fs of main partitition isn't compiled in kernel.
!!!
DISABLE : Security options -> Enable different security models - or try SELinux :)

Няма коментари: