Skip to content

Commit

Permalink
fix: "nixos-rebuild build-vm-with-bootloader"
Browse files Browse the repository at this point in the history
  • Loading branch information
ts468 committed Mar 3, 2017
1 parent db2f87a commit 0a8d977
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nixos/modules/virtualisation/qemu-vm.nix
Expand Up @@ -138,13 +138,13 @@ let
''
# Create a /boot EFI partition with 40M
${pkgs.gptfdisk}/bin/sgdisk -G /dev/vda

This comment has been minimized.

Copy link
@ts468

ts468 Mar 3, 2017

Author Contributor

man sgdisk says:

-G, --randomize-guids

Randomize the disk's GUID and all partitions' unique GUIDs (but not their partition type code GUIDs). This function may be used after cloning a disk in order to render all GUIDs once again unique.

Does that line therefore prevent reproducibility of the output derivation?

${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:"BIOS Boot Partition" -t 1:ef02 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:"EFI System" -t 2:ef00 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -a 1 -n 1:34:2047 -c 1:BIOSBootPartition -t 1:ef02 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -a 512 -N 2 -c 2:EFISystem -t 2:ef00 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -A 1:set:1 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -h 2 /dev/vda
${pkgs.gptfdisk}/bin/sgdisk -C /dev/vda
${pkgs.utillinux}/bin/sfdisk /dev/vda -A 2
${pkgs.gptfdisk}/bin/sgdisk -A 2:set:2 /dev/vda

This comment has been minimized.

Copy link
@abbradar

abbradar Mar 3, 2017

Member

It's already set above with the same command; not sure if that's a bug but notifying just in case.

This comment has been minimized.

Copy link
@ts468

ts468 Mar 3, 2017

Author Contributor

You're right, thanks for spotting it!

. /sys/class/block/vda2/uevent
mknod /dev/vda2 b $MAJOR $MINOR
. /sys/class/block/vda/uevent
Expand Down

0 comments on commit 0a8d977

Please sign in to comment.