Results 1 to 8 of 8
Hello,
I am trying to work out how to achieve this:
Have a usb stick that upon plugging into laptop and hitting the power button, a fast booting text only ...
- 07-02-2011 #1Just Joined!
- Join Date
- Jul 2011
- Posts
- 2
Just want a fast booting distro that can run a single simple script
Hello,
I am trying to work out how to achieve this:
Have a usb stick that upon plugging into laptop and hitting the power button, a fast booting text only linux distro boots up and runs this script:
and then it shuts down the laptop.Code:#!/bin/bash clear echo "Volume header (Sector 62):" echo hexdump -C -s 31744 -n 512 /dev/sda echo echo "Wiping in:" echo function countdown { local OLD_IFS="${IFS}" IFS=":" local ARR=( $1 ) local SECONDS=$(( (ARR[0] * 60 * 60) + (ARR[1] * 60) + ARR[2] )) local START=$(date +%s) local END=$((START + SECONDS)) local CUR=$START while [[ $CUR -lt $END ]] do CUR=$(date +%s) LEFT=$((END-CUR)) printf "\r%02d:%02d:%02d" \ $((LEFT/3600)) $(( (LEFT/60)%60)) $((LEFT%60)) sleep 1 done IFS="${OLD_IFS}" echo " " } countdown "00:00:10" clear for I in {1..100}; do dd if=/dev/urandom of=/dev/sda bs=512 count=1 seek=62; dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=62; done echo echo "done, result:" echo hexdump -C -s 31744 -n 512 /dev/sda
What distro should i use? I've tried putting, for example, a live distro called Finnix on a usb stick and it boots in only like 5 seconds which is nice, however there is no file persistence since it is a liveCD only basically. Since i have a script that needs to be run at start-up, i need a persistent install of a distro on the usb don't i? (so that the script will always be in /etc/init.d).
A file persistent install is easy for ubuntu for example, using unetbootin, but ubuntu is just too big and takes too long to startup considering that all i need executed is that script.
Ideally it'd just take 20 seconds from pressing restart to the linux loading then computer shutting down. Please help if you have any ideas, thanks!
I thought another candidate might be 'microcore linux' but i haven't for the life of be been able to work out how to make a persistent install of it on usb stick.
- 07-02-2011 #2
You can use a AntiX full Iso live session to make a AntiX core persistent USB via antixcc (crossed wrenches in Icewm
Desktop)
My Base Iso how to.
antiX-forum - View topic - Antix 11 antix2usb persistent
edit; I should mention core iso is like a debian net install. No gui. Just init 3 bootup.
Base Iso comes with fluxbox only and ceni and rutilt as network connection centers.Linux Registered User # 475019
Lead,Follow, or get the heck out of the way
AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
Open CourseWare for Linux Geeks
- 07-02-2011 #3Just Joined!
- Join Date
- Jul 2011
- Posts
- 2
I looked at that tutorial... are you saying i need to install the gui version of it (for example in virtualbox) then i can plug in my usb and use that to install the core version only?
- 07-02-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,838
All you really need is a kernel and a custom initrd image to go with it. and you need a Linux environment in which to build/configure it, of course.
Have a look at this guy's project, it is simple, customizable, and does what you want. I've never used it (the one I based my own custom rescue OS on has disappeared from the net) but it looks pretty straight-forward.
- 07-02-2011 #5Linux Registered User # 475019
Lead,Follow, or get the heck out of the way
AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
Open CourseWare for Linux Geeks
- 07-03-2011 #6Just Joined!
- Join Date
- Dec 2007
- Posts
- 34
Memory Stick
Hi,
I've been running for a while now, different distros of Linux as an INSTALLED RUNNING OS (not live version). I don't need any additional different software to do that. All I do is use the Live version's permanent installation application. And I cause the installation to occur on a USB memory stick, or an external USB hard drive. GRUB boot manager, handles the standard bootup, and that's also on the external stick. If the stick is pulled out, then Windows comes up with no boot manager handling the starting sequence. Nothing gets installed on a Windows hard drive.
For a fast boot up, you could possibly try Puppy Linux, or some other cut down OS. You can find some choices by checking out "Distrowatch.com". They give quite expansive reports on different OS's. New reviews come out every Monday, with a listing is all kinds of new and updated Linux flavors.
Hope that this helps.
- 07-03-2011 #7Linux Newbie
- Join Date
- Dec 2010
- Posts
- 146
Nice script to teach Microsoft fools a lesson. I've managed to make an image file which if written to a disk, Windows will not 'reinstall'. PM me if you're interested.
- 07-03-2011 #8Just Joined!
- Join Date
- Nov 2006
- Location
- near Berea, Kentucky (in a tipi)
- Posts
- 34
single script on USB distro
I haven't tried it. I believe you could do this easily with tinycore (tinycorelinux.com). You'd need to "remaster" the system on USB stick. I don't think that'd be tough to figure out. (wiki.tinycorelinux.net/wiki:remastering/wiki:remastering). The image is 10 MB, so it boots fast.
Let us know....


Reply With Quote
