You are not logged in.

#1 2013-12-19 23:54:09

Marchare
Member
Registered: 2013-11-03
Posts: 10

[SOLVED] Adding a new kernel to /boot partition?

First of all I apologize in advance if this subject has already been brought up before. I did some researches but couldn't find anything that would answer my questions.

I would like to try Real Time (and Linux-ck later) but my /boot partition (100MB) won't let me put any file in it because there's not enough space. Here's what I got when trying to install the linux-rt package from the AUR:

{standard input}: Assembler messages:
{standard input}: Fatal error: can't write lib/ts_fsm.mod.o: No space left on device
{standard input}: Fatal error: can't close lib/ts_fsm.mod.o: No space left on device
lib/ts_fsm.mod.c:32:1: fatal error: closing dependency file lib/.ts_fsm.mod.o.d: No space left on device
 "depends=";
 ^
compilation terminated.
/tmp/yaourt-tmp-pikachu/aur-linux-rt/src/linux-3.12/scripts/Makefile.modpost:111: recipe for target 'lib/ts_fsm.mod.o' failed
make[1]: *** [lib/ts_fsm.mod.o] Error 1
Makefile:949: recipe for target 'modules' failed
make: *** [modules] Error 2

I also tried to expand the /boot partition with some livecd and Gparted but it's apparently impossible unless I completely erase it. Should I back it up and make another, bigger one or is there another solution... or maybe some element I overlooked?

Hope I was clear enough. Thanks in advance!

Last edited by Marchare (2013-12-22 16:51:01)

Offline

#2 2013-12-19 23:59:15

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

This looks to be a yaourt issue (it chokes on large builds unless you point it at another build dir), not the size of your /boot.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-12-20 00:06:47

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

jasonwryan wrote:

This looks to be a yaourt issue (it chokes on large builds unless you point it at another build dir), not the size of your /boot.

Well, I also managed to compile a vanilla kernel with the rt patchs just fine but couldn't put the bzImage file in /boot because of a space issue so I guess it's a partition issue. I probably couldn't have installed linux-rt with yaourt with the exact same reasons I couln't install with "manually".

Offline

#4 2013-12-20 00:13:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Adding a new kernel to /boot partition?

You can tell yaourt to build somewhere else, use --tmp commandline switch or edit /etc/yaourtrc, uncomment and change

#TMPDIR="/tmp"

to somewhere else.

You can compress the images so 100 MB should be enough.

Offline

#5 2013-12-20 00:22:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

I have the Arch vanilla kernel and initrd and my own custom kernel in /boot and am only using 39M. 100M should be plenty.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2013-12-20 02:01:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,139

Re: [SOLVED] Adding a new kernel to /boot partition?

I use 469M but 392M is an iso image. However, it might depend what else is there. For example, if this is an ESP created by the Windows installer, I don't know how much space Windows might take up there.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2013-12-20 03:10:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,559
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

Marchare wrote:

... but couldn't put the bzImage file in /boot because of a space issue so I guess it's a partition issue.

What commands did you use, and what were the actual error messages?

What is the output of `df -h`?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#8 2013-12-20 15:24:25

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

Retry with makepkg.

Offline

#9 2013-12-20 17:30:52

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: [SOLVED] Adding a new kernel to /boot partition?

try with 'make localmodconfig'

Offline

#10 2013-12-21 00:11:06

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

Wow, so many replies!

Sorry if my reply took long; had to yaourt the kernel again with TMPDIR="/var/tmp" in the yaourtrc config file. I got this error:

error: Partition /boot too full: 9047 blocks needed, 2048 blocks free
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded.

By the way if it normal that I now find a folder called "linux-rt" that weights ~61 MiB in my /boot partition?

Also df -h gives me this (excluding other partitions):

/dev/sda5        97M   95M     0 100% /boot

Offline

#11 2013-12-21 00:18:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Adding a new kernel to /boot partition?

That's your partition, you should know what's there and why :-)
Are you sure you never used linux-rt kernel https://aur.archlinux.org/packages/linux-rt/ ?

Offline

#12 2013-12-21 00:51:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

Why did you build the rt kernel in /boot? Build it somewhere else and then just copy the kernel and intrd there...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2013-12-21 01:34:19

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

karol wrote:

