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

resize2fs not present during stage-1 #1090

Closed
tomberek opened this issue Feb 12, 2019 · 4 comments
Closed

resize2fs not present during stage-1 #1090

tomberek opened this issue Feb 12, 2019 · 4 comments

Comments

@tomberek
Copy link
Contributor

On EC2 deployments, the ami's (as well as some custom one's I've made in attempts to fix this) don't seem to have resize2fs in order to expand to accommodate the ebsInitialRootDiskSize.

[    3.126921] random: fast init done
[    5.514947] stage-1-init: nixos: 78561/131072 files (0.1% non-contiguous), 287748/523776 blocks
[    5.525847] stage-1-init: /init: line 394: resize2fs: not found
...

Not sure why https://github.com/NixOS/nixpkgs/blame/30c312341fbe435349f364fcd306a12c28fcde8d/nixos/modules/system/boot/stage-1.nix#L130 does not go into effect.

@tomberek
Copy link
Contributor Author

    boot.initrd.postDeviceCommands= ''
    ${pkgs.e2fsprogs}/sbin/e2fsck -fp /dev/disk/by-label/nixos
    ${pkgs.e2fsprogs}/sbin/resize2fs /dev/disk/by-label/nixos
  '';

This is a hacky workaround that accomplishes the resize, but it isn't the right solution because the other "./resize2fs" call still fails.

@AmineChikhaoui
Copy link
Member

I used ami-009c9c3f1af480ff3 which is the NixOS 18.09 ami and didn't see this:

[amine@nixos:~]$ nixops show-console-output -d lb4-machine build3
[    0.001000] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
[    0.471186] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!

<<< NixOS Stage 1 >>>

loading module xen-blkfront...
loading module xen-netfront...
loading module fuse...
loading module dm_mod...
loading module af_packet...
running udev...
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
bringing up network interface eth0...
bringing up network interface lo...
acquiring IP address via DHCP...
udhcpc: started, v1.29.3
udhcpc: sending discover
udhcpc: sending select for 10.0.7.90
udhcpc: lease of 10.0.7.90 obtained, lease time 3600
networking is up!
starting device mapper and LVM...
CHANGED: partition=1 start=2048 old: size=4190208 end=4192256 new: size=1468004319,end=1468006
checking /dev/disk/by-label/nixos...
fsck (busybox 1.29.3)
[fsck.ext4 (1) -- /mnt-root/] fsck.ext4 -a /dev/disk/by-label/nixos
nixos: clean, 73413/131072 files, 285205/523776 blocks
resizing /dev/disk/by-label/nixos...
nixos: 73413/131072 files (0.1% non-contiguous), 285205/523776 blocks
resize2fs 1.44.4 (18-Aug-2018)

@talyz
Copy link
Contributor

talyz commented Mar 15, 2019

I have this too - NixOS/nixpkgs#57633 should fix it (at least it did for me)

@AmineChikhaoui
Copy link
Member

cherry-picked to 19.03 (NixOS/nixpkgs#59848). Will generate 19.03 amis as soon as the channel is updated

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

No branches or pull requests

3 participants