Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


LinkBack Search this Thread
Old 05-29-2009, 04:21 PM   #1
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
New Tricks and Toys For Linux Addicts- USB tricks and Portables OS's!

Ok, been working up some stuff and got it all completed.
I apologize for the long post-but it's good stuff!

I will break it into 2 Parts-

Part 1)- Tips and Tricks with Tinycore-1.4.3 for USB with Syslinux snd Grub.

OK, easy guide for installing Tinycore or other distro to FAT32/EXT2/3 USB here-
( )

It's easy, just open side panel and disconnect ribbon cable from
mother board or HD, along with power wire.

Because your installing grub as if to Harddrive; EVEN PC'S THAT CAN'T
That's way cool!
( )

Use either the bootmanager floppy (plpbt.img) which doesn't install to MBR
Or install to MBR with ( plpbtin.img ) Or tinycore/dsl bootfloppy for those.

OK, I have also discovered that Tinycore can mount and access the portable
vhd's that portable Qemu makes and uses them as jars for holding the mydata.tar.gz
and tce/tcz extensions!

Using the boot cheatcode "tinycore tcvd=sda1/name-of-tcvd restore=tcvd tce=tcvd"
Tinycore will mount the vhd on /mnt/tcvd and you can store stuff there and I have also
come up with specific "Flavors" including Office/Multimedia/Rescue/LowRam, etc
I have made a few and put them here-
( )

Along with the menu.lst for USB that looks like this-

The Grub install commands are

grub> root (hd0,0)
grub> setup (hd0)
grub> quit
default 0
timeout 10

title TinyCore-1.4.3 (tclocal-autofind)
kernel /boot/bzImage quiet waitusb=5
initrd /boot/tinycore.gz

title TinyCore-1.4.3 (tce/restore-sda1)
kernel /boot/bzImage quiet restore=sda1 tce=sda1 waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-Office (tcvd)
kernel /boot/bzImage quiet tcvd=sda1/flavors/office restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-Multimedia (tcvd)
kernel /boot/bzImage quiet tcvd=sda1/flavors/multim restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-Rescue (tcvd)
kernel /boot/bzImage quiet tcvd=sda1/flavors/rescue restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-Low-RAM (tcvd)
kernel /boot/bzImage quiet tcvd=sda1/flavors/loram restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-1.4.3 (tcvd-sdb1)
kernel /boot/bzImage quiet tcvd=sdb1/hda restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-1.4.3 (tcvd-sdc1)
kernel /boot/bzImage quiet tcvd=sdc1/hda restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-1.4.3 (tcvd-sdd1)
kernel /boot/bzImage quiet tcvd=sdd1/hda restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-1.4.3 (tcvd-sde1)
kernel /boot/bzImage quiet tcvd=sde1/hda restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-1.4.3 (tcvd-sdf1)
kernel /boot/bzImage quiet tcvd=sdf1/hda restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz 

title TinyCore-1.4.3 (tcvd-sdg1)
kernel /boot/bzImage quiet tcvd=sdg1/hda restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz
Note that the first entry "tclocal autofind"; is because Tinycore auto-scans
for this file and you can make a small one and that way when booting on a
foreign PC you will have some apps,etc instead of guessing sda1/sdb1 etc.
Once at desktop find out the usb's name with "mount"
and then you can reboot with the correct menu entry above and restore
apps, etc via tcvd.
The other entries are for usb sdb1/sdc1,etc
Edit as you see fit.

Also, FAT32 USB's using syslinux can also access the tcvd's error free!
My Tinycore-1.4.3-FAT32-USB will be out tomorrow.

OK Part 2!
The how-to I wrote for the Portables-
( )

This how-to is for portable qemu dsl/mydsl install to vhd.
Others also work.

DSL-2-VHD & MyDSL Portable OS's! 05/29/09
( )

Portable Qemu (qemu folder)
Either mydsl or dsl2vhd 500MB Virtual drives (Not in "Kit")
Windows and Linux scripts to invoke/install/run mydsl/dsl2vhd
Windows and Linux scripts to make your own vhd of various size
Instructions on usage and creation (this text)

I wanted a fully portable Operating system that fit these criteria:

1) Capable of running from any partition type (FAT32, EXT3, etc)

2) Capable of running from any USB, no matter it's partition type
or bootability

3) Runs and plays without having to reboot the computer

4) Is fully cross-platform and works on both Windows and Linux

5) Fully self-contained and installed within the Virtual Hard Drive

6) Runs just as a real installed OS; settings/sessions etc are
saved back to the VHD, apps installed are persistent-everything
is as your own real Linux system!

