Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: QEMU virtual harddrive, Want to expand harddrive size for DSLs< Next Oldest | Next Newest >
Hasbro35 Offline





Group: Members
Posts: 10
Joined: Dec. 2004
Posted: Jan. 10 2005,23:44 QUOTE

I tried to replace the existing QEMU virtual harddisk file "harddisk" by using "qemu-img create harddisk 500M" (I am using a  1 GB Lexar Jumpdrive)

The command line above creates a 500M file in the default RAW format.

Two questions:
1. Is RAW the correct format?
2. Are there default files on the default 60K harddisk that need to be copied to the new 500MB harddisk (if so is there a better method to upgrade the size of the virtual drive file)?
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Jan. 11 2005,05:20 QUOTE

I do not use the qemu-img program. Instead I do everything from DSL.
To make the pseudo harddrisk I used the following 2 steps from DSL.

dd of=harddisk bs=1024 seek=60000 count=0

mke2fs harddisk  ( ignore the warning and proceed )

There are files on the default 60MB harddisk. The backup.tar.gz is there.
Since qemu is a "known" virtual machine, it has a pre-made backup.tar.gz on hdb The sound blaster modprobe is in the opt/bootlocal.sh.

If you make a larger pseduo harddisk, with a different name of course, then mount both the 60MB and your new one.

Something like this:

mkdir /mnt/test2

mount harddisk /mnt/test -o loop
mount newdrive /mnt/test2 -o loop

Then copy over the backup.tar.gz.

cp /mnt/test/backup.tar.gz /mnt/test2
umount /mnt/test
umount /mnt/test2

Then you can delete the 60MB one, rename the larger one to harddisk and you should be good to go.
Back to top
Profile PM WEB 
pcause Offline





Group: Members
Posts: 33
Joined: Dec. 2004
Posted: June 22 2005,00:37 QUOTE

Do you do the dd command from DSL running under qemu?  What direcotry are you in when you do the command?
Back to top
Profile PM 
meo Offline





Group: Members
Posts: 552
Joined: April 2004
Posted: June 22 2005,07:29 QUOTE

Hello pcause!

I've made a small HOWTO about the matter (for personal reference) and here it comes:


HOWTO make a new virtual HD in DSL-embedded

Boot from DSL-embedded on a usb-drive

Make the new virtual hd in “Xshells -> Root Access”

#mount -rw /dev/hda1 /mnt/hda1

#dd if=/dev/zero of=/mnt/hda1/harddisk bs=1024 count=410000
(This will create a 400 MB virtual drive; that's what I use)

#mke2fs /mnt/hda1/harddisk
(Just ignore any warning and proceed)


Copying over files to the new hd

#mount /mnt/hdb

#mount /mnt/hda1/harddisk /mnt/test -o loop

#cp /mnt/hdb/backup.tar.gz /mnt/test

#umount /mnt/hdb

#umount /mnt/test

As you can see I prefer to make the new drive on hda1 and that means I can use the actual name harddisk. So you can do it either ways.

Have fun,
meo


--------------
"Live and let live"   Treat others the way you want to be treated because that's what you should expect from them.

"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire
Back to top
Profile PM 
pcause Offline





Group: Members
Posts: 33
Joined: Dec. 2004
Posted: June 22 2005,10:50 QUOTE

Thanks and that is an excellent write up.  Unfortunately, my laptop can't boot from a USB device.  Is there was way to do this from DSL running on qemu?
Back to top
Profile PM 
8 replies since Jan. 10 2005,23:44 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: QEMU virtual harddrive

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code