PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 25, 2012, 10:56:47 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: PCLinuxOS - Installing from USB key to Virtual Box  (Read 275 times)
erbad
Jr. Member
**
Offline Offline

Posts: 27


« on: February 02, 2012, 09:36:39 PM »

I have a fully customized copy of PC Linux OS that I run off of my USB key.  I have been trying to install it into a Virtual Box virtual machine.

The problem is that when I start Virtual Box, I can't boot off USB to install my custom copy of PC Linux OS.  I've also done a copy/paste of all of the files on my USB key and moved them onto a DVD disc and tried to boot that way, but I can't boot it that way either.

I know there is not a problem with the DVD drive because I installed Windows 7 and the USB key is being recognized.

I'm just not sure why I'm having so much grief installing PC Linux OS either off USB or DVD.

Any thoughts?

Thank you
Logged
djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5695


I don't do Windows


« Reply #1 on: February 03, 2012, 02:15:23 AM »

If you copy the files to a DVD drive, you end up with a DVD data disk. There is no boot record on the DVD to boot from. There are a couple of ways to do this, but your post is very short on details. For example, you say you installed Windows7. Did you install it to the host computer or to VirtualBox?

1. What OS or multiple OSes are you running on your computer?
2. What is the host OS for VirtualBox?
3. How is your USB device set up? Is the PCLinuxOS installation on USB an iso file with persistence mode enabled so you can save changes? Or is it a full installation to the USB, just as you would do to a fixed hard drive?
4. Where is the GRUB boot record for PCLinuxOS stored on the USB? Is it in the MBR or in the PCLinuxOS root partition?
5. What Windows filesystems are installed on the host computer?
6. What Linux filesystems (if any) are installed on the host computer.

I have a 16GB USB drive with a very recent PCLinuxOS iso stored on it. The USB is bootable as a live USB, much the same as it would be from the iso itself, except that persistence mode is available, and I can save any session changes made to the USB drive. I just created an image file with the USB's contents as the input. I then used that image file to successfully boot a VirtualBox session.

There are two ways to accomplish what you want to do. Both require writing an image file somewhere to the host system. You may have to change the resulting image file's attributes before working with it. I don't know how well NTFS would work with changing the attributes, if it becomes necessary. Any FAT filesystem would fail at the task.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4619


MLUs Forever!


« Reply #2 on: February 03, 2012, 07:33:09 AM »

I have a fully customized copy of PC Linux OS that I run off of my USB key.  I have been trying to install it into a Virtual Box virtual machine.

......

You should be able to create an ISO of the USB device and then use that in Virtualbox.

I have not tried this but the following command might do it for you ......  you need to change the items in Red to suit your situation ...


dd  if=/dev/sdX  of=/home/<user name>/MyUSB.iso  bs=2048  conv=sync,notrunc

Worth a try anyway ....  Wink
Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5695


I don't do Windows


« Reply #3 on: February 03, 2012, 10:53:36 AM »


You should be able to create an ISO of the USB device and then use that in Virtualbox.


Yes, that would be method #1. Only, I was thinking of running the mylivecd script from his running USB session.


I have not tried this but the following command might do it for you ......  you need to change the items in Red to suit your situation ...

dd  if=/dev/sdX  of=/home/<user name>/MyUSB.iso  bs=2048  conv=sync,notrunc


Don't know if that would work. I know what does. This is how I did it.

# dd if=/dev/sdd of=USBdisk.hdd
# chown uname:uname USBdisk.hdd
# chmod 664 USBdisk.hdd

You can then use the image as your VirtualBox hard drive. It works.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4619


MLUs Forever!


« Reply #4 on: February 03, 2012, 11:13:57 AM »

Yes you are of course correct .......  Virtual box needs to use the resulting file as a HDD rather than a bootable CD/DVD.

Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
erbad
Jr. Member
**
Offline Offline

Posts: 27


« Reply #5 on: February 03, 2012, 05:34:55 PM »

@djohnston, @Just18 Here are the responses to each of your questions

1. What OS or multiple OSes are you running on your computer?

The host has another distro and I have one VM with Windows 7


2. What is the host OS for VirtualBox?

another distro


3. How is your USB device set up? Is the PCLinuxOS installation on USB an iso file with persistence mode enabled so you can save changes? Or is it a full installation to the USB, just as you would do to a fixed hard drive?

It is a full installation to the USB key.  I boot off the USB key and use the copy to RAM feature.  Once the OS is loaded in RAM, I pull the key out so that nothing gets written to it.

4. Where is the GRUB boot record for PCLinuxOS stored on the USB? Is it in the MBR or in the PCLinuxOS root partition?

Honestly, I don't know what this means.  At one time, PC Linux OS was installed on a PC and I had created an ISO which I then installed on the USB key. 

5. What Windows filesystems are installed on the host computer?

Windows 7 is a virtual machine within Virtual Box

6. What Linux filesystems (if any) are installed on the host computer.

another distro is the host OS

@Just18, I saw your command dd  if=/dev/sdX  of=/home/<user name>/MyUSB.iso  bs=2048  conv=sync,notrunc

How do I know what the X stands for and what user name to use?

Also, you mentioned, "You should be able to create an ISO of the USB device and then use that in Virtualbox."

That is a good point and could work.  Since there isn't enough space on the USB key to create the ISO, once I have the OS in RAM, what command would I use to have the ISO created on the hard drive that is in the computer?
Logged
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4619


MLUs Forever!


« Reply #6 on: February 03, 2012, 05:55:28 PM »

Quote
It is a full installation to the USB key.  I boot off the USB key and use the copy to RAM feature.  Once the OS is loaded in RAM, I pull the key out so that nothing gets written to it.

I think this is contradictory .....  copy to ram is available for Live installs not full installs.

Seems to me you have a live install.

****

Log in to your install, with the USB device free to be inserted and withdrawn.
Run the command from there.
If you are running live then change the path of the 'of=/' part of the command to point to some place you have space for the resulting file ......  4GB for a 4GB USB stick; 32GB for a 32GB USB stick etc.

Quote
@Just18, I saw your command dd  if=/dev/sdX  of=/home/<user name>/MyUSB.iso  bs=2048  conv=sync,notrunc

How do I know what the X stands for and what user name to use?

Also, you mentioned, "You should be able to create an ISO of the USB device and then use that in Virtualbox."

<user name> is the user name of your log in account

You can determine 'X' by using


fdisk -l

in a terminal, as root, and checking the details of the disks that it lists.
If you do it without the USB device plugged in, and then with it plugged in, it will become apparent what the device designation is.

Change the command to

dd  if=/dev/sdX  of=/home/<user name>/MyUSB.hdd  bs=2048  conv=sync,notrunc

and use the MyUSB.hdd file as a virtual HDD for VBox to boot.
I did it here earlier today.
It works well.

Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5695


I don't do Windows


« Reply #7 on: February 03, 2012, 08:54:25 PM »

You guys have fun. I'm outta here.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM