Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UEFI support (rebased) #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chreekat
Copy link

@chreekat chreekat commented Jun 7, 2017

This branch has the core commit of #32, cherry-picked on top of master, with conflicts resolved. Untested.

Conflicts:
.gitignore
install
stage1

Rotsor and others added 2 commits June 7, 2017 12:37
Conflicts:
	.gitignore
	install
	stage1
@chreekat
Copy link
Author

chreekat commented Jun 7, 2017

FYI I tried ./install -h on Ubuntu 14.04, and I am informed that fdisk doesn't have a -o option (pinging @Rotsor )

@Rotsor
Copy link
Contributor

Rotsor commented Jun 7, 2017

Oh whoops. I guess a couple of things can be done:

  • figure out a more cross-platform invocation of fdisk
  • when -g is given don't run fdisk at all

@jeaye
Copy link
Owner

jeaye commented Jun 10, 2017

Thanks for the updated PR. I'd like to see this integrated with the existing test suite, which uses vagrant and various distros to ensure all is working well. The changes seem reasonable to me, minus some nitpicks. :)

You up for testing this with vagrant?

@chreekat
Copy link
Author

chreekat commented Jun 12, 2017 via email

@chreekat
Copy link
Author

@Rotsor ^

@Rotsor
Copy link
Contributor

Rotsor commented Jun 15, 2017

I'll look into this. Hope I can make any heads or tails of vagrant.

@c33c
Copy link

c33c commented Jun 15, 2017 via email

@exarkun
Copy link

exarkun commented Jan 7, 2019

I tried this on AWS EC2 on an a1.large instance running ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-arm64-server-20181121 (ami-00e744be929837e6e) and got this result:

$ sudo ./install 
>>> Checking environment... seems sane
>>> NixOS installer (nixos-in-place)
>>>    Boot => uefi boot with esp at /dev/nvme0n1p15
>>>    Root => /dev/nvme0n1p1 (ext4)
>>>    ISO => nixos-minimal-16.09.680.4e14fd5-i686-linux.iso
>>>    Digital Ocean => false
>>>    Working directory => /tmp/tmp.MtLuDcidUE
>>>    Extra config => /home/ubuntu/nixos-in-place/no-extra-config
>>> Continue? [yn] y
/tmp/tmp.MtLuDcidUE ~/nixos-in-place
>>> Downloading NixOS nixos-minimal-16.09.680.4e14fd5-i686-linux.iso
--2019-01-07 15:04:15--  https://d3g5gsiof5omrk.cloudfront.net/nixos/16.09/nixos-16.09.680.4e14fd5/nixos-minimal-16.09.680.4e14fd5-i686-linux.iso
Resolving d3g5gsiof5omrk.cloudfront.net (d3g5gsiof5omrk.cloudfront.net)... 13.249.44.112, 13.249.44.66, 13.249.44.72, ...
Connecting to d3g5gsiof5omrk.cloudfront.net (d3g5gsiof5omrk.cloudfront.net)|13.249.44.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 405798912 (387M) [application/octet-stream]
Saving to: ‘nixos-minimal-16.09.680.4e14fd5-i686-linux.iso’

nixos-minimal-16.09.680.4e14fd5-i686-linux 100%[=====================================================================================>] 387.00M   120MB/s    in 3.2s    

2019-01-07 15:04:18 (122 MB/s) - ‘nixos-minimal-16.09.680.4e14fd5-i686-linux.iso’ saved [405798912/405798912]

>>> Validating checksum
nixos-minimal-16.09.680.4e14fd5-i686-linux.iso: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match

@hlolli
Copy link

hlolli commented Mar 8, 2019

I tested this PR, I had to hardcode the boot_device variable to prevent the malformed fdisk command. It seemed to go trough stage 2 but ending with this error:

building path(s) ‘/nix/store/d3x2yrkm76sd9mlnv4jalj1in2aaqhgg-user-environment’
created 18 symlinks in user environment
writing /nixos/etc/nixos/hardware-configuration.nix...
warning: not overwriting existing /nixos/etc/nixos/configuration.nix
mount: / is not mountpoint or bad option

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
building the system configuration...
copying NixOS/Nixpkgs sources...
finalising the installation...
Copied "/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
Failed to create EFI Boot variable entry: No such file or directory
Traceback (most recent call last):
  File "/nix/store/w3kckp1k7hngiadrcllybnji9nc8di25-systemd-boot-builder.py", line 102, in <module>
    subprocess.check_call(["/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/bin/bootctl", "--path=/boot", "install"])
  File "/nix/store/ignn33dyacf5vm5hsmwiaj617226x1js-python-2.7.12/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/bin/bootctl', '--path=/boot', 'install']' returned non-zero exit status 1

These are the partitions on a Centos

[root@94 nixos-in-place-rebased-uefi-support]# df -l
Filesystem             1K-blocks     Used Available Use% Mounted on
/dev/mapper/vg_OS-root  80488040 11645388  68842652  15% /
devtmpfs                  192376        0    192376   0% /dev
tmpfs                    1923736        0   1923736   0% /dev/shm
tmpfs                    1923732   206144   1717588  11% /run
tmpfs                    1923732        0   1923732   0% /sys/fs/cgroup
/dev/sda2                1038336   171388    866948  17% /boot
/dev/sda1                 204580     8852    195728   5% /boot/efi
tmpfs                     384748        0    384748   0% /run/user/0
none                     1923732        0   1923732   0% /nixos/run
none                     1923732        0   1923732   0% /tmp/tmp.s341NPqxPS/host/nixos/run

I chose /dev/sda1 for -g flag and boot_device in the install script. Any ideas what could have gone wrong?

Btw uname -n is now showing nixos, so it went trough?

ADDED: Nevermind this, I ditched this cloud provider and I'm going to use Hetzner, which has worked succesfully for me in the past. This info above may or may not be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants