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

nixos/iso-image: add option for copytoram #25611

Merged
merged 1 commit into from
May 9, 2017

Conversation

Lassulus
Copy link
Member

@Lassulus Lassulus commented May 8, 2017

Motivation for this change

Add the possibility to boot the live stick with its contents copied into ram.

@mention-bot
Copy link

@Lassulus, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bobvanderlinden and @dezgeg to be potential reviewers.

@@ -50,6 +50,13 @@ let
LINUX /boot/bzImage
APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset
INITRD /boot/initrd

# A variant to boot with 'copytoram
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'copytoram -> 'copytoram'

@bobvanderlinden
Copy link
Member

Thanks @Lassulus for the work on copytoram. This seems to me like an nice addition as well. I still need to give this a try.

I'm guessing the advantages are runtime performance and the ability to pull the USB/CD from the system once it has booted? What are your motivations to get this in?

@Lassulus
Copy link
Member Author

Lassulus commented May 8, 2017

@bobvanderlinden Thanks :)

I'm using it mainly for 2 reasons:

  1. If I boot an usb image via drivedroid on android I want to be able to tether afterwards with my phone.
  2. During nixos installation parties there are often not enough live mediums around for everyone to play around. With this change 1 live stick would suffice for everyone.

@bobvanderlinden
Copy link
Member

If I boot an usb image via drivedroid on android

Hah! That made my day. I'm the dev of DriveDroid 😄. Sounds like useful usecases to me. I'll give it a go right away.

@bobvanderlinden
Copy link
Member

Works nicely on legacy bios:

qemu-system-x86_64 -m 4G --enable-kvm -cdrom $(nix-build -A iso_minimal.x86_64-linux.out nixos/release.nix)/iso/*.iso

And on EFI:

qemu-system-x86_64 -m 4G --enable-kvm -bios $(nix-build -A pkgs.OVMF)/FV/OVMF.fd -cdrom $(nix-build -A iso_minimal.x86_64-linux.out nixos/release.nix)/iso/*.iso

Code looks fine to me too 👍

@Lassulus
Copy link
Member Author

Lassulus commented May 8, 2017

@bobvanderlinden it's a small world :D
thank you for reviewing

@Lassulus Lassulus changed the title WIP: nixos/iso-image: add option for copytoram nixos/iso-image: add option for copytoram May 8, 2017
@Mic92 Mic92 merged commit 9c90ff7 into NixOS:master May 9, 2017
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.

None yet

4 participants