DSL Embedded :: QEMU virtual harddrive



Qemu provides a virtual machine. You have access to these currently "too small" drives that you wish to make larger. So, no. You need to access some physical drive that can provide the space to create the larger file, the "virtual drive" in. Even if you have a monster windows box and you have enough ramdisk for this file, you would still need samba or some such setup to make it possible to write this file to a real hard drive. It is so much easier to boot from DSL to do this task.

Since your question really has nothing to do with DSL, maybe you should check the Qemu support site. If you find a way. Please share.

The solutions I have found are to use qemu-img or a Windows "dd" program.  Haven't tried the windows dd program yet, but here is the one I've found -dd for windows
I had problems with all the above procedures.  This is what worked for me.  btw,  I do not keep the original backup.tar.gz file in this process.  I haven't found an easy way to do that.  I believe that it is not needed on new installs.  But I'm a DSL newb so that may be incorrect.  Someone please post if this is not the case.

I had the problem of not being able to install to a 128M pendrive because it really only had 124M (bad sectors).  So I actually needed to make a smaller harddisk, before I could even boot to DSL.

These instructions are done on Ubuntu Linux as the host system.

Make the pendrive as per the embedded instructions first.  If you had the problem like me of too small of a destination then remove the "/qemu/harddisk" file from the copy.  Thats the file we are going to recreate.  I would imagine most people will be installing to larger pendrives (not smaller like mine) and won't have a problem as you'll be just replacing the "harddisk" file.
(btw qemu was not part of the regular Ubuntu install - "#apt-get install qemu" will help out there)

I'm assuming your pendrive is /dev/sda1 substitute if different.

Make sure it is mounted:
#mount -t vfat /dev/sda1 /mnt/sda1

#cd /mnt/sda1/qemu
#qemu-img create harddisk 56M  <--Change to what size you want here.
#mke2fs harddisk     <--- Ignore the warnings...hit y to proceed


Now boot DSL.  (I used QEMU exclusively so it should work for you too).

At this point the drive was visible under DSL, but it wouldn't work (unknow filesystem).  I'm not completely sure why it didn't but it's easy to recreate the filesystem using DSL.

So under DSL:
#mke2fs /dev/hdb  <-- Again ignore the warnings...

Try to do a backup in DSL:
#filetool.sh backup

If you get errors/hangs check the file "/opt/.backup_device" it should have just one line with "hdb" on it.  For some reason mine was empty, but once I added it everything worked.  

Using filetool.sh as a debug tool helps.  It will give you errors that should help you fix any problems that come up.

Once you can backup without errors go ahead and shutdown and restart DSL (for good measure).

You should have a working "hdb" of your new size in DSL.

btw, I'm using a pqi i-stick.  Nothing like having a DSL in your wallet.

I think that the biggest thing provided by the backup.tar.gz is the startup command that is used to activate the virtual PC's sound card driver.

So if you dumped your backup.tar.gz, then you probably have no sound being produced from inside your DSL embedded PC.


original here.