How to build a minimal linux system
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?
|
you may want to look into LFS, www.linuxfromscratch.com
|
sorry, i did not found useful information.
could you tell me more? |
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 :) Baloo |
get tomsrtbt disk
http://www.toms.net/rb/ boot it, copy everything mounted to the hard drive, run lilo, and fix fstab or make your own http://www.linuxdoc.org/HOWTO/Bootdisk-HOWTO.html it can be on anything not just a floppy thats about as minimul as it gets What was the problem with LFS It is a great build your own system? |
missing operating system
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? |
you must have a boot loader for one
install lilo when you install it you must have a lilo.conf that tells it what partition the kernel is on |
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. |
Quote:
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... -trickykid |
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.
|
Just trying a post using links browser, runnig on a floppy disk distro.
ok it worked. heres a link to the nice little floppy disk linux distro that I used to make this post: http://leka.muumilaakso.org/ |
I know where your coming from...
I had to use lynx for a while I managed to get wget and sshd going wget is great if you have another machine to get the addresses for you I just ssh into the little distro and then copy the link I want, paste it in to the ssh xterm preceeded by wget and away it goes. |
:Pengy:
|
Minimal
|
Quote:
Get a bigger stick. |
Centos 6
OK, so it wont go on a floppy (not that I've tried), but is still good for smallish drives etc although admittedly, you'd better be talking gigabytes rather then mb.
|
All times are GMT -5. The time now is 10:33 AM. |