Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-20-2012
Registered User
 
Join Date: May 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Small linux no gui

I want to execute from a grub a very small linux that only has commands, so at startup it executes this shell script I wrote and after that the user has an option to go back to the grub.

I've heard of busybox but that doesn't seem to be helpful?

Can anyone recommend a non gui distro, that can help me achieve this.

Thanks,
Sponsored Links
    #2  
Old 06-20-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,400
Thanks: 492
Thanked 2,537 Times in 2,420 Posts
I don't know of a real distribution for this. That's kind of overkill by definition. You don't need a package repository, you don't need much of anything at all, just a kernel and a bundle of files.

See initramfs on how to make that bundle of files. You'd probably use busybox in it -- it's a single swiss-army-knife executable which you can use like busybox cp source destination if you want cp, busybox cat filename if you want cat, etc, etc. Be sure to have a symlink /bin/sh pointing to /bin/busybox so scripts can run.

Just put whatever script you want into init instead of the stuff you'd use to chroot into a real system.

Going back to grub isn't trivial. You can't just "quit linux" and go back to grub. The kexec option allows you to boot another kernel, which would allow you to boot grub raw again without rebooting, but would take some fiddling to manage. The quick and dirty way to manage it is, of course, to just reboot...
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
RHEL/Linux Small Monitor flekzout Emergency UNIX and Linux Support !! Help Me!! 7 04-29-2010 09:03 PM
cant mount cd rom in damm small linux format Linux 12 10-20-2005 03:28 PM
Why is linux console window in VMWare so small? ChaoZhang Linux 3 10-10-2005 05:17 AM



All times are GMT -4. The time now is 10:59 PM.