Copying image of USB drive to hard drive

Blitzrommel

2[H]4U
Joined
Sep 26, 2001
Messages
2,659
I was given a USB drive which has a working, configured linux OS on it, and would like to copy that to the hard drive of a server I wanna run it off (Doesn't seem to support USB booting). How do I accomplish that? I was thinking of burning a Knoppix disk and with both the USB and SCSI RAID detected, I can just run dd or whatever needs to be done. Anyone? :)

Basically, the OS on the USB drive is made to be embedded.
 
Anyone? :) I'm sure it's just a simple command.. :p

EDIT: I tried using Ghost 8.2, made a boot disk for USB and SCSI support -- copied everything over, but kept getting "boot error" -- probably because these files were originally supposed to be loaded off a USB drive.
 
You are being silly. If your USB distro doesn't offer an install script or instructions for a hard drive install, you will need to do quite a lot to make this work. No sane person is going to walk you through this on an Internet forum.

Some of the issues are touched on here.
 
Running a 'live' environment from a USB stick is far different from running a full fledged OS off a hard drive. I don't think it's worth the trouble in comparison to actually installing a distro on the hard drive.
 
You are being silly. If your USB distro doesn't offer an install script or instructions for a hard drive install, you will need to do quite a lot to make this work. No sane person is going to walk you through this on an Internet forum.

Some of the issues are touched on here.

I was not aware this required more work than just copying over, didn't think that was "silly".
 
Running a 'live' environment from a USB stick is far different from running a full fledged OS off a hard drive. I don't think it's worth the trouble in comparison to actually installing a distro on the hard drive.

Would if I could, but I only received it in this USB live form.

By the way, it's ESX 3i.
 
Would if I could, but I only received it in this USB live form.

By the way, it's ESX 3i.

VMware server...hmm. Typically live distributions contain a compressed image/filesystem (often squashfs) which is loaded and decompressed into a ram disk. This is much different than how a regular install works and would definitely take alot of finagling to make it work on a regular hard drive.
 
I was afraid you'd say that. :)

I suppose I should be trying this on a server that actually handles usb booting well.
 
USB drive contains embedded ESX server on it? That something I have not seen before, can you post more info about it? Can you post a list of files on the USB.

Eugene
 
USB drive contains embedded ESX server on it? That something I have not seen before, can you post more info about it? Can you post a list of files on the USB.

Eugene

I can confirm that it does exist. I've seen one in action at work :D
 
I did something similar when migrating from one HDD to another.

All that was necessary was a simple copy command like:
Code:
cp -rp /mnt/drive1/* /mnt/drive2

and then installing grub on the new drive.

I'm not sure why this wouldn't work, but some apparently think it wouldn't. Can anyone elaborate on why?
 
cp -rp /mnt/drive1/* /mnt/drive2
A more correct way is to use the "-a" option, but this still seems to have problems with symlinks and it ignores dotfiles (.*). A tar pipe or cpio is a better way, in my opinion.

I'm not sure why this wouldn't work, but some apparently think it wouldn't. Can anyone elaborate on why?
Besides dealing with the bootloader:
  • The root filesystem should be uncompressed onto the target media
  • The init scripting must be modified to eliminate the unionfs/aufs stuff
  • System configs need modified for the computing environment (fstab, network configs for static IP/ntp/network services and so forth; a normal distro installation handles this automatically during installation)
  • The initramfs needs rebuilt, or discarded in favor of a custom kernel
  • udev and HAL rulesets are often different between Live distros and HD installed distros
There's a lot more to it than just a copy'n'paste. Definitely not worth the effort for a Linux distro. However, for a proprietary thing like this ESX LiveUSB drive, it might be. The OP didn't say what he was dealing with up front. **

OP said:
I was not aware this required more work than just copying over, didn't think that was "silly".
I apologize. The emoticons in your post led me to believe you were deliberately oversimplifying the situation.

** Of course, there's that whole software licensing issue... It appears that the OP doesn't have one, or he would be using the regular ESX installation for this.
 
It's an NFR license, it was given out at a seminar VMWare had. Not that it's relevant to the issue at hand, but anyway, thanks for pointing that out regarding the licensing.

Anyway, it is designed to boot off an embedded device such as a compactflash card or USB-bridged device -- if you buy a virtualization server from Dell or HP, this is how VMWare ESX 3i will be loaded. I suppose I should have explained this at the beginning.
 
Back
Top