-   Linux From Scratch (
-   -   entering blfs using chroot (

spiky0011 07-02-2012 05:08 PM

entering blfs using chroot

I might have to rebuild the kernel on a blfs system am I correct in using

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

from here
After mounting the partition and chapters 6.2.2 6.2.3
then rebuild kernel as per instructions

stoat 07-02-2012 08:26 PM

If the current kernel still boots, I would just compile a new kernel in the running system. Even if you're compiling the exact same kernel version again, you can give the new one a different local version number (e.g., -2 or whatever in "General setup" of menuconfig) so it will create its own folder in /lib/modules. If the new kernel works well, you can manually remove the old kernel if you want to (delete its stuff in /boot, /lib/modules, /usr/share/doc). Anyway, I do that routinely.

druuna 07-03-2012 06:38 AM

As already said by stoat: No need to use the chrooted environment.

Maybe this post will be of help: kernel place/build info

spiky0011 07-03-2012 08:04 AM

Hi I do look back at that post. But the proble is the system wont boot hence chroot.

druuna 07-03-2012 08:35 AM

If you cannot boot you do need a liveCD or use the chrooted environment from your original host.

Once you have a working kernel again, make sure you make an extra entry in grub that points to this working version. This way you have a working kernel to fall back on if you make a mistake in your current one.

This would be step 2 in the link I gave and add an entry that points to the entry.

All times are GMT -5. The time now is 04:01 PM.