diff options
author | Silvino Silva <silvino@bk.ru> | 2016-10-08 18:55:09 +0100 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2016-10-08 18:55:09 +0100 |
commit | 5d60e76fafc0fa76c8e9019459ecaeaf25d5b764 (patch) | |
tree | 2a5ea60a7629987202fe67fb2b82340c9fe9b382 | |
parent | 4442891eeb400959a1979d34938fcb061339a0f6 (diff) | |
download | doc-5d60e76fafc0fa76c8e9019459ecaeaf25d5b764.tar.gz |
qemu partition disk image
-rw-r--r-- | tools/qemu.html | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/tools/qemu.html b/tools/qemu.html index 8c53ce7..272a26b 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -63,24 +63,38 @@ to use parted to create a gpt system table;</p> <pre> - # parted /dev/nbd0 - (parted) mklabel gpt - (parted) mkpart ext4 0% 100% - (parted) set 1 boot on + # parted --script $DEV \ + mklabel gpt \ + mkpart ESP fat32 1MiB 120MiB \ + mkpart primary ext4 120MiB 720MiB \ + mkpart primary ext4 720MiB 2720MiB \ + mkpart primary ext4 2720MiB 5000MiB \ + set 1 boot on </pre> <pre> # kpartx -a -s -l -u /dev/nbd0 </pre> + <p>Use /dev/mapper/$(name_of_device) to assign correct blocks;</p> + <pre> - # mkfs.ext4 /dev/mapper/nbd0p1 + # mkfs.fat -F 32 $BLK_EFI + # mkfs.ext4 $BLK_BOOT + # mkfs.ext4 $BLK_ROOT + # mkfs.ext4 $BLK_VAR </pre> <p>Mount partition;</p> <pre> - # mount /dev/mapper/nbd0p1 + # mount $BLK_ROOT $CHROOT + # mkdir -p $CHROOT/boot + # mount $BLK_BOOT $CHROOT/boot + # mkdir -p $CHROOT/boot/efi + # mount $BLK_EFI $CHROOT/boot/efi + # mkdir -p $CHROOT/var + # mount $BLK_VAR $CHROOT/var </pre> <h2 id="net">2. Network</h2> |