7) Expendable-meaning that it is mostly to be used by Linux newbies
for learning Linux without actually risking their own systems/PC,
other uses include practicing compiling, programming, etc

Known working distro's that boot via this version of portable-qemu are
DSL, Feather, DSL-N, Slackware 12.2, Tinycore_2.0rc2.1 TTYLinux-8.0.1,
and Fedora-10!
There are others, some do not work yet-Debian/Ubuntu.

I am currently re-compiling qemu, trying to make it avail for other

Pro's of this setup include above and that the vhd's are compressable
and will compress down alot!
Example- 300MB mydsl vhd compresses down to 63MB

The vhd's can be copied, so that you can have a Master original.
Example- Make a copy of the dsl2vhd vhd and use that, keeping the original
safe somewhere-that way you can modify/test and if you screw up,
throw it away and make another copy.

OK-the How-To

To invoke Windows .bat files-make executable and double-click
To invoke Linux .sh scripts- make executable and double-click-choose "run"
Or make executable by "cd"ing into folder and "chmod +x"
Invoke with "./"

DSL-4.4.10.iso or earlier (50MB) (make sure it is named DSL-4.4.10.iso or change name in scripts)
Linux or Windows Host-your computer

Step 1) Make a vhd using one of the scripts in the qemu folder(mke_vhd.bat/.sh)

Open either script with a text editor and adjust vhd size and name-
"./qemu-img create 'name' xxxX" where 'name' is any name you give it- dsl2vhd, whatever.
"xxxX" is the size- 128M (no B) would create a 128MB vhd, 1024M a 1GB vhd.
Sizes can be in kilobytes K, megabytes M, and gigabytes G.

mke_vhd.bat is similar
"START qemu-img.exe create 'name' xxxX"

For this how to, a vhd named "mydsl" and a vhd named "dsl2vhd" are used.

Step 2) Place the DSL-4.4.20.iso in the qemu folder.

Step 3) Start either the for "dsl2vhd" OR for "mydsl"
and when Qemu pops-up enter this at the "boot:" prompt

"dsl 2 vga=788"
This keeps the window at 800x600 and dsl at runlevel 2 (no X)

Whe dsl reaches runlevel 2, at the prompt enter-
"cfdisk /dev/hda"
Enter y for new partition table.
Choose "New" press enter
Choose "Primary" press enter
Press enter and use whole disk
Choose "Type" and enter "83"
Choose "Bootable"
Choose "Write" and then "yes", enter.
Choose quit when it's done.
Type in "poweroff" and let dsl shutdown.
Note, the install won't work unless you shutdown and then restart dsl scripts-DON'T REBOOT!

Step 4) Invoke either or as above and at boot prompt enter-
"dsl vga=788 xsetup"
At Xsetup enter your parameters- I chose 800x600/imps2 mouse/english keyboard,etc.

Once the dsl Desktop loads-
From the dsl menu choose either-

Apps/Tools/Install to Hard Drive
Apps/Tools/Frugal Install/Frugal Grub or /Frugal Lilo (I used Grub, lilo doesn't seem to work)

Step 5) If frugal grub; enter "hda1"
enter "l" for livecd
enter "hda1" for MyDSL extensions
enter boot options you want (restore is automatic and mydsl=hda1 auto-added by dsl-don't add these)
enter keyboard prefs
answer Y to format
Proceed with install and select Grub as boot loader
DON'T choose reboot!
choose n for no-to-reboot and exit installer.

From the taskbar, bottom panel, click the "mount" button.
cycle thru the options by clicking on them until you
arrive at "hda1" and click where it says unmount and it will mount it.

Open MyDSL apps browser, update it and install only jwm_themes!
We're gonna setup MyDSL after shutdown/restart.

Choose from the dsl menu setup/ and select a theme.
To add wallpapers download them with firefox( right-click/ save-as on picture)
The default download location is /home

after downloading; double-click the "home" icon and then the "apps" icon.
double-click the "backgrounds" folder in the apps folder.
Drag-N-Drop the wallpapers from the "home" folder to the "backgrounds" folder
then close all the boxes.
open the dsl menu and select system/control panel/backgrounds and choose
Try and then Install!

Right-click anywhere and at dsl menu choose system/backup and restore
enter "hda1" and click "backup"

Now choose exit and Shutdown;
making sure the "backup" option is checked!

Now, double-click/run the script and start MyDSL
choose the first option dsl or whatever.
It should load at 800x600 with the wallpaper you added.
To confirm if MyDSL folder is in hda1,
open a root terminal and type "ls /cdrom"
A MyDSL install will mount hda1 on "/dev/hda1 /cdrom"
A DSL2VHD install will mount hda1 on "/dev/hda1 / "

If there is a MyDSL folder there start installing apps!
see Step 8-

Step 7) If Hard Drive Install; enter "hda1"
enter y or n for multiuser support
enter y for ext3 or n for ext2
enter y to format it
enter "l" for livecd if applicable
At prompt answer y for bootloader
Choose grub (lilo doesn't sem to work, maybe edit /etc/lilo.conf?

Do as above with frugal install; Mount hda1 FIRST!
update MyDSL browser-however

This is dsl2hd install(Debian HD Install), so no mydsl apps will work,
though you can still use the restore=hda1 option.
Meaning-you can install themes, etc (jwm_themes, etc)

Choose from the dsl menu Apps/Tools/Enable Apt to get apt-get, etc going.
from the same menu choose Upgrade to GNU Utils.

Now, as above

Choose Exit-Shutdown and make sure "backup" is checked!
Close qemu if it doesn't quit by clicking "x".

Step 8) Your done, hopefully successfully!
Now, use either or and boot into your new Portable-DSL!

