Installing Puppy Linux on VirtualBox

Booting, installing, newbie
Post Reply
Message
Author
garethrichardadams
Posts: 5
Joined: Sun 19 Aug 2007, 09:40

Installing Puppy Linux on VirtualBox

#1 Post by garethrichardadams »

Hi all,

I want to install Puppy Linux on a virtualbox and run that virtualbox from my usb stick...

As the virtualbox will be running off my usb drive I'd like to reduce the "writes" as much as possible. When I install using the universal installer I'm given the option of internal CF card or internal hard drive...If I select internal CF card will this reduce the number of "writes" or doesn't it make any difference?

Thanks

Gareth

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#2 Post by Burn_IT »

If you don't mind me asking, why are you running it under Virtualbox from the USB?
That seems to be adding unnecessary overheads to me!
"Just think of it as leaving early to avoid the rush" - T Pratchett

garethrichardadams
Posts: 5
Joined: Sun 19 Aug 2007, 09:40

#3 Post by garethrichardadams »

Don't mind you asking at all!

I've got a portable version of virtualbox so I can run it on any machine I want (I think I may need admin access but that's not usually a problem).

It means I can then run it at work and do a bit of dev in my lunch hour without having to reboot all the time. Also, my home laptop will boot from USB but I have to edit the BIOS every time I do it - PITA....

Gareth

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#4 Post by Burn_IT »

Ah I hadn't though of that scenario.

Have you tried 'kidding' the Universal installer into thinking the Virtual disk is a USB stick??

I tend to 'cheat' when running Portable Apps like FireFox from USB anyway because of the time they tend to take to load.

What I do is copy the App folder to the temporary folder on the local hard drive (takes little time) and run it from there - then move it back when I've finished.

The other thing I have is a 1 inch microdrive which removes the problem. The only thing is that it is theoretically slower than flash storage BUT has two advantages.
1) Writes get buffered properly by the OS provided that you tell it to Optimise the drive for speed (once only per OS installation needed as it is remembered)
2) It doesn't suffer from the lots of small files effect so is actually faster than flash for most practical purposes.

see: http://www.global-b2b-network.com/b2b/9 ... drive.html
"Just think of it as leaving early to avoid the rush" - T Pratchett

MattN
Posts: 14
Joined: Sat 16 Aug 2008, 15:59

VirtualBox

#5 Post by MattN »

Hi,

I'm running VirtualBox on Puppy 4.1.2. This is being written on Develpup running as a guest system on VirtualBox. I have three different disks I can use at this time.

What I did is got VirtualBox installed and set a virtual drive called work and set the CD to the ISO I want to install. I then boot up the image when I start VirtualBox making sure I do pfix=ram (I have to set the display to versa and the mouse to USB on my system). Once the cd image is running I run gparted to fix the drive so I can do the install (making sure I set the boot flag). Next I do an install to the hard drive (the virtual drive) using a frugal install to save hard drive space(I've never tried a full install in this environment). Next I run the grub loader to make the program bootable and put the loader in the linux partition. Now I replace the lines for the loading in /mnt/home/boot/grub/menu.lst with the ones from /tmp/newgrubtxt. Now I shut down the virtual machine (don't save the file), change the CD to the hardware CD, and reboot. This time I select everything as I did before and additionaly I set up the network. I restart the system and if everything went right it reboots into the system I just installed on the virtual disk.

A lot to read in that paragraph, but I'm pretty sure I got everything.

MattN
Posts: 14
Joined: Sat 16 Aug 2008, 15:59

VirtualBox

#6 Post by MattN »

Hi,

I'm running VirtualBox on Puppy 4.1.2. This is being written on Develpup running as a guest system on VirtualBox. I have three different disks I can use at this time.

What I did is got VirtualBox installed and set a virtual drive called work and set the CD to the ISO I want to install. I then boot up the image when I start VirtualBox making sure I do pfix=ram (I have to set the display to versa and the mouse to USB on my system). Once the cd image is running I run gparted to fix the drive so I can do the install (making sure I set the boot flag). Next I do an install to the hard drive (the virtual drive) using a frugal install to save hard drive space(I've never tried a full install in this environment). Next I run the grub loader to make the program bootable and put the loader in the linux partition. Now I replace the lines for the loading in /mnt/home/boot/grub/menu.lst with the ones from /tmp/newgrubtxt. Now I shut down the virtual machine (don't save the file), change the CD to the hardware CD, and reboot. This time I select everything as I did before and additionaly I set up the network. I restart the system and if everything went right it reboots into the system I just installed on the virtual disk.

A lot to read in that paragraph, but I'm pretty sure I got everything.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

Re: Installing Puppy Linux on VirtualBox

#7 Post by 8-bit »

garethrichardadams wrote:Hi all,

I want to install Puppy Linux on a virtualbox and run that virtualbox from my usb stick...

As the virtualbox will be running off my usb drive I'd like to reduce the "writes" as much as possible. When I install using the universal installer I'm given the option of internal CF card or internal hard drive...If I select internal CF card will this reduce the number of "writes" or doesn't it make any difference?

Thanks

Gareth
If you have VirtualBox and the virtual hard drive set up on the USB stick and start Puppy with Virtualbox from the cd, you should answer internal hard drive for the installation as well as installing Grub to it.
But...
Virtual Box on setup will write some interface drivers to the host pc.
So if you are trying to keep a clean system on your office pc, keep in mind that Virtual Box needs those drivers to interface with the computer you run it on.
Clear as mud?

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#8 Post by Burn_IT »

