diff options
-rw-r--r-- | buildgnuonqemu.mdwn | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/buildgnuonqemu.mdwn b/buildgnuonqemu.mdwn index 97ce3b83..c5fb8da3 100644 --- a/buildgnuonqemu.mdwn +++ b/buildgnuonqemu.mdwn @@ -10,52 +10,59 @@ Creating a bootable qemu image from a root filesystem and bootloader 1. Create a hard disk image -<pre>qemu-img create -f qcow <imagename.img> <size>G</pre> + qemu-img create -f qcow <imagename.img> <size>G -2. Use a live CD (better to have a lighter OS like system rescue CD to make the process faster) and the image created to boot. +2. Use a live CD (better to have a lighter OS like system rescue CD to make the + process faster) and the image created to boot. -<pre>qemu -cdrom /dev/cdrom -hda <imagename.img> -boot d</pre> + qemu -cdrom /dev/cdrom -hda <imagename.img> -boot d -3. Once system is booted use a partition editing tool (like fdisk, cfdisk, parted, gparted, qtparted ...) to partition the image. +3. Once system is booted use a partition editing tool (like fdisk, cfdisk, + parted, gparted, qtparted ...) to partition the image. -<pre>cfdisk</pre> + cfdisk -create the necessary partitions (root and swap partitions boot, home ... if required) + create the necessary partitions (root and swap partitions boot, home ... if + required) 4. Create a file syatem for the root partiotion -<pre>mke2fs /dev/hda1</pre> + mke2fs /dev/hda1 5. Mount the partition -<pre>mkdir disk -mount /dev/hda1 disk</pre> + mkdir disk + mount /dev/hda1 disk -6. Copy the file system from the host machine to the mounted directory (use a compressed file system to make the copying faster) +6. Copy the file system from the host machine to the mounted directory (use a + compressed file system to make the copying faster) -Grab the GNU spapshot from ams' site <http://www.update.uu.se/~ams/home/slask/GNU/> + Grab the GNU spapshot from ams' site + <http://www.update.uu.se/~ams/home/slask/GNU/> -<pre>scp <user>@<host>:<path to the compressed file system> disk</pre> + scp <user>@<host>:<path to the compressed file system> disk 7. Uncompress the files -<pre>cd disk -tar -jxvf <compressed filesystem></pre> + cd disk + tar -jxvf <compressed filesystem> 8. Unmount the mounted partition -<pre>cd .. -umount disk</pre> + cd .. + umount disk 9. power off the guest OS. -<pre>poweroff</pre> + poweroff -10. To make the file syatem bootable download a grub floppy image ([[http://hurd.in/pub/Hurd/HurdOnVMware/grub.img][grub.img]]) +10. To make the file syatem bootable download a grub floppy image + + <http://hurd.in/pub/Hurd/HurdOnVMware/grub.img> 11. Run qemu to boot into your brand new system -<pre>qemu -hda <hard disk image.img> -fda grub.img -boot a</pre> + qemu -hda <hard disk image.img> -fda grub.img -boot a Happy Hacking !! @@ -64,27 +71,25 @@ Make your new system boot from the hard disk 1. Mount your grub image -<pre>mkdir floppy -mount -t ext2 -o loop grub.img floppy</pre> + mkdir floppy + mount -t ext2 -o loop grub.img floppy 2. Use previous steps 2 and 5 to boot from a liveCD and mount the partition -<pre>cd disk/boot -scp -r <user>@<host>:<path to mounted floppy image directory>/boot/grub .</pre> + cd disk/boot + scp -r <user>@<host>:<path to mounted floppy image directory>/boot/grub 3. Poweroff the guest -<pre>poweroff</pre> + poweroff 4. Boot new system using floppy image previous step 11 -use install to hard disk option if you used the above grub image - -or go to grub command line and type + use install to hard disk option if you used the above grub image -<pre>root (hd0,0) -setup (hd0) </pre> + or go to grub command line and type -Now you have a bootable system image. Enjoy Maadi !! + root (hd0,0) + setup (hd0) --- PraveenA - 21 Jun 2006
\ No newline at end of file + Now you have a bootable system image. Enjoy Maadi !! |