mobile-nixos icon indicating copy to clipboard operation
mobile-nixos copied to clipboard

How to install on SD card?

Open Thatoo opened this issue 1 year ago • 5 comments

I guess everything is in the title. The Pinephone internal eMMC doesn't have much disk space so I wonder how to install on SD card

I tried to follow https://wiki.nixos.org/wiki/Storage_optimization#Moving_the_store which solve the issue for the nix store but doesn't solve the space problem when compiling. I run out of space so I can't update from 23.11 to 24.05.

Thatoo avatar Jun 09 '24 12:06 Thatoo

Here are the two picture showing the issue :

I moved /nix to th SD card (/dev/mmcblk0p1) IMG_20240612_101442

and I deleted /nix in emmc to let the place for nixos-rebuild switch but I can't build because of lack of space at building time : IMG_20240612_101500

Thatoo avatar Jun 12 '24 08:06 Thatoo

/tmp is stored in memory, no ? maybe you need more swap ?

theotheroracle avatar Jun 12 '24 20:06 theotheroracle

yes /tmp should be solvable with a swap file. They can create the swap file on the sd card and it should help though it could slow down the upgrade process but slower upgrades is better than unable to upgrade.

luigi311 avatar Jun 13 '24 19:06 luigi311

I added a swap file and it has helped to build but unfortunately, after reboot, /nix is still not on the sdcard, it keeps being mounted on mmc storage even though I added to /etc/nixos/hardware-configuration.nix, as explain in https://wiki.nixos.org/wiki/Storage_optimization#Moving_the_store,

   fileSystems."/nix" = {
     device = "/dev/mmcblk0p1";
     fsType = "f2fs";
     neededForBoot = true;
     options = [ "noatime" ];
   };

so it means I have to to all the mount, rsync, umount, mount story everytime I want to build...

Thatoo avatar Sep 01 '24 13:09 Thatoo

I don't understand, after a second build and reboot, it now works as expected, /nix is mounted on sd card, on /dev/mmcblk0p1 .

Thatoo avatar Sep 01 '24 13:09 Thatoo