Make a shell based live USB
Hi Guys could anyone help me with some info of how to make my own distro, well I just need to make a live usb that executes the kernel and a shell with a Hello world message, all by hand, no easy programs. Any help with that?
|
I used to keep instructions on how to build the newest kernels/syslinux etc into a bootable embedded linux with busybox. But I've stopped doing it because it was time consuming. It was fun though, So I can empathize with why you would want to do this.
Here is a link to something called Slitaz which claims to let you do the same thing: http://www.slitaz.org/en/doc/scratchbook/ They are very similar, There is a lot in this example that you can remove if you only want a shell to run and echo a string,.. but going through the entire process might be a great learning tool for you. |
Kind of one step past JEOS, just enough operating system.
I might be tempted to take some installer that easily installs with no window manager. Maybe Debian. Then install that to the usb. Then start deleting almost everything. You will need some bare bones stuff. Personally I might get a JEOS from somewhere, SuseStudio.com can make one. Still would be a lot more than what you'd need. Once you get the basic OS on and shell support and maybe a few helper files you can execute some way to make this hello world. The actual way you requested would be to use LFS. Not really worth the time. Guess you could use Gentoo to make a minimal install. The good old day floppy distro's like that won't easily boot from usb. Might be able to use syslinux or grub to boot to them maybe. |
Quote:
|
Check live.debian.net
Instructions on how to create your own live USB. Some pre-cooked versions are command line only and might provide a good starting point. jlinkels |
the 'lb' command really takes away from the experience of building your own distro from scratch though. it magically does most everything for you.
|
I know grub can boot floppy images from a hard drive. Not sure about the usb. Since one can get even dos to boot from usb, I'd think that an old linux might boot. I did state that there are easier ways.
|
Actually you can do that with just the kernel and grub. Put a kernel image and a statically linked busybox on a usb drive, install grub, and add a line as follows:
Code:
root (hd1,0) EDIT: Also the above assumes grub 0.99 and that the usb drive is the second disk on the system (the local hard disk being the first). Either use values that correspond to your setup or just use UUIDs |
I'd guess that LFS (linux from scratch) could be used to create the most minimal and one could only add in drivers needed for target hardware.
Think you'd at least need some version of busybox to add in some useful tools maybe. http://ttylinux.net/ http://superuser.com/questions/30708...sybox-and-bash |
All times are GMT -5. The time now is 01:06 AM. |