You are not logged in.

#1 2018-04-30 22:59:14

Bull3tM0nk3y
Member
Registered: 2016-11-22
Posts: 24

[SOLVED] sed: No space left on device when running GRUB

Hello everyone, noobie here again. I'm currently trying to set up grub to detect my newly installed

linux-lts

and its running into an issue. I did not install any other packages with it, and it generated the init process just fine.

 sudo grub-mkconfig -o /boot/grub/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-lts.img
sed: couldn't flush stdout: No space left on device

Other information that might be helpful: I am currently doing this to help an issue with my ThinkPad T420. It hangs/freezes on shutdown and reboot.

 df -i
Filesystem      Inodes  IUsed   IFree IUse% Mounted on
dev            1004739    450 1004289    1% /dev
run            1006402    671 1005731    1% /run
/dev/sdb1      9773056 277112 9495944    3% /
tmpfs          1006402     46 1006356    1% /dev/shm
tmpfs          1006402     18 1006384    1% /sys/fs/cgroup
tmpfs          1006402     19 1006383    1% /tmp
/dev/sda2            0      0       0     - /boot
tmpfs          1006402     27 1006375    1% /run/user/1000

ls -ld /var/run
lrwxrwxrwx 1 root root 6 Jan  5 11:17 /var/run -> ../run

Last edited by Bull3tM0nk3y (2018-05-01 02:02:15)


Noobie to Arch, FLOSS advocate, and geek. Runner and lover of KDE Plasma.

Offline

#2 2018-05-01 01:31:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] sed: No space left on device when running GRUB

df -i is useless in this context post df -H

The message seems pretty self explanatory though, you don't have space left on your /boot to write the config file, and likely not enough space left to have properly run the mkinitcpio generating the initramfs. See what you can get rid of, hint, it is usually safe to remove the fallback image if you don't suddenly change your hardware.

Offline

#3 2018-05-01 01:58:07

Bull3tM0nk3y
Member
Registered: 2016-11-22
Posts: 24

Re: [SOLVED] sed: No space left on device when running GRUB

V1del wrote:

df -i is useless in this context post df -H
. See what you can get rid of, hint, it is usually safe to remove the fallback image if you don't suddenly change your hardware.

Filesystem      Size  Used Avail Use% Mounted on
dev             4.2G     0  4.2G   0% /dev
run             4.2G  1.2M  4.2G   1% /run
/dev/sdb1       157G  7.4G  142G   5% /
tmpfs           4.2G   33M  4.1G   1% /dev/shm
tmpfs           4.2G     0  4.2G   0% /sys/fs/cgroup
tmpfs           4.2G  8.2k  4.2G   1% /tmp
/dev/sda2       101M  101M     0 100% /boot
tmpfs           825M   29k  825M   1% /run/user/1000

Mmm, yep. Looks like /boot is full.

How would I get rid of the fallback image? I'll try to look this up in the mean time.

EDIT: Nvm, just 'cd' into /boot and sudo rm the files.

EDIT 2: Also just ran grub-mkconfig and it ran wonderfully. Thank you! Marking as SOLVED!

Last edited by Bull3tM0nk3y (2018-05-01 02:01:55)


Noobie to Arch, FLOSS advocate, and geek. Runner and lover of KDE Plasma.

Offline

#4 2018-05-01 02:09:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] sed: No space left on device when running GRUB

Be aware that the fallback image will be regenerated on next kernel update/mkinitcpio -p linux invocation, you might want to remove the corresponding 'fallback' directive from /etc/mkinitcpio.d/linux.preset

Offline

#5 2018-05-01 02:18:59

Bull3tM0nk3y
Member
Registered: 2016-11-22
Posts: 24

Re: [SOLVED] sed: No space left on device when running GRUB

V1del wrote:

Be aware that the fallback image will be regenerated on next kernel update/mkinitcpio -p linux invocation, you might want to remove the corresponding 'fallback' directive from /etc/mkinitcpio.d/linux.preset

Cool, thank you. I'll also try to expand the partition in Win10.


Noobie to Arch, FLOSS advocate, and geek. Runner and lover of KDE Plasma.

Offline

#6 2018-05-01 04:37:30

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] sed: No space left on device when running GRUB

Since you're using grub anyway, you could also *not* mount the ESP to /boot, but write your kernel and initramfs to your rootfs which has 142GB free space. wink

Grub comes with filesystem drivers, it can read the kernel from ext4 or btrfs or whatever, and grub-mkconfig should autodetect it (though IMHO you should write your own much simpler grub.cfg, e.g. https://ptpb.pw/mk7y is super elegant).

All you need to write to the ESP itself is the grub executable.

...

I take advantage of this on my Arch Linux-only laptop, to use a 2MB partition for my ESP. This works because fat12 is part of the UEFI specification.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB