Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to build a minimal linux system. I use "dd" and "rdev" to build kernel and file system on hard disk, but it fail. When booting the system, it give me the error message "can't find file system , kernel panic". Does this way only fit for floppy disk? How to create a minimal system on hard disk?
Linux from Scratch (LFS) is a project to create a Linux System entirely from just the source code. You download the packages off the internet and re-compile them for your particular system.
The advantages of this are that the system you compile will be tailor made for you computer meaning that it will be running at its optimal. Also the base LFS is practically a bare minimum usable Linux system, thats why it would be a good idea to head on over to www.linuxfromscratch.com and look at the LFS 3.2 book. It explains it a whole lot better than I could
I use the following three steps to make a boot hard disk, but it doesn't work.
1.dd if=/boot/vmlinux-2.4.2 of=/dev/hdc1 bs=1k
2.rdev /dev/hdc1 /dev/hdc1
3.rdev -R /dev/hdc1 0
It should can boot, but can't find root file system. But I got the "missing operating system" message. What's going wrong?
I've never really created a bootable system the way you are. But maybe explaining what you are doing might help.
1.dd if=/boot/vmlinux-2.4.2 of=/dev/hdc1 bs=1k
Here you copy the kernel image directly to the first sector of hdc1.
2.rdev /dev/hdc1 /dev/hdc1
Here you tell rdev to change the root filesystem of the kernel image which is on /dev/hdc1 to point to the root filesystem on /dev/hdc1.
3.rdev -R /dev/hdc1 0
Here you tell it to set the ramsize of the kernel image which is on /dev/hdc1 to 0
Now if you think of those steps logically then you would have placed your kernel image in the bootsector of /dev/hdc1. Obviously you have some kind of bootloader which it started first and then pointed it to start booting from hdc1. The first sector is part of the kernel which loads the rest of the kernel in the remaining sectors and then boots the kernel. When it's done it will look for the root filesystem. You set the root file system to be in /dev/hdc1. But you've also got your kernel there, which is directly on disk and not on a filesystem, so it will screw up. You'll have to have another partition which contains the root filesystem where you have the rest of your programs and bootscripts etc....
If however you do want it all on one partition then you will have to use a bootloader. A bootloader is a lot smaller then the kernel and will fit in the bootsector. The kernel can then be placed on the rootfilesystem and all that the bootloader does is point to where the kernel is so it can start loading the kernel.
Hope that explains it and maybe helps you get it working.
Originally posted by leihsun sorry, i did not found useful information.
could you tell me more?
if you want to build a minimal linux system with what you want.. the best route to take is linuxfromscratch.com
not sure what your trying to do with just a boot disk.. if your just loading the kernel in which all that boot disk is going to do for you, thats great.. but you have nothing else to work with to build your system...
look at www.busybox.net and www.uclilc.org for help on building a linux floopy. I have been messing around with it the last couple days, and have finally got my own custum linux floppy to boot correctlly. Now I'm gonna go back and add networking and hard drive, and cdrom support into the kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.