Page 1 of 1

how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 12:52
by abu
Hello. I want to run some linux live CDs as guests on VirtualBox, and I want them to have full access to a shared folder on my host system (WinXP). I need some applications on those linux live CD (partimage, gparted, ...) to clone and then resize other virtual disks I already have (my Win2000.vdi is 4 GB in size, and I want move it to a bigger one). So, in think I should do the following configurate my virtual machine like this:

- Attach my 2 hard disks (small and bigger new) to the machine
- Attach the Linux liveCD iso image, to the machine CD
- When running the machine I want to use partimage to create an image copy of my first hard disk (Win2000.vdi) which I will later restore to the second disk (the bigger one). Partimage needs a folder where to store the images.

So I want to use the shared folders, but in order to do that I need to install Guest Additions on my running Linux.
Here I get lost, by 2 reasons. Since I am a complete newbie using Linux, I prefer to ask before trying impossible things:

1) Is it possible to install Guest Additions on a system that runs from an ISO CD image? (I mean, perhaps I can't use "apt-get install dkms" since the CD is not a writable system). I want to try several things (sysresccd.org, clonezilla, partimage ...) but I think the problem is the same whatever it is the liveCD I run.
2) Assuming point 1 is possible, Guest Additions do also have to be installed from ISO CD image.
How should I do that if the Linux system is already running from the same CD unit?

I searched for related posts but I don't see a clear answer to my questions:
http://forums.virtualbox.org/viewtopic. ... +CD#p10005
http://forums.virtualbox.org/viewtopic. ... 050#p19050

Many thanks in advance

Re: how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 13:35
by vbox4me2
It would be much easier to use samba (windows file sharing), just about any livecd has it onboard.

Re: how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 13:45
by abu
vbox4me2 wrote:It would be much easier to use samba (windows file sharing), just about any livecd has it onboard.
Don't know what is samba. If it's easier, could you summarize how to do it?

It might be easy for who knows how to use that, but I don't know a word about samba (perhaps it's something commonly used in Linux, but I am a less than a Linux newbie ... I just want to use a Linux live CD in order to clone Windows vdi disks).

Re: how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 13:47
by vbox4me2

Re: how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 13:57
by abu
vbox4me2 wrote:http://www.samba.org/
Thanks for your reply. As I see there, "Samba uses the TCP/IP protocol that is installed on the host server". I will look at that but I suspect that it will take me more time than learning virtualbox itself

My original need was accessing host folders in order to copy/read large files (whole disk images), so now I wonder if there is a lot of speed difference between virtualbox shared folders utility (which I suspect access folders as local resources), or samba TCP/IP (which I assume access disk images sending a lot of packages over the net). Just wondering

Anyhow, even assuming that Samba is easier and even faster for that purpose (thanks for your advise), I still don't know the answer to my question:
How to use virtualbox Guest Additions on a guest running from CD? (this affects not only shared folders but also some other utilities). At least, I would like to know: is it possible or impossible? Is this documented somewhere?

Re: how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 15:09
by vbox4me2
Only if you build the CD yourself, GA's are for most versions dependant on the Host version so its doubtfull anyone would/could make a generic combo. I haven't seen it yet though. And a samba share used locally is very fast.

Re: how to use Guest Additions from a Linux live CD

Posted: 13. Aug 2009, 20:23
by Sasquatch
Live CD + GA = not gonna work. You can't mount the GA ISO while the Live CD is running. You will get a lot of errors when you try to install them, because it can't fine the proper files and packages because they are on the Live CD, which you unmounted so you could mount the GA.

Searching for Samba on Google will give you a lot of results in how to set it up, how to mount shares and everything else you need to know. Setting it up and about everything else about it is outside the scope of this forum.

Re: how to use Guest Additions from a Linux live CD

Posted: 15. Aug 2009, 23:18
by The MAZZTer
Guest Additions need persistent storage through a reboot so it is not possible to use them with a live CD. However with the bridged or host-only networking types you can access shares on the host directly. With bridged or internal network types you can access shares on other VMs.

You can install the smbclient package or the smbfs package in order to mount Windows shares from your host or other guests (Windows, or Linux ones running the samba server).

With smbfs you can use the mount command with the type set to smbfs, device as //host/share. Username info is speified in -o with username="Name" IIRC, password is prompted for.

If you don't know how to do any of that, most live CDs have SMB support already in the GUI, just browse the Network for what you need using whatever built-in file manager is there.

You can easily install Linux onto a VM though, and then attach multiple VDIs and do your work from a bootable, Guest-Additions-able Linux virtual machine on those other disks.

Re: how to use Guest Additions from a Linux live CD

Posted: 17. Aug 2009, 14:32
by abu
The MAZZTer wrote:Guest Additions need persistent storage through a reboot so it is not possible to use them with a live CD.
... With smbfs you can use the mount command with the type set to smbfs
... You can easily install Linux onto a VM though, and then attach multiple VDIs and do your work from a bootable, Guest-Additions-able Linux virtual machine
Thank you all for your replies. So It seems to me that learning samba will be the best option in my case