LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to build a minimal linux system (http://www.linuxquestions.org/questions/linux-software-2/how-to-build-a-minimal-linux-system-15599/)

leihsun 03-05-2002 01: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 02:01 AM

you may want to look into LFS, www.linuxfromscratch.com

leihsun 03-05-2002 04:18 AM

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

Baloo 03-05-2002 10: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 www.linuxfromscratch.com and look at the LFS 3.2 book. It explains it a whole lot better than I could :)

Baloo

DavidPhillips 03-07-2002 12:40 AM

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?

leihsun 03-07-2002 01: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 02: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 09: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 11:17 AM

Quote:

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

-trickykid

hanzerik 03-08-2002 12:41 PM

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.

hanzerik 03-09-2002 01: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: http://leka.muumilaakso.org/


DavidPhillips 03-09-2002 03: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 03:51 AM

:Pengy:

Terminator3000 11-12-2012 04:19 PM

Minimal
 
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 05:06 PM

Quote:

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 10:28 AM.