friedgold
Group: Members
Posts: 122
Joined: Mar. 2005 |
|
Posted: Sep. 15 2005,01:50 |
|
Quote (Borderpatrol @ Sep. 14 2005,15:59) | can you break that down a little simpler please. Im still learning this. |
I'm not sure which bit you want clarification on, doing it in windows or in linux. So I'll describe a way which should work on both.
1) We are going to use qemu-img to create a new hard disk image. To obtain this simply download the latest qemu from the qemu homepage. To create a 25MB image called newhd use the command
Code Sample | qemu-img create newhd.img 25M |
More info on qemu-img here
2) Now you've got a 25MB image but it's got no data on it. To put some data on it we are going to use DSL running in qemu. In the file dsl-windows.bat which is included with DSL embedded where you see the command
Code Sample | START qemu\qemu.exe -L qemu/ -enable-audio -localtime -kernel linux24 -initrd minirt24.gz -hda KNOPPIX/knoppix -hdb qemu/harddisk -append "qemu sb=0x220,5,1,1 frugal quiet" |
add the option -hdc /path/to/newhd.img (replacing path/to with the actual path to the file created in step 1). If you are doing this all in Linux then edit the dsl-linux.sh script instead.
3) Run qemu with dsl-windows.bat (or dsl-linux.sh if in Linux). DSL should boot up as normal. The old hard disk image can be accessed via /dev/hdb and the new hard disk image can be accessed via /dev/hdc. We need to format the new image so from a xterm/console inside qemu run
Code Sample | mkfs.ext2 /dev/hdc |
Now we need to mount this drive to copy files to it so run
Code Sample | rebuildfstab mount /dev/hdc |
Now mount the old hard disk image and copy your files to the new one
Code Sample | mount /dev/hdb cp -a /mnt/hdb/* /mnt/hdc |
Now shutdown. The new image will now be formatted and your settings from the original hard drive image have been copied to it. Now go back and change dsl-windows.bat (or dsl-linux.sh) so the new image is used instead of the old one. i.e. remove the option -hdb qemu/harddisk and change the option -hdc path/to/newhd.img to -hdb /path/to/newhd.img
|