LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-13-2009, 08:30 PM   #1
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,059

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Roll your own Portable-Slackware! The definitive "How-To"


First-off; this took months and is alot of work; a Slackware T-Shirt in size XX would be a fair trade at least-Hook me up!
The DSL book would be cool too.

It would seem the Dawn of the Self-Contained-Symbiant-Operating-System is here!

Portable-Slackware-12.2 runs off a qemu-created raw vhd capable of running JUST like an installed-to-HD Linux distro; that is, all settings are saved, etc.
You can add apps, themes, etc whatever and it'll be there when you reboot!

Pros?

It runs off USB(4GB or larger), on any partition type (FAT32/EXT3,etc) and runs on both Windows and Linux.
Meaning it is fully portable and compatible with any Windows/Linux Box.

No reboot needed, it runs off the "Host" system; just insert USB, invoke script and play!

Don't need to partition USB, set boot flag, or install syslinux/grub.

Files/apps/updates, etc are in real-time and saved back to the vhd.

Allowed Memory can be adjusted thru the scripts ( -m 280 ), edit as required, default is 128 by qemu.

Symbiant can access Host system, or any system, thru Internet if enabled.

Symbiant can "anonymously" access the internet thru the Host system; to do evil no doubt; (example-watching porn on firefox on Portable-Slack from your friends(enemies?) Office cube. The evidence "might" be on his computer but not in his firefox history!Who did it?!)

Can be used to hide secret files, the vhd is inaccessible from the outside.

The vhd can be compressed/ decompressed without hurting it.

The vhd can be copied- So, after you get the system working good; make a copy of the vhd and put the original somewhere safe. Now, use the copy to do experimental stuff; if anything goes wrong, delete it and go back to the original. make another copy, etc.

Useful for doing "test" installs of new pkgs on the go or as an intro for inexperienced Slacker's so they can learn Slack by trial and "break".

Lots more potential too-
Slack, feather, dsl2hd, and a couple others are the only ones I've gotten to work and KDE is a no-no (errors,etc)
XFCE4/Fluxbox run flawlessly.

Any slack-based distro should work this way...Debian/Ubuntu have issues.

OK-although a rather simple operation, this post will be lengthy...

Ingredients;

1) Slackware DVD.iso 11/12/12.2,etc name it (SlackDVD.iso) or
change the name in the install scripts.

2) Portable-Qemu, Windows .bat, and Linux .sh scripts here-
( http://multidistro.com/downloads/dsl...le-Qemu.tar.gz )
(1.2MB)

3) 4GB or larger USB

Instructions;
Note-this how-to assumes you have downloaded Portable-Qemu and have made a folder named "slack" either on your desktop or in your /home directory. In the slack folder is the Slack DVD.iso, the qemu folder and the (slk) install and run .bat/.sh scripts.
YOU DO NOT NEED QEMU INSTALLED TO DO THIS!

1) Make a folder named "slack" in /home or on your desktop.

2) Untar the Portable-Qemu to the "slack" folder.
The contents should be-

slk_install.bat
slk_install.sh
slk_run.bat
slk_run.sh

qemu folder-
..../bios.bin
..../(hda) put it here too
..../fmod.dll
..../libusb0.dll
..../linux_boot.bin
..../qemu
..../qemu.exe
..../qemu-img
..../qemu-img.exe
..../sdl.dll
..../mke_vhd.bat
..../mke_vhd.sh

3) Put the slack DVD.iso in the slack/Portable-Qemu folder.

4) Alright, ready to go...make sure the install and run scripts are executable.

5) Using "mke_vhd.bat" for Windows or "mke_vhd.sh" for Linux, make a VHD of whatever size you want. Note-edit the script before using to set the desired vhd size (M/G).
Double-click mke_vhd.bat in windows and in Linux either double-click or "cd" into the slack folder and
"chmod +x mke_vhd.sh" to make executable and "./mke_vhd.sh"
to invoke.

5a) You can also do it thru the terminal or command prompt(windows)
In Linux; "cd" into slack/qemu folder and
"qemu-img create harddisk ??M/G" where "??M/G" is size 32M/128M/2G, etc

In Windows; thru the command-prompt, cd into the slack/qemu folder and
"qemu-img.exe create harddisk ??M/G" as above.

It should make either in the qemu folder you cd'd into to.

6) rename the "harddisk" to "hda".

7) Use and invoke either "slk_install.bat" or "slk_install.sh"
Qemu should pop up, press enter to boot or choose a kernel.
I chose "huges.smp"

8) From here on, it's a basic Slack install-
Login as "root" and "cfdisk /dev/hda"
cfdisk pops up; choose "new", then "primary", then "bootable", then "type"; choose "83" (linux).
Choose "write" and "yes". Choose "quit" when it's done.

9) At the prompt type "setup"
Choose "Target", (/dev/hda1), then "format with no bad block checking".

10) Choose "install from CD/DVD" and "auto find CD"

11) Start installing packages.

12) At prompt to install Lilo; choose "expert" lilo setup.
Start Lilo header with new config,etc
choose "/dev/hda", should already be there...
choose/input "/dev/hda1"
install lilo.

13) Choose mouse, network config, etc.

14) At setup exit; DO NOT REBOOT!
Instead, at the command line; enter "halt" and wait for shutdown
if qemu doesn't stop, click the X to kill it, as long as the system halted.

15) Use the "slk_run.sh/.bat" and invoke, boot and login!

16) Uncomment a slackware mirror "nano /etc/slackpkg/mirrors"
To uncomment; delete the "#" in front of any mirror where it says "http/ftp"
#Utah university
#http so and so (wrong)

#Utah university
http so and so (right)
To save changes in nano- cntrl-o
To exit- cntrl-x

17) "slackpkg update", and then "slackpkg upgrade-all"

18) Now, setup xorg.conf for 800x600 with 3-button mouse...
"nano /etc/X11/xorg.conf"
edit the mouse input to read-
Code:
Option "Device" "/dev/mouse"
Option "Device" "/dev/psaux"
Option "Device" "/dev/ttyS0"
Option "Device" "/dev/ttyS1"
Option "ZAxisMapping" "4 5 6 7"
Edit the screen section for 24 color or what you want-

Code:
Subsection "Display"
Depth 24
Modes "800x600"
cntrl-o to save
cntrl-x to exit.

after upgrading; configuring-"startx" Baby!
Suggestions- Install sbopkg and Use Dillo from SlackBuilds.org in place of firefox.
Any mistakes/errors in this please post!
05/13/09
Screenshot is 3.5GBvhd XFCE4 Portable-Slack running from 4GB Kingston USB.

Last edited by linus72; 07-03-2009 at 06:48 AM.
 
Old 05-13-2009, 08:47 PM   #2
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 89
Now I just need to find some time...
And empty a 4GB USB stick, or buy myself a new one.
 
Old 05-13-2009, 08:57 PM   #3
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,059

Original Poster
Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
No doubt; this is a tribute to Slackware 'cause it really went easy but Ubuntu/Debian kept freaking out during boot/install!

Tomorrow I'll release the how to for Portable-MyDSL (which is alot different) and for Multiboot-Portable too!

This wasn't possible without all you guy's help; Repo, Tex-Mex, Alien-Bob, bGeddy, and alot of others-I smoke too much *!@$ so I can't remember everyone...

Anyway, Good Waves and Portable-Slack!
And in the words of Spicolli "That's righteous dude!"

Last edited by linus72; 05-13-2009 at 09:18 PM.
 
Old 05-14-2009, 10:20 AM   #4
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,059

Original Poster
Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
So, anybody made one yet?
I just posted MyDSL/Portable-MyDSL howto in the DSL forum, check it out too!
 
Old 05-14-2009, 12:24 PM   #5
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,059

Original Poster
Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
fixing this now- Please edit the "mke_vhd.sh" to start with "./qemu-img" instead of "qemu-img".
It only affects it when invoking thru term I think.
 
Old 05-14-2009, 12:33 PM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
8) From here on, it's a basic Slack install-
Login as "root" and "cfdisk /dev/hda"
cfdisk pops up; choose "new", then "primary", then "bootable", then "type"; choose "83" (linux).
Choose "write" and "yes". Choose "quit" when it's done.
Just a quick point - do you not think it may be advisable to create a swap partition ?

Anyway - nice one for the work put in. It's good to see someone "putting back" to the fold !
 
Old 05-14-2009, 02:48 PM   #7
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,059

Original Poster
Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Thanks bgeddy; I did actually make a small 64MB (maybe too big?) swap partition by using a different vhd (hdb) ( -hdb qemu/hdb ).
However, I never noticed it using the swap partition..it always said 0 no matter how I stressed it-does that mean it's not using it or what?
Easy to make one for yourself now.
I did not try to partition the hda vhd as it usually destroys it and makes it unbootable.

Any help you guys can give I'll use; I'm still a newbie dude.
 
Old 05-15-2009, 11:15 AM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I'm curious.

Seems to me this how-to describes installing Qemu, creating a blank Qemu disk image, and then installing Slackware 12.2 from scratch. Some additional scripts render the final disk image "portable."

Do I understand correctly?

I have VirtualBox installed. Although I run Slackware 12.2 as my primary operating system, for testing purposes I have a Slackware 12.2 VirtualBox image on my system running KDE 3.5.10 and the image runs well.

A quick search of the web reveals I could convert the VirtualBox image to raw format and then convert that raw format to a Qemu (qcow2) image. I'm familiar and comfortable with VirtualBox and already have a Slackware 12.2 image available. Creating the Qemu disk image through this VirtualBox image makes sense to me.

I don't understand all that is transpiring in this portable/virtual how-to, but seems to me, after converting to qcow2 format, I should be able to run that same VirtualBox image with this portable technology.

Am I correct or am I missing the big picture?
 
Old 05-15-2009, 01:45 PM   #9
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Hmm. I tried to answer my own question.

The scripts worked fine as far as creating a new disk image from scratch and running the Slackware ISO image.

I next converted my Slackware 12.2 VirtualBox image to raw format and then to qemu format.

vditool COPYDD Slackware.vdi Slackware.img
qemu-img convert -f raw Slackware.img -O qcow2 hda


I maintained the disk image file name of 'hda'.

When I ran the slk_run.sh script I received the error message:

Boot from Hard Disk 0 failed
FATAL: Not a Bootable Disk


The original VirtualBox image booted fine.

Next I guessed that perhaps the portable version of qemu being used might not support qcow2 but only qcow:

qemu-img convert -f raw Slackware.img -O qcow hda

Well, what do I know --- the slk_run.sh script booted the image just fine! Note to self: the image must be qcow format and not qcow2 format.

I had configured my Slackware 12.2 VirtualBox image to boot into run level 3. The new Qemu version booted to the login prompt. There were some glitches connecting to my host machine NFS shares. Yet I logged in without event.

Running startx failed but the reason is the original xorg.conf is configured with the VirtualBox video driver. Yet I maintain several versions of xorg.conf just for testing. I copied the vesa version and then startx was able to run.

KDE booted. Arts failed and because Qemu does not provide a seamless integrated mouse, the mouse buttons were reversed. Nonetheless, my converted Virtualbox image was running.

Speed? Slow. Of course there is no kernel accelerator running. That will be a problem with any corporate locked down machine.

The slk_run.sh script does not contain any support for networking. I'm unsure whether this important but Samba and NFS work fine in my VirtualBox image but not with the converted Qemu image. Trying to copy my VirtualBox configuration I added:

-net nic,model=pcnet -net user -net tap1

But that did not enable networking. As I am new to Qemu, I don't yet know what I'm missing.

Questions:

With Qemu is there a way to force X/KDE to run at 60 Hz, the native resolution of my LCD monitor? When running the virtual machine in VirtualBox, KDE indicates the display is running at 60 Hz. With Qemu KDE indicates 76 Hz.

Does Qemu provide a seamless mouse integration or is the user stuck using Ctrl-Alt all the time?
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Slackware Essentials" or "Slackware Linux Basics" ? alMubarmij Slackware 3 03-14-2009 07:51 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
LXer: "Portable Firefox" 1.5.0.5 released LXer Syndicated Linux News 0 07-29-2006 08:33 PM
ignoring the "non-portable whitespace encountered at line " warning Jake13 Linux - Software 3 08-18-2004 12:34 PM


All times are GMT -5. The time now is 09:16 AM.

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