Note the dsl2vhd passwords are- for user "dsl" it's 1, for user "root" it's 77.
User dsl will have the restored settings, not User root.

Note- the installed systems running off the vhd's CAN BE REBOOTED, etc, just not the cdrom version.

Note-if after initially rebooting mydsl the apps aren't there, just start installing-
That's why I said only install one or two.
Then reboot-making sure to backup.

You can adjust how much memory is given to the scripts ( -m 128 )
just adjust as needed-it defaults to 128MB RAM.

You can run any of these portables from your own system and also from a distro playing
from USB like DSL/Feather/DSL-N and TINYCORE-1.4.3 AND UP!
No need to install Qemu as it plays out of the qemu folder!
Tinycore does need tce/tcz "sdl.tce" installed from apps browser.

To run any portable from a live Linux USB as above-

Step 1) Place the qemu folder, scripts, etc onto your USB with your Linux
distro, example DSL/Tinycore
Boot computer off USB and load to Desktop.
At dsl/tinycore desktop open a root shell/terminal and find the mountpoint for
the USB-
enter "mount"
dsl it's usually /cdrom or /auto/mnt/cdrom
tinycore it should be /mnt/sda1, /mnt/sdb1, etc
"cd" into the USB with "cd /cdrom", "cd /mnt/sda1"
Make executable if not already-
"chmod +x" or dsl2vhd.
Invoke Qemu-
"./" or dsl2vhd, that is a period and a forward slash.
Bang! Portable DSL playing in Tinycore/DSL, etc off USB!

Most coolish fact?!
Being that Tinycore can retrieve tce/tcz's mydata.tgz from these vhd's via the "tcvd"
boot option (ala my 1.4.3 "flavors" collection), you can have access to the vhd in both
the virtual dsl and the real time Tinycore!See screenshots folder.

Use the Tinycore boot cheatcode "tcvd=qemu/mydsl restore=tcvd tce=tcvd waitusb=5" at
the boot: line

Tinycore will boot and place a "tce" folder in there, at desktop start installing apps,etc
Just like DSL backup to hda1 making sure it's mounted first!
It should already be.

Screenshot Tinycore-1.4.3 on EXT3 USB with mydsl-2-vhd playing!

Last edited by linus72; 07-16-2009 at 08:43 PM.
Old 05-29-2009, 04:45 PM   #2
LQ Newbie
Registered: Feb 2006
Location: UK
Posts: 27

Rep: Reputation: 15
Good info,

Somthing to add for people that need it, USB must be compiled into the kernel, not just a module on kernel boot but accual inside the kernel otherwise grub wont be able to boot.

I use ArchLinux on my external HDD, made a small bash script on boot that loads an accelerated driver depending on the graphics adaptor (ati, nvidia, vmware or intel) so i always get the best resolution (vesa is... poop for widescreen).
Old 05-29-2009, 04:49 PM   #3
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057

Original Poster
Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
I haven't had to add usb when compiling kernel-
What do you mean?
Oh, for a External HD USB?
Old 05-29-2009, 05:36 PM   #4
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057

Original Poster
Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Note also Gang I had DSL, Tinycore, systemrecuecd, INSERT, Feather, KNOPPIX,
SlimSlack and Ubuntu-SE-8.04 all booting off the same EXT3 4GB USB with Grub
without partitioning anything.
Only Slack ran as a installed system; the others run as persistent live.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
100 Linux Tips And Tricks pooya1 General 1 09-01-2008 10:10 PM
Playing tricks with Linux collern2 Linux - General 4 02-22-2006 08:23 AM
Totally useless Linux tricks scott_R Linux - General 6 01-14-2004 01:16 AM

All times are GMT -5. The time now is 08:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration