Linux - MobileThis forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.
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.
Hey guys, my ISY professor wants the smallest possible footprint on a USB possible, and the fastest possible time to a shell. It is sort of a contest for our class. I did a Kali build that booted very fast, and a DSL/knoppix build that was tiny, but he's not impressed. He said that I should be thinking kilobytes, not megabytes.
The requirements: I can use any resources I want. The USB needs to boot into a shell that has dd and vi available.
I've tried looking into LFS, core, and Arch, but I'm not quite sure how to customize or strip out parts that I don't need. I've also done extensive googling and searching on LQ. Does anyone have any experience with a mobile OS that loads almost nothing but init and bash?
Sounds like your professor covered how to change kernel options and compile the kernel. Instead of looking for "the one" distribution which has it done for you; you should start with a distribution that works for your architecture and customize it to remove all the non-essentials. I'd say look at the differences and similarities between the very fast one and the very small one and try to marry those together.
Note also that configuring the kernel sets up a bunch of code inclusion/exclusion flags affecting the amount of features compiled. But perhaps one can go further than the flags ...
Bear in mind that there are different variations of the shell, dd, and vi available in source form; hence you can rewrite them and discard portions which take up a lot of space. Bear further in mind that a command shell needs to support solely the necessary commands which here sound to be "dd" and "vi".
And this is clearly a case where you follow the mantra of The Commander (see below).
My professor covered no such thing! He's great though, he gives us something way over our head, and two weeks later we're confident on it.
Update: I have TinyCore installed in 9MBs, and boots (to a GUI!) in <4.5 seconds. I'm working on Core to a USB now, and I'm going to start stripping that down when I get it running. Thanks for the quick response!
All you need is a kernel, a shell (Ash from Busybox should be fine) and copies of vi and dd (of course with the needed libraries). Assembling that is pretty easy, for example following this tutorial: http://doc.slitaz.org/en:scratchbook:start
I have made special purpose systems with about 5MB of size this way, but with using only the kernel drivers and Busybox modules you really need you might get that even smaller.
Tell him to get QNX. Full GUI on 1.44m floppy.
A bit of work and you can get menuetos on a usb in 1.38m. Plus syslinux.
I was thinking of what TobiSGD suggested. You build a custom kernel with the bare bones drivers for your system and some minimal cli. Since he didn't say you needed any apps, you don't need busybox.
Some of the newest compression can be used on a new kernel.
Those are all interesting avenues, I'm definitely going to aim for the 1~2 Mb range now. I'm running the boot speed tests in VMWare Player, and I've been using a USB2.0 stick. I'll be moving the installs to a USB3.0 just in case it helps, though I doubt it, because the read speed on both is significantly higher than the size of these tiny operating systems. I'll post updates as I shrink the installs or run into problems. Thanks again guys!
Tell him to get QNX. Full GUI on 1.44m floppy.
A bit of work and you can get menuetos on a usb in 1.38m. Plus syslinux.
I was thinking of what TobiSGD suggested. You build a custom kernel with the bare bones drivers for your system and some minimal cli. Since he didn't say you needed any apps, you don't need busybox.
Some of the newest compression can be used on a new kernel.
I thought this was a school assignment, no GUI, boot the kernel as small and fast as possible; requires a command shell supporting dd and vi.
I would give the instructor a micro-micro kernel and a shell which couldn't even perform ls. You don't even need a frame buffer, let alone GUI! No network, no swap space. The fun part, and the assignment, is how minimal can you go, not how cool you can make it.
Hey guys, my ISY professor wants the smallest possible footprint on a USB possible, and the fastest possible time to a shell. It is sort of a contest for our class. I did a Kali build that booted very fast, and a DSL/knoppix build that was tiny, but he's not impressed. He said that I should be thinking kilobytes, not megabytes.
The requirements: I can use any resources I want. The USB needs to boot into a shell that has dd and vi available.
I've tried looking into LFS, core, and Arch, but I'm not quite sure how to customize or strip out parts that I don't need. I've also done extensive googling and searching on LQ. Does anyone have any experience with a mobile OS that loads almost nothing but init and bash?
With Buildroot you can generate a tiny Linux system (kernel + embedded initramfs), then just copy this kernel onto your usb drive and make it bootable
This may be my ignorance talking, but I understand Grub includes (some?) filesystem access and normally loads Stage 2 from somewhere outside the MBR. What's to stop you building a custom Grub with some of the bootloading parts removed, and a minimal vi and dd to run from the Grub command line?
Failing that, how about a minimal Freedos with vi.exe and dd.exe?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.