There is a Portable version of Virtual Box but I haven't tried it.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#9 Post by Burn_IT »

I've just tried the portable version of Virtualbox installed on a USB and running lucid520 frugal with save.
I've got it to work from the same stick both natively booting from it and starting it under Virtualbox portable under Windows.

However, in order to get it to boot into the USB under Vb you have to either set it up under a Virtual Disk on the USB (when a normal USB boot won't see it) or tell the Virtualbox to use the whole USB as a "rawdisk". when both work.
see: http://www.pendrivelinux.com/boot-a-usb ... irtualbox/

Unfortunately the run from USB under Vb has to be told that it is running from the hard drive PMEDIA=IDEHD or it cannot find the files as the only way to get Vb to boot is from hard disk,CD, or floppy(thinks is there a cheat there) and that has to be in syslinux.cfg in the version I looked at.
I may try it with grub4dos or even PLoP - and boot from USB??
"Just think of it as leaving early to avoid the rush" - T Pratchett

moB
Posts: 116
Joined: Mon 19 Oct 2009, 11:25
Location: Coastal

#10 Post by moB »

Portable VirtualBox leaves very little behind. It installs and removes the drivers and other traces (mostly) from host system.

If you've not got administrative privileges you will need patience, and to use qemu.

One can use raw disc access if one wishes to mount the puppies from actual boot as well as virtual boot. Use vboxmanage.
http://www.virtualbox.org/wiki/End-user_documentation
http://www.virtualbox.org/manual/ch09.html#rawdisk

Tibo's LiLi uses this method to boot from usb. http://www.linuxliveusb.com/

To make a raw disc with only selected partition access under msWin use the VBox (OSE). http://vboxwin32.sourceforge.net/

Raw disc with full or partial drive access is available in the PUEL for linux, too. OSE is improving, but still seems more resource hungry.
PUEL for msWin has only capability for whole disc access.

If you download the one available on the net install the Microsoft Visual C++ 2008 Redistributable Package first.
http://www.microsoft.com/downloads/en/d ... laylang=en
Ironic, to use an OSE one must install more proprietary stuff, which cannot be distributed along with the binary...

Note the OSE is incompatible with the PUEL version, so one must uninstall OSE to use portable...

All the best!

moB

with but a bit of broken sea-shell or a shark's tooth, that
miraculous intricacy of wooden net-work has been achieved
--Melville, Moby Dick

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#11 Post by Burn_IT »

I had a fiddle with it, trying to run it from PLoP, but it just locks up - as thinking about it it would.

I have been thinking about it and I have come to the conclusion that it is either never going to work or any workaround IS going to be dangerous using ONE stick. The reason for this being that both the host and the guest need write access to the stick at the same time ( which is why PLoP fails) and there is a strong warning in the VBox documentation about using raw write access with a drive that is in use by the host.
Basically they don't know about the other's use so WILL corrupt the drive if they both alter the FAT/MFT. (how does Puppy/SFS treat the the save file as far as the disk is concerned??)
I may try using two usb drives - a small one with Virtual VBox and a small DOS virtual disk on it and the second one as standard. Then use the first to load the USB drivers and do a wakepup or call to grub4dos.exe on the second one.
This should also allow the correct PMEDIA setting.
"Just think of it as leaving early to avoid the rush" - T Pratchett

moB
Posts: 116
Joined: Mon 19 Oct 2009, 11:25
Location: Coastal

#12 Post by moB »

Burn_IT wrote:I had a fiddle with it, trying to run it from PLoP, but it just locks up - as thinking about it it would.

I have been thinking about it and I have come to the conclusion that it is either never going to work or any workaround IS going to be dangerous using ONE stick. The reason for this being that both the host and the guest need write access to the stick at the same time ( which is why PLoP fails) and there is a strong warning in the VBox documentation about using raw write access with a drive that is in use by the host.
Basically they don't know about the other's use so WILL corrupt the drive if they both alter the FAT/MFT. (how does Puppy/SFS treat the the save file as far as the disk is concerned??)
1. Essentially the puppy uses a file of fixed size with a separate filesystem within it. msWin sees only the outside of the doghouse, so to speak.

2. You can safely use rawdisc access if you use a partition formatted in ext2, ext3, ext4, etc which msWin doesn't recognize.
Tibo's Lili, for example, makes an ext filesytem on a partition of the USB stick. msWin sees only the fat32 portion of the drive.
There he places syslinux to boot the computer and VirtualBox (portable, with his wrapper -- LiLi).
When using VirtualBox from msWin VBox boots the ext3 partition using rawdisc access.

You need only make an ext formatted partition and a rawdisc which accesses ONLY this partition:

Code: Select all

VBoxManage internalcommands createrawvmdk -myPuppyRocks /path/to/myPuupyRocks.vmdk -rawdisk /dev/sdb -partitions 2
for example, accesses only sdb2. This must be made new each time the drive is relocated, which is best done with a script.

I have safely used this method. It is not for beginners, or those who cannot follow a user manual ;)

I don't mean to tell anyone what to do. I'll even say "don't do it".

moB

"Bark Like a Dog"
--Spit, 1994

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#13 Post by Burn_IT »

I used his tool but it left mine as a Fat which I suspect it has to with a superfloppy that can only contain one partition.
I'll try it again with the drive empty.

I do know how the pup save (sfs) works in puppy, but I wonder whether it even touches the FAT (or whatever) of the containing drive or does it rewrite in place. It certainly would have to change something if you expand your save file.
"Just think of it as leaving early to avoid the rush" - T Pratchett

Post Reply