LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   error: no file found (http://www.linuxquestions.org/questions/linux-from-scratch-13/error-no-file-found-4175434817/)

erkant 10-30-2012 05:30 PM

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.

EDDY1 10-30-2012 07:35 PM

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.

erkant 10-31-2012 04:58 AM

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.

stoat 10-31-2012 08:41 AM

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.

erkant 10-31-2012 11:37 AM

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.

erkant 10-31-2012 04:21 PM

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.

EDDY1 11-02-2012 09:09 AM

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.


All times are GMT -5. The time now is 03:24 PM.