-   Linux - Software (
-   -   How to build a minimal linux system (

leihsun 03-05-2002 12:24 AM

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?

trickykid 03-05-2002 01:01 AM

you may want to look into LFS,

leihsun 03-05-2002 03:18 AM

sorry, i did not found useful information.
could you tell me more?

Baloo 03-05-2002 09:37 AM

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 and look at the LFS 3.2 book. It explains it a whole lot better than I could :)


DavidPhillips 03-06-2002 11:40 PM

get tomsrtbt disk

boot it, copy everything mounted to the hard drive, run lilo, and fix fstab

or make your own

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?

leihsun 03-07-2002 12:28 AM

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?

DavidPhillips 03-07-2002 01:52 AM

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

Mik 03-08-2002 08:05 AM

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.

trickykid 03-08-2002 10:17 AM


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
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...


hanzerik 03-08-2002 11:41 AM

look at and 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.

hanzerik 03-09-2002 12:42 AM

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:

DavidPhillips 03-09-2002 02:51 AM

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.

DavidPhillips 03-09-2002 02:51 AM


Terminator3000 11-12-2012 03:19 PM

Why not use Centos 6 with a net install,easily customisable, you can also use Elinks text based browser with it. It's rpm based so plenty of support.

DavidPhillips 11-12-2012 04:06 PM


Originally Posted by Terminator3000 (Post 4827844)
Why not use Centos 6 with a net install,easily customisable, you can also use Elinks text based browser with it. It's rpm based so plenty of support.

Yea a lot has changed in 10.5 years. What seemed like a lot of space is not much anymore.

Get a bigger stick.

All times are GMT -5. The time now is 07:42 AM.