LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 10-30-2012, 05:30 PM   #1
erkant
Member
 
Registered: Oct 2012
Posts: 51

Rep: Reputation: Disabled
error: no file found


I want to create a minimal LFS project, that is composed of Grub, Bash and Kernel. I have already dual-booted my laptop with Windows 7 and Linux Ubuntu. So I have 4 primary partitions, from which first two are for Windows 7 and the other one is for Ubuntu. I also have another primary extended partition, in which I have 3 other partitions, one swap for Linux, and two other with 1GB (sda6) and 4GB (sda7) free spaces, which are both ext3.

I downloaded bash-4.2 and linux-3.5.2. I put them in /usr/src, I did "./configure", "make", "make install" to bash, and then finally "ln -vs bash /mnt/lfs/bin" (please note that all my files and directories for LFS are located in my /mnt/lfs directory). Then I checked the libraries for bash using "ldd ./bash", and also copied them to /mnt/lfs/lib directory. Then I configured my kernel, and created a bzImage. Then I moved and renamed my .config file and bzImage to /mnt/lfs/boot and named them .config-3.5.2 and vmlinuz-3.5.2-lfs-7.2 respectively. Because I already have my grub under /boot/grub in my original Linux Ubuntu, I just edited that grub.cfg file and included those lines:

menuentry 'GNU/Linux, Linux 3.5.2-lfs-7.2' {
set default=0
set timeout=5

insmod part_msdos
insmod ntfs
insmod ext2

set root='(hd0,msdos6)'
echo 'Loading LFS...'

linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 rootdelay=7
}

Please note that I want to mount my LFS project to my 1GB ext3 partition, which is my /dev/sda6 partition. Finally I mounted my partition using those commands:

expot LFS=/mnt/lfs
mkdir -pv $LFS
mount -v -t ext3 /dev/sda6 $LFS

And when I restarted my laptop, I had my new menuentry under my Grub. But the point is that when I try to boot from it, I get the following things:

Loading LFS...
error: file not found

If someone can tell me what can be the problem, and how can I fix it with step by step guide I would be glad, while I'm not very much experienced in Linux.

Last edited by erkant; 10-30-2012 at 05:33 PM.
 
Old 10-30-2012, 07:35 PM   #2
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
To create minimal lfs you need to use the tools from host to build the tools necessary to build lfs.
http://www.linuxfromscratch.org/lfs/view/6.5/index.html
Are sda6 & 7 empty?
If so you can join them to have more room to work.
 
Old 10-31-2012, 04:58 AM   #3
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Thanks for the link. I think I have all the dependencies in my host machine. If you could tell me what can be the problem in my instance I would be glad.
 
Old 10-31-2012, 08:41 AM   #4
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 395

Rep: Reputation: 130Reputation: 130
To me, that "file not found" message means just what it says. IMO, the grub.cfg file is misconfigured for the partition or has some other typo. But when you fix that, it will be interesting to see if this thing you created is capable of booting and running.

Last edited by stoat; 10-31-2012 at 08:43 AM.
 
Old 10-31-2012, 11:37 AM   #5
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
I also noticed that it is some kind of grub configuration error. But I cannot solve it. When I mount my /dev/sda6 to /mnt/lfs, and type "mount" command, it shows that it is mounted, but if I restart my laptop, and log in again in my host Linux system and if I type "mount" command again in terminal it doesn't show that it is mounted. On the other hand, I just want to have bash, grub and kernel, the only thing that it should do is load the kernel without any kernel panic and that's all, no commands should work nothing else, just a bootable simples possible kernel.
 
Old 10-31-2012, 04:21 PM   #6
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
I managed to solve it, I just needed to do some changes in /etc/fstab file. Now it boots up, I don't get any kernel panic, the only thing that I get is:

sh: canno set terminal process group(-1): Inappropriate ioctl for device
sh: no job control in this shell

And then I'm on bash, and ready to write things, but of course I don't have any working commands now.
 
Old 11-02-2012, 09:09 AM   #7
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Did you do all of the steps in building system or did you just put kernel in partition?
If you didn't do all of the steps in the book you won't have a running system.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 15 file not found cynicalpsycho Linux - Newbie 2 12-24-2009 04:31 AM
how to execute a script file? Have file/directory not found error sirius57 Linux - Software 2 11-21-2007 11:43 PM
Error 15 file can't be found bookie Linux - Software 15 11-16-2007 09:24 AM
Kernel compilation error: Error 15: File not found Niceman2005 Linux - General 9 10-04-2007 03:45 AM
snmpd installed, see file, but get error file not found PCHelper Slackware 0 11-06-2003 12:44 PM


All times are GMT -5. The time now is 12:09 AM.

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