You are not logged in.

#1 2013-09-10 13:41:30

DarkCerberus
Banned
From: Holsworthy, Devon
Registered: 2011-12-31
Posts: 252

How to edit /proc/version?

Hi,

I'm just curious in asking how is it possible to change the kernel string in /proc/version - I've tried to change it countless times but can't all I get is "Unexpected error: Error writing to file: Input/output error" - what must I do to change the 3.10.10-1-ARCH to let say 3.10.10-1-CUSTOM?

This has been bugging me for the last few weeks, and I've tried doing searches on google but failed - can anybody help.


Our enemies are your enemies, Nick. Disorder, war. It's just a matter of time before a dirty bomb goes off in Moscow, or an EMP fries Chicago.  ---  Alexander Pierce, Captain America: Winter Soldier
Access Denied! De-cryption failed, override denied all files sealed! --- Triskelion, Shield OS
-----
How to ask questions the smart way

Offline

#2 2013-09-10 13:46:45

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: How to edit /proc/version?

It might help if you state why you would want to do such a thing?

Offline

#3 2013-09-10 13:49:27

DarkCerberus
Banned
From: Holsworthy, Devon
Registered: 2011-12-31
Posts: 252

Re: How to edit /proc/version?

I'm wanting to practice in making my own distribution that's all, but the only thing is I can't edit the /proc/version - You could say I prefer doing things very technical with Operating Systems and since linux is free why not attempt at creating my own since it's possible.


Our enemies are your enemies, Nick. Disorder, war. It's just a matter of time before a dirty bomb goes off in Moscow, or an EMP fries Chicago.  ---  Alexander Pierce, Captain America: Winter Soldier
Access Denied! De-cryption failed, override denied all files sealed! --- Triskelion, Shield OS
-----
How to ask questions the smart way

Offline

#4 2013-09-10 14:02:09

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

Re: How to edit /proc/version?

/proc is a pseudo-filesystem, it gets recreated on boot, so removing / editing files from /proc is futile.
/proc is for reading stuff from.

Offline

#5 2013-09-10 14:04:12

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: How to edit /proc/version?

karol wrote:

/proc is a pseudo-filesystem, it gets recreated on boot, so removing / editing files from /proc is futile.
/proc is for reading stuff from.

In addition to this, many files (though I am unsure of /proc/version) in /proc are not actually files, they are pseudo-files which are populated on being read or opened. As a result, for many of the files in /proc, editing them will do nothing.

All the best,

-HG

Offline

#6 2013-09-10 14:11:51

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

Re: How to edit /proc/version?

Have a look at https://projects.archlinux.org/svntogit … ages/linux

pkgbase=linux               # Build stock -ARCH kernel
#pkgbase=linux-custom       # Build kernel with a different name

a random uname from linux-ck kernel: https://bbs.archlinux.org/viewtopic.php … 5#p1205835
If this is what you want, have a look at https://aur.archlinux.org/packages/linux-ck/ and the wiki on how to make custom kernels.

Offline

#7 2013-09-10 14:15:03

kaszak696
Member
Registered: 2009-05-26
Posts: 543

Re: How to edit /proc/version?

That -ARCH part is set during kernel compilation, it's set by CONFIG_LOCALVERSION in .config. As far as i know, you can't change it in already-compiled kernel.


'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard

Offline

#8 2013-09-10 14:55:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to edit /proc/version?

DarkCerberus wrote:

I'm wanting to practice in making my own distribution that's all, but the only thing is I can't edit the /proc/version

Where did you get the idea that editing /proc/version will help you with such a large project? I'd suggest you start at the beginning by reading some of the copious relevant documentation that's available to you, instead of randomly poking at stuff that you clearly don't understand.

Offline

#9 2013-09-10 15:22:29

progandy
Member
Registered: 2012-05-17
Posts: 5,211

Re: How to edit /proc/version?

If you use an arch kernel, then this is included in the version string. I don't understand why you want to change it. If you want to create a custom (meta)-distribution, the distribution name, version, ... are defined in /etc/os-release and maybe /etc/DISTNAME-release
http://www.freedesktop.org/software/sys … lease.html


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB