my /init script is running now, but I got '/bin/sh: can't access tty;
job control turned off' error. I google a lot, and I think it would
relate with my HD. When this error occurs, I got a simple shell. I
tried 'lvm vgscan' in that shell, and it cannot find my lvm. I copied
my block devices with:
cp -a /dev/hda /usr/src/initramfs/dev
cp -a /dev/hda1 /usr/src/initramfs/dev
cp -a /dev/hda2 /usr/src/initramfs/dev

what I missed?


On Sat, Jun 27, 2009 at 8:55 PM, David Shen<davidshe...@googlemail.com> wrote:
> thanks a lot
>
>
> On Sat, Jun 27, 2009 at 7:49 PM, Dirk Heinrichs<dirk.heinri...@online.de> 
> wrote:
>> Am Samstag 27 Juni 2009 10:25:11 schrieb David Shen:
>>
>>> yep, i'd like to learn from your script.
>>
>> OK, here you are.
>>
>>> BTW, I also put my initramfs into a separate partition /boot.
>>
>> Seems you misunderstood. I don't use an initramfs anymore, /boot _is_ my
>> initramfs replacement. Whatever you put into an initramfs can as well be put
>> into /boot.
>>
>> I've attached both set of scripts, just choose the one you like more.
>>
>> mkinitfs_script.tar.bz2 contains the script to put stuff to /boot, while
>> mkinitramfs_script.tar.bz2 contains the script to create an initramfs for use
>> inside the kernel (kernel+initramfs will be one file).
>>
>> In both cases, you should adapt the /etc/mkinit*fs/config file to your needs,
>> just adapt the list of executables you need/want in your init*fs and run the
>> desired script.
>>
>> The mkinitramfs.sh script will put everything into /usr/src/initramfs. You
>> should configure this in your kernel config so that the kernel build system 
>> can
>> create the image for you.
>>
>> The other one will put everything into /boot.
>>
>> Out of the box, the resulting fs will be suited for accessing / from a 
>> logical
>> volume which may optionally be encrypted using LUKS. The init script will 
>> find
>> out at boot time wether the LV is encrypted and will run cryptsetup to prompt
>> for a password.
>>
>> Finally, you need to adapt your bootloader, depending on which approach you
>> choose:
>>
>> initramfs: realroot=/dev/vg/root  (* NO root=, because that's the initramfs).
>>
>> initfs: You'll need both root=/dev/sda1, which should be your /boot, 
>> realroot=
>> as above and rw (this is important).
>>
>> BTW: Newer kernels also have a configuration option for this: CONFIG_CMDLINE.
>>
>> In case of further questions, just send a mail.
>>
>> Bye...
>>
>>        Dirk
>>
>
>
>
> --
> Best Regards,
> David Shen
>
> http://twitter.com/davidshen84
>



-- 
Best Regards,
David Shen

http://twitter.com/davidshen84

Reply via email to