LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 07-02-2012, 04:08 PM   #1
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
entering blfs using chroot


Hi

I might have to rebuild the kernel on a blfs system am I correct in using
Code:
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
 
Old 07-02-2012, 07:26 PM   #2
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 464

Rep: Reputation: 133Reputation: 133
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.

Last edited by stoat; 07-02-2012 at 07:36 PM.
 
Old 07-03-2012, 05:38 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

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

Maybe this post will be of help: kernel place/build info
 
Old 07-03-2012, 07:04 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Original Poster
Rep: Reputation: 226Reputation: 226Reputation: 226
Hi I do look back at that post. But the proble is the system wont boot hence chroot.
 
Old 07-03-2012, 07:35 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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 vmlinuz.xyz.org entry.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
uname -r in chroot and blfs mariogarcia Linux From Scratch 1 08-13-2007 08:24 AM
Info : not good to BLFS in chroot ... biniou Linux From Scratch 2 05-22-2007 02:55 AM
enter chroot for blfs rikpotts Linux From Scratch 3 03-02-2006 12:01 PM
Problem entering chroot environment. mullog Linux From Scratch 1 06-05-2004 08:12 AM
Is it ok to install the blfs as chroot? Zero-0-Effect Linux From Scratch 2 03-29-2004 07:37 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration