From e9a9236364ff596839fa2a0cc21b6e60ef69bc2b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 13 Nov 2007 20:15:12 +0100 Subject: Move to a suitable place. --- buildgnuonqemu.mdwn | 95 ----------------------------------- howtos.mdwn | 3 +- hurd/running/gnu.mdwn | 1 + hurd/running/gnu/create_an_image.mdwn | 95 +++++++++++++++++++++++++++++++++++ hurd/running/qemu.mdwn | 3 ++ 5 files changed, 101 insertions(+), 96 deletions(-) delete mode 100644 buildgnuonqemu.mdwn create mode 100644 hurd/running/gnu/create_an_image.mdwn diff --git a/buildgnuonqemu.mdwn b/buildgnuonqemu.mdwn deleted file mode 100644 index c5fb8da3..00000000 --- a/buildgnuonqemu.mdwn +++ /dev/null @@ -1,95 +0,0 @@ -[[meta copyright="Copyright © 2007 Free Software Foundation, Inc."]] -[[meta license="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU_Free_Documentation_License|/fdl]]."]] - -Creating a bootable qemu image from a root filesystem and bootloader - -1. Create a hard disk image - - qemu-img create -f qcow 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. - - qemu -cdrom /dev/cdrom -hda -boot d - -3. Once system is booted use a partition editing tool (like fdisk, cfdisk, - parted, gparted, qtparted ...) to partition the image. - - cfdisk - - create the necessary partitions (root and swap partitions boot, home ... if - required) - -4. Create a file syatem for the root partiotion - - mke2fs /dev/hda1 - -5. Mount the partition - - 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) - - Grab the GNU spapshot from ams' site - - - scp @: disk - -7. Uncompress the files - - cd disk - tar -jxvf - -8. Unmount the mounted partition - - cd .. - umount disk - -9. power off the guest OS. - - poweroff - -10. To make the file syatem bootable download a grub floppy image - - - -11. Run qemu to boot into your brand new system - - qemu -hda -fda grub.img -boot a - -Happy Hacking !! - - -Make your new system boot from the hard disk - -1. Mount your grub image - - 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 - - cd disk/boot - scp -r @:/boot/grub - -3. Poweroff the guest - - 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 - - root (hd0,0) - setup (hd0) - - Now you have a bootable system image. Enjoy Maadi !! diff --git a/howtos.mdwn b/howtos.mdwn index 95f77eb9..bc3ecf3b 100644 --- a/howtos.mdwn +++ b/howtos.mdwn @@ -9,7 +9,8 @@ is included in the section entitled ## Collection of brief !HOWTOs * [[Setup_a_GNU_System|hurd/running/gnu/setup]] (also known as GNU/Hurd) - * [[BuildGNUOnQemu]] Build a bootable qemu image of GNU System, aka build a bootable qemu image + * [[hurd/running/gnu/Create_an_image]] of the GNU System, bootable in qemu, + for example. * GNU/Hurd on qemu (external link) * [[HurdOnQemuOnWindows]] Setting up a GNU/Hurd system on Qemu on a Micorsoft Windows machine * [[HurdOnVMware]] Setting up Debian GNU/Hurd on VMware diff --git a/hurd/running/gnu.mdwn b/hurd/running/gnu.mdwn index e52ac062..322597ec 100644 --- a/hurd/running/gnu.mdwn +++ b/hurd/running/gnu.mdwn @@ -62,6 +62,7 @@ These are just some quick notes I am making late at night. Lets clean this up. * [[Universal_package_manager]] * How to [[set_up_GNU|setup]] and archiver for GNU + * [[Create_an_image]] ## Todo diff --git a/hurd/running/gnu/create_an_image.mdwn b/hurd/running/gnu/create_an_image.mdwn new file mode 100644 index 00000000..c5fb8da3 --- /dev/null +++ b/hurd/running/gnu/create_an_image.mdwn @@ -0,0 +1,95 @@ +[[meta copyright="Copyright © 2007 Free Software Foundation, Inc."]] +[[meta license="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU_Free_Documentation_License|/fdl]]."]] + +Creating a bootable qemu image from a root filesystem and bootloader + +1. Create a hard disk image + + qemu-img create -f qcow 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. + + qemu -cdrom /dev/cdrom -hda -boot d + +3. Once system is booted use a partition editing tool (like fdisk, cfdisk, + parted, gparted, qtparted ...) to partition the image. + + cfdisk + + create the necessary partitions (root and swap partitions boot, home ... if + required) + +4. Create a file syatem for the root partiotion + + mke2fs /dev/hda1 + +5. Mount the partition + + 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) + + Grab the GNU spapshot from ams' site + + + scp @: disk + +7. Uncompress the files + + cd disk + tar -jxvf + +8. Unmount the mounted partition + + cd .. + umount disk + +9. power off the guest OS. + + poweroff + +10. To make the file syatem bootable download a grub floppy image + + + +11. Run qemu to boot into your brand new system + + qemu -hda -fda grub.img -boot a + +Happy Hacking !! + + +Make your new system boot from the hard disk + +1. Mount your grub image + + 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 + + cd disk/boot + scp -r @:/boot/grub + +3. Poweroff the guest + + 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 + + root (hd0,0) + setup (hd0) + + Now you have a bootable system image. Enjoy Maadi !! diff --git a/hurd/running/qemu.mdwn b/hurd/running/qemu.mdwn index f40d71d8..93111e6f 100644 --- a/hurd/running/qemu.mdwn +++ b/hurd/running/qemu.mdwn @@ -32,6 +32,9 @@ Now run your image with floppy booting (`-boot a`) and finish the install (`./na **Important:** Older versions on gnumach needed that the `-M isapc` was passed to qemu. This is not needed anymore. +Also see another text about how to [[gnu/create_an_image]] for the +[[GNU_system|gnu]]. + # Mounting Disk Image on Host -- cgit v1.2.3