That's your partition, you should know what's there and why :-)
Are you sure you never used linux-rt kernel https://aur.archlinux.org/packages/linux-rt/ ?

jasonwrian wrote:

Why did you build the rt kernel in /boot? Build it somewhere else and then just copy the kernel and intrd there...

I never used linux-rt, nor any other kernel than the default one before. Because I'm completely inexperienced I most likely screwed up somewhere in the process. The "linux-rt" folder appeared in /boot after trying to install the kernel with yaourt.

According to the tutorial (written in French here) I was using as a reference one is supposed to compile the kernel, make the bzImage file then copy it along with System.map to /boot.

Last edited by Marchare (2013-12-21 01:45:18)

Offline

#14 2013-12-21 01:40:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Adding a new kernel to /boot partition?

What exactly is in that linux-rt directory?

Offline

#15 2013-12-21 01:47:28

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

karol wrote:

What exactly is in that linux-rt directory?

Here is what I get with ls:

arch	 Kbuild       Makefile		      README	      vmlinux
COPYING  Kconfig      Module.symvers	      REPORTING-BUGS  vmlinux.o
CREDITS  MAINTAINERS  patch-3.12.5-rt7.patch  System.map

Offline

#16 2013-12-21 01:50:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Adding a new kernel to /boot partition?

Remove the directory and all of its contents and follow jasonwryan's advice https://bbs.archlinux.org/viewtopic.php … 0#p1362490

Offline

#17 2013-12-21 02:46:41

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

I don't exactly know what exact files initrd is referring to.

BTW should I move /linux-rt/arch/x86/boot/bzImage to /boot then?

Offline

#18 2013-12-21 02:59:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Adding a new kernel to /boot partition?

In my /boot I only have

$ ls /boot
initramfs-linux-fallback.img  initramfs-linux.img  memtest86+  syslinux  vmlinuz-linux

'memtest86+' and 'syslinux' are directories.

initrd is e.g. /boot/initramfs-linux.img
https://en.wikipedia.org/wiki/Initrd#Implementation


https://wiki.archlinux.org/index.php/Ke … stallation

Offline

#19 2013-12-21 13:39:43

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

Marchare wrote:

I don't exactly know what exact files initrd is referring to.

https://wiki.archlinux.org/index.php/Initramfs

Marchare wrote:

BTW should I move /linux-rt/arch/x86/boot/bzImage to /boot then?

No. Please use the package manager for this purpose.

Offline

#20 2013-12-21 22:35:12

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

teateawhy wrote:

Please use the package manager for this purpose.

What am I supposed to do with the pachage manager? I will get the same error if I Yaourt the Linux-rt kernel, right?

Offline

#21 2013-12-21 22:37:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Adding a new kernel to /boot partition?

Why would you get any error if you clear the space that is occupied by the contents of linux-rt directory?
You don't have to use yaourt, makepkg works too :-)

Offline

#22 2013-12-21 23:05:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,559
Website

Re: [SOLVED] Adding a new kernel to /boot partition?

Marchare wrote:

What am I supposed to do with the pachage manager? I will get the same error if I Yaourt the Linux-rt kernel, right?

With a package manager, you manage your packages.  Yaourt is not a package manager, neither is makepkg.  Pacman is your package manager.  Makepkg is a great tool for making packages, that are then installed and managed with pacman.  Yaourt is a great tool for preventing you from understanding anything that is happening in your system.

Use makepkg to make a pakage and pacman to install it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#23 2013-12-22 03:06:52

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,139

Re: [SOLVED] Adding a new kernel to /boot partition?

Note that you shouldn't be able to build something in /boot because you should be building as an unprivileged user and /boot should only be writeable by root.

I don't even build stuff as me but I'm perhaps more paranoid than most. But I would certainly never compile code as root and neither should you.

Last edited by cfr (2013-12-22 03:07:18)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#24 2013-12-22 16:50:39

Marchare
Member
Registered: 2013-11-03
Posts: 10

Re: [SOLVED] Adding a new kernel to /boot partition?

Alright, after downloading the package from the AUR and installing the kernel with makepkg, plus fixing some issue with GRUB Linux-rt is working fine now.

Thanks everyone for your help!

Last edited by Marchare (2013-12-22 17:53:55)

Offline

Board footer

Powered by FluxBB