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

Graphical ISO image may be lacking mtools #132094

Closed
samueldr opened this issue Jul 30, 2021 · 2 comments
Closed

Graphical ISO image may be lacking mtools #132094

samueldr opened this issue Jul 30, 2021 · 2 comments
Assignees

Comments

@samueldr
Copy link
Member

samueldr commented Jul 30, 2021

Hi,

I have noticed that iso-image plasma5-20.09.2538.0cfd08f4881-x86_64-linux.iso probably lacks tools for dealing with fat32 filesystems. I had issues installing Nixos 21.05 on Samsung NP530U4E. System was damaged while upgrading from 20.03 to 21.05, giving the error "unable to build, disc was probably full" (quoting from memory, sorry). After trying to reinstall from USB got the same error message. Gparted was showing error message, that system lacks tools to deal with fat32 filesystems.I assume that nixos-install was probably unable to detect fat32 boot partition and was assuming that disk is full. I was strictly following [official manual for UEFI systems] (https://nixos.org/manual/nixos/stable/index.html#sec-installation-partitioning-UEFI). I was able to install Nixos only after manual installation of mtools with nix-env -f '<nixpkgs>' -iA mtools. Just in case I have also declared mtools in configuration.nix

Originally posted by @codelamb in #124076 (comment)

@samueldr
Copy link
Member Author

It is unclear from this description what the underlying problem is.

mtools may be needed for gparted to do some operations on FAT32, but not for formatting. Though yeah, making gparted maximally useful on the graphical iso is a good thing to consider doing.

Depending on when during the build the "unable to build, disc was probably full" error happened, it could mean either that the root filesystem was full, or, possibly, that the boot partition (assuming ESP at /boot) was full when installing the new generation.

Either of these problems have different resolutions, and don't require mtools.

Though, the instructions for partitioning and formatting shouldn't have required mtools either. Which is what confuses me. Was it required for gparted and rather than using parted (no G) you preferred to use gparted to setup your partitions? (Which would be perfectly valid.)

@codelamb
Copy link

codelamb commented Jul 30, 2021

Was it required for gparted and rather than using parted (no G) you preferred to use gparted to setup your partitions?

I used parted for partitioning and gparted for diagnostics.

I used the following commands from the official manual:

# parted /dev/sda -- mklabel gpt
# parted /dev/sda -- mkpart primary 512MiB -8GiB
# parted /dev/sda -- mkpart primary linux-swap -8GiB 100%
# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
# parted /dev/sda -- set 3 esp on

and

# mkfs.ext4 -L nixos /dev/sda1
# mkswap -L swap /dev/sda2
# swapon /dev/sda2
# mkfs.fat -F 32 -n boot /dev/sda3        
# mount /dev/disk/by-label/nixos /mnt
# mkdir -p /mnt/boot                      
# mount /dev/disk/by-label/boot /mnt/boot 
# nixos-generate-config --root /mnt
# nano /mnt/etc/nixos/configuration.nix
# nixos-install
# reboot

It seems that system was able to format sda3, but was not able to use it.

Error message i was getting on nixos-install is similar to in #NixOS/nix/issues/3198

mv: error writing '/nix/store/a3s9xiiwb55p6n0lgqn3jb0g4n309jac-etc-bashrc': No space left on device
mv: error writing '/nix/store/7kmi461sdrgs9dz9a1bsgl95yzyjdn4j-etc-os-release': No space left on device
builder for '/nix/store/kk4c3by66s2w09lq5vrlzqy0mdkdkpq7-etc-bashrc.drv' failed with exit code 1
note: build failure may have been caused by lack of free disk space

And gparted gave me message:

Unable to read the contents of this file system!
Because of this some operations may be unavailable.
The cause might be a missing software package.
The following list of software packages is required for fat32 file system support: dosfstools, mtools.

The filesystem gparted was unable to read was boot (/dev/sdb3 of laptop's hdd). Gparted treated laptop's hdd as /sdb, and bootable usb drive as /sda. After installation of mtools, disks switched places, and hdd became /sda, and usb drive became /sdb, and the rest of installation went smoothly.

Edit: actually I repeated partitioning - formating - mounting steps several times, before installing mtools. In at least one occasion I tried /dev/sdb in commands instead of /dev/sda with no results. Maybe I had missed or misstyped a command or something. I would not like to repeat the installation to check repeatability.
The first time I noticed that installation iso lacks fat32 filesystem support was when I unsuccessfully tired to backup /home directory to another USB drive before re-installation. So maybe it is worth to include relevant tools anyways.

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

No branches or pull requests

4 participants