On Monday 17 August 2009 15:15:39 Russell Stockhammer wrote:
> You can't "boot" into a sub-directory of a file system but you could do the
> following....
>
>
>
> 1) Configure grub to boot the kernel in the /mnt/lfs directory with the
> current root file system as a the root directory
>
> 2) Boot grub and pass the command "init=/mnt/lfs/bin/sh" this will run the
> LFS bash shell instead of the current/host init.
>
> 3) Once the kernel has booted and you are dropped into the shell run; "exec
> chroot /mnt/lfs exec /sbin/init".  This will chroot into the /mnt/lfs
> system and start init as if the kernel started it at boot.
>
>
>
> NOTE:  the "exec" is important because init -MUST- be run as PID 1.

You can create a stub executable placed in anywhere:

exec chroot /mnt/lfs exec /sbin/init

save it and pass it to the init parameter at the kernel

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to