You are not logged in.

#1 2016-09-28 23:27:03

KRust
Member
Registered: 2016-09-09
Posts: 18

[SOLVED]'fallocate failed: No space left on device' on empty - insta

I'm trying to install Arch Linux from .iso on USB, on a laptop, to a Samsumg M3 1TB drive.
I created two partitions,
sdb1 200G, for /root and everything arch-related
sdb2 731.5G so I can put my music library here afterwards, but it's empty now

Formatted sdb1 to ext4 using fdisk
sdb2 to NTFS so Windows machines can read those files as well later on.

lsblk -f recognizes this as it's supposed to be

Then, following the Installation guide on the official wiki,
I mounted the drive, and created /mnt/home and /mnt/boot on it with mkdir, and mounted those.

Still following that guide, tried to create a swapfile with 8GB with

 fallocate -l 10G /swapfile 

And it returned

 fallocate: fallocate failed: No space left on device 

But the device is empty, except for the directories I created on it.

I couldn't find any Arch documentation for this message, only gentoo.
https://wiki.gentoo.org/wiki/Knowledge_ … _available

The only solution they offer, though, is:
'try removing obsolete or unnecessary files on the file system'
Which I don't see how could apply in my case, since it's, well, empty.

Help, please, anyone?

Last edited by KRust (2016-09-29 01:23:41)

Offline

#2 2016-09-28 23:44:28

loqs
Member
Registered: 2014-03-06
Posts: 18,047

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

KRust wrote:

sdb1 200G, for /root and everything arch-related
sdb2 731.5G so I can put my music library here afterwards, but it's empty now
I mounted the drive, and created /mnt/home and /mnt/boot on it with mkdir, and mounted those.

So you mounted three partitons one on /mnt, a second on /mnt/home ( was that the ntfs one? ) and a third /mnt/boot ( what partition was used for that? )

KRust wrote:

Still following that guide, tried to create a swapfile with 8GB with

 fallocate -l 10G /swapfile 

And it returned

 fallocate: fallocate failed: No space left on device 

But the device is empty, except for the directories I created on it.

You did not specify what the working directory was when you executed the fallocate command for instance was it / of the installation media?

Online

#3 2016-09-28 23:53:59

KRust
Member
Registered: 2016-09-09
Posts: 18

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

So you mounted three partitons one on /mnt, a second on /mnt/home ( was that the ntfs one? ) and a third /mnt/boot ( what partition was used for that? )

I was trying to install all the system in the same partition sdb1, ext4. Is that a problem? I did it becaue of

Single root partition
This scheme is the simplest and should be enough for most use cases. A swapfile can be created and easily resized as needed. It usually makes sense to start by considering a single / partition and then separate out others based on specific use cases like RAID, encryption, a shared media partition, etc.'

on https://wiki.archlinux.org/index.php/Pa … ion_scheme

The NTFS sdb2 I'm not planning on touching during the installation. Just mentioned in case it could somehow relate to the problem.

You did not specify what the working directory was when you executed the fallocate command for instance was it / of the installation media?

I'm sorry but I'm confused about this now, as the instructions don't mention anything like that (or I'm reading them wrong).

Swap file creation
As root use fallocate to create a swap file the size of your choosing (M = Megabytes, G = Gigabytes). For example, creating a 512 MB swap file:
# fallocate -l 512M /swapfile

Usually on the official wiki when there is the need for specifying things like that they put some 'sdx' on the example. There's no such thing here.

Offline

#4 2016-09-29 00:01:04

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

KRust wrote:

You did not specify what the working directory was when you executed the fallocate command for instance was it / of the installation media?

I'm sorry but I'm confused about this now, as the instructions don't mention anything like that (or I'm reading them wrong).

What loqs is wondering is if you ran that command in a chroot or not. If you ran it before you chrooted into the system that's being installed, you would be trying to create the swapfile on the installation media itself, which might explain why it is running out of space.

Offline

#5 2016-09-29 00:05:09

loqs
Member
Registered: 2014-03-06
Posts: 18,047

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

You do not need to create any directories on the root file system during installation unless you intend to mount other file systems there.

# fallocate -l 512M /swapfile

Paths beginning with a slash are absolute paths so unless you used arch-chroot or chroot before running such a command it would have attempted to create the file in the root directory of the ram based filesystem of the live media.

Online

#6 2016-09-29 00:05:47

KRust
Member
Registered: 2016-09-09
Posts: 18

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

Well, yeah. That's absolutely logical and I feel really dumb now.

What would be the right moment for doing it properly, though? Because the installation guide says

After that, create directories for and mount any other file systems (/mnt/boot, /mnt/home, ...) and activate the swap space with swapon(8). Mounted file systems will later be detected by genfstab.

Way before it tells you to chroot.
Thanks a lot for the clarification!

Offline

#7 2016-09-29 00:09:22

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

You don't need to create a swapfile in a chroot environment. You just need to adjust the path to your swapfile so it is not being created on the installation media. For example, you could do something like

fallocate -l 512M /mnt/swapfile

assuming that your root partition is mounted at /mnt.

Offline

#8 2016-09-29 00:11:03

loqs
Member
Registered: 2014-03-06
Posts: 18,047

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

If you want it to be added to the new systems /etc/fstab by genfstab then that would be the correct moment to do it after mounting the root file system to /mnt just change the path.
Otherwise you can leave it until after installation and adjust /ets/fstab accordingly by hand.
As an aside I assume this is an none EFI based install?
Edit:
beaten by atomicbeef.

Last edited by loqs (2016-09-29 00:12:00)

Online

#9 2016-09-29 00:14:52

KRust
Member
Registered: 2016-09-09
Posts: 18

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

atomicbeef wrote:

You don't need to create a swapfile in a chroot environment. You just need to adjust the path to your swapfile so it is not being created on the installation media. For example, you could do something like

fallocate -l 512M /mnt/swapfile

assuming that your root partition is mounted at /mnt.

Thanks, again, for making it clear. But

fallocate -l 8G /mnt/swapfile

gave back

 fallocate: unexpected number of arguments 

*

As an aside I assume this is an none EFI based install?

MBR on BIOS.

* sorry, I mistyped stuff. What you recommended works. Thanks, really! And sorry for being daft and wasting your time.

Last edited by KRust (2016-09-29 00:25:15)

Offline

#10 2016-09-29 00:35:31

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

KRust wrote:

I was trying to install all the system in the same partition sdb1, ext4.

If you are doing this, just mount sdb1 at /mnt and skip the other mount steps. You don't need or want to mount the same partition at /mnt/boot and /mnt/home if you are just using one partition for everything.

(edit) I see loqs already told you this. Do you have it all working now?

Last edited by 2ManyDogs (2016-09-29 00:40:09)

Offline

#11 2016-09-29 00:41:59

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: [SOLVED]'fallocate failed: No space left on device' on empty - insta

Great to see that you got it working! Don't forget to edit your post title to include "[SOLVED]".

Offline

Board footer

Powered by FluxBB