HOWTO Run another Linux from inside Puppy

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
Guest

HOWTO Run another Linux from inside Puppy

#1 Post by Guest »

HOWTO Run another linux distribution from within Puppy without rebooting

[moved and extended from "Cutting edge"]

You reason for doing so might be
- make a "breeding house" for your puppet (e.g. Vector Linux)
- run applications, which you don't want to put on your slim puppy (e.g. TeX)
- examine how other distributions work
- learn why "chroot" is so cool

Disadvantages:
- The proper boot configuration is not done, and sometimes needs a little manual help
- It still does run on a Puppy kernel, so maybe there are drivers missing

Step 1 Installing your alien distribution

If you already have an installed distribution skip to step 2

You could either install the distribution by usual means (e.g. install CD) on a dedicated partition. Your documentation or your distro of choice will tell you how.
If you do not need to boot into your new distribution, but just want to run it from Puppy, you can also install it in a mountable directory on a ext2/ext3/reiserfs filesystem (e.g. a linux partition or the /root directory of your puppy). NTFS/VFAT filesystems do not work directly because of lacking permission settings).
I will show you how to do that with Vectorlinux, as this is the new standard development environment for Puppy. It should be similar for any Slackware-based distribution. Debian has something similar, search for "bootstrap".
1. Download the Vector Linux iso named VL-5.1-std.iso from www.vectorlinux.com, if you haven't done it yet. Alternatively you could use an existing install cd.
2. Mount this somewhere (that means, include it in the filesystem tree)

For the iso file you type in an rxvt

Code: Select all

cd /path/to/directory-i-have-put-the-iso
mount -t iso9660 -o loop VL-5.1-std.iso /mnt/linux2
If you use the cdrom:

Code: Select all

mount /dev/cdrom /mnt/linux2
(i use /mnt/linux2 for simplicity reasons here, you can choose another directory)

3. Create a directory on a filesystem, where you have enough
room (about 1GB) for the installation and extract the system (thank $DEITY_OF_YOUR_CHOICE for Slackware)[
You can also use the /root directory, but make sure to expand it enough(via Start -> Utilities -> Resize /root filesystem
Assuming you want to install it to /mnt/home/vector

Code: Select all

mkdir /mnt/home/vector
cd /mnt/home/vector
tar xvjf /mnt/linux2/veclinux/veclinux.bz2
tar xvjf /mnt/linux2/veclinux/vlconfig.bz2

Step 2 Run in your new distribution

Make sure, that you have your distribution somewhere accesible in the tree - in other words, have it mounted.

Assuming your alien distribution is installed in /mnt/home/vector, a magic

Code: Select all

chroot /mnt/home/vector
typed into a rxvt or xterm would make this terminal running in the new distribution environment. So every program you run in there searches for needed libraries and configurations in this directory. What it actually does is running a new shell in which /mnt/home/vector is assumed to be / (the "root").
So, if you want to run something from this distribution in the future, open a terminal, "chroot" to the appropriate directory and run the application (e.g. gcc, make, tex, gimp ... whatever).

Caveat 1 (does not affect Vector Linux): some distributions install there main filesystem across multiple partions. Pay attention during the installation and make sure these partitions are mounted in the right place before you chroot. Assuming, hda1 is supposed to be /, but hda2 holds /usr you need something like:

Code: Select all

mount /dev/hda1 /mnt/linux2
mount /dev/hda2 /mnt/linux2/usr 
Caveat 2: Because the distributions are not booted properly, there might be problems with the configuration, e.g. network

For Vector Linux installed as described above, you may need to run several configuration tools once in order to get your system running.

Code: Select all

netconfig
and afterwards perhaps

Code: Select all

dhcpd
for network

Code: Select all

mouseconfig
for mouse

Code: Select all

xorgsetup
to configure the X system

If you want to run the X server from Vector Linux, shutdown the running X (Ctrl+Alt+Backspace), chroot on the console and type "startx". You do not need this if you just want X applications (like Firefox, Gimp etc.).

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

well I did all that 8)

went to a rxvt prompt typed in the chroot thingee

and then
cdroast (which I found by running slapt-gui and clicking on installed) and seemed to get a running prog. I also managed to run a snazzy looking xchat and gaim BUT I am not connected to the net with them - yet

Now to connect to the net and try my original reason - to compile a .c program with make . . .

(what do I need with make?

bash# make test
?

where test is a test.c file or something more
did some research but any advisement welcome :)

Hey if I can do it - a halibut can do it

Are you smarter than a halibut?

8)

Go Puppy Go!
Attachments
cdroast.jpg
(90.67 KiB) Downloaded 2727 times
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

doopdoop

#3 Post by doopdoop »

make is an utility for building C programs. It's purpose is to release the developer from the burdens of complex invocations of the compiler, and to allow actions like installation.
It expects to find a file called "Makefile" in the place you invoke it.
See for example:
http://www.emba.uvm.edu/~snapp/make.html
how to write one.
Complex applications, which are offered to be downloaded and compiled, either include Makefiles on their own or mechanisms to produce one (you might have seen the sequence "./configure;make;make install" somewhere, this is exactly that)

dougtheslug
Posts: 31
Joined: Wed 01 Jun 2005, 11:38
Location: Etobicoke , Ontario ,Canada
Contact:

running DEBIAN in Puppy

#4 Post by dougtheslug »

Is it possible to bootstrap Debian ?
it would be great to use Debian apt-get and have acces to the repository for new programs
Show them how to make their own bread and tomorow the will have their own bakery

doopdoop

#5 Post by doopdoop »

Yes ,it should be possible. (I only started it up to the point where the actual download of packages begins)

See
http://capricorn.woot.net/~jdrew/debian-chroot.html
This is for Red Hat, but all the necessary tools (ar, tar) are in Puppy, so it should work. Please give feedback about your experiences.

dougtheslug
Posts: 31
Joined: Wed 01 Jun 2005, 11:38
Location: Etobicoke , Ontario ,Canada
Contact:

debian in puppy

#6 Post by dougtheslug »

I read and tried those exact instructions a couple of weeks ago while googling for an answer in this subject but could not get it to download anything , If I remember correctly the error was that the Var dir did not exist.
Show them how to make their own bread and tomorow the will have their own bakery

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

What "make" is

#7 Post by rarsa »

Lobster:

Actually in the most general sense make is a tool to coordinate the execution of commands that generate files from other files.

Make checks if the source file is newer than the output file, if it is, it executes the designated command. If the output file is newer, that step will be skipped (unless you pass a parameter to make to ignore the output file time)

It also has some kind of 'scripting' abilities where it can include or exclude steps or pass different parameters to the designated command based on the parameters passed to make.

Most commonly make is used to compile and link executable programs or libraries.

It is not only used to 'compile' C programs. A large variety of development environments depend on make to coordinate the generation process.

I hope that this didn't confuse you more.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#8 Post by Lobster »

rarsa wrote:Lobster:
I hope that this didn't confuse you more.
When you are as confused as me a little more is no problem

:? all I wanted is the command line to compile a simple .c program
that I have edited or copied and saved from an editor :oops:

If I can successfully compile with from Vector Linux(now running as a Puppy sub process)
my conversion to uber-geek will be one step closer . . .

:roll:
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#9 Post by Bancobusto »

U-BER-GEEKS frickin' rock!


Hang in therer Lobster....



:D :D :D :D :D
Freedom isn't just a Puppy-Linux forum member!

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#10 Post by rarsa »

Then for a simple program you don't even need make.

You just need the compiler. You would normally pass the source files and libraries as parameters and the compilation directives as parameters and that's it.

For a very simple program. e.g. Hello world you don't even need compilation parameters

Code: Select all

cc hello.c -o hello

# Or if you use gnu C compiler

gcc hello.c -o hello
Will get the hello.c source file and will generate a hello executable file.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#11 Post by Lobster »

thanks for that - just what I required - easy when you know how - mindless trudging - wondering why such simple things are difficult to find sometimes - thanks again ;)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

dougtheslug
Posts: 31
Joined: Wed 01 Jun 2005, 11:38
Location: Etobicoke , Ontario ,Canada
Contact:

damnsmall & Puppy

#12 Post by dougtheslug »

I installed damnsmall in a separate partition and chrooted into it . I was able to run Damnsmall without rebooting , only problem I could not go back to puppy without rebooting , no matter what combination of keys I used, I soon as I exit damnsmall my screen went black and I had to reboot .
is there a trick or maybe I was thinking the init comand But I'm not sure how to use it to get out of X and back into puppy.
help any one!!!.
Show them how to make their own bread and tomorow the will have their own bakery

Post Reply