LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-02-2007, 10:30 AM   #1
matters
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 281

Rep: Reputation: Disabled
workaround /proc/partitions/


is there a way to trick, so i can modify /proc/partitions?

Thanks!
 
Old 06-02-2007, 12:34 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
/proc/partitions shows you the partitions you have. You don't change /proc/partitions directly.

Tools such as fdisk, sfdisk, parted, and others modify the partitions you have.

Type "man fdisk" for more details of how to use fdisk. (or man sfdisk or man parted for those utilities)

Type "man proc" for details of the information provided under /proc.
Mostly this is for information gathering. There are SOME things that can be modified by writing into /proc but not much and not much you would want to try without very deep understanding of how to do that.
 
Old 06-07-2007, 05:02 PM   #3
tomcdyer
Member
 
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108

Rep: Reputation: 15
Why do you want to do this "matters"?

It is a very long process to do and a bit of a headache
 
Old 06-08-2007, 08:28 AM   #4
matters
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 281

Original Poster
Rep: Reputation: Disabled
If you can post how to do it i would be very gratefull. As long as i learn something its not a headache

Thanks!
 
Old 06-08-2007, 08:40 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Did jlightner's post not answer your question???

Accepting no responsibility for the outcome, one obvious thing is to change the permission on the file and then attempt to edit it. Since it is really a virtual file--existing only in memory--I think this would be a struggle for control with the kernel. My money says the kernel will win---I just don't know what the casualties will be.....
 
Old 06-08-2007, 09:00 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Yet another example of a demand for a (pre-determined) answer rather than specifying the issue.

@pixellany - if anyone could manage to damage the system by mangling a /proc "file" it would be a reportable bug.
 
Old 06-08-2007, 09:50 AM   #7
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Code:
if anyone could manage to damage the system by mangling a /proc "file" it would be a reportable bug
Not sure I buy that - I've seen solutions for updating /proc/scsi by writing into it. If you can write presumably good information into it you would likely be able to crap out something by writing bad information into it. Not something I want to test at the moment though.

If using "rm -rf /" can damage your system without being a "bug" then it seems doing boneheaded writes into /proc wouldn't be a "bug" either.
 
Old 06-08-2007, 06:31 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Different situation - /proc is just an abstraction to allow kernel/driver code to expose data. Any directories/files needed have to be created and destroyed by that code.
Most are read only, but write is supported. But it's just a buffer for that bit of code. If it can't handle bad data/requests, it's a bug.
Especially in kernel code.
 
Old 06-10-2007, 07:58 AM   #9
tomcdyer
Member
 
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108

Rep: Reputation: 15
Quote:
Originally Posted by matters
As long as i learn something its not a headache
LOL

Very true
 
Old 06-10-2007, 08:28 AM   #10
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
One always learns much more from what goes wrong than what goes right. If it goes right you only learn the basic commands. If it goes wrong you often learn a lot of what is behind the commands.

I've therefore learned quite a bit from "headaches".
 
Old 06-10-2007, 09:48 AM   #11
tomcdyer
Member
 
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108

Rep: Reputation: 15
Havn't we all.

 
Old 06-10-2007, 01:14 PM   #12
matters
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 281

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jlightner
One always learns much more from what goes wrong than what goes right. If it goes right you only learn the basic commands. If it goes wrong you often learn a lot of what is behind the commands.
Thats the beauty of learning, i love when it goes wrong,

and im willing to learn the headache, if anyone have idea please post
 
Old 06-10-2007, 03:01 PM   #13
tomcdyer
Member
 
Registered: Jun 2007
Location: Surrey, UK
Distribution: Slackware 11 (mainly), Vista, XP
Posts: 108

Rep: Reputation: 15
You could use a live CD distro eq Ubuntu or SLAX and use their graphical partition editors (especialy Ubuntu)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/proc/partitions does not exist Impaler Linux - Software 5 12-10-2008 11:54 PM
/proc/partitions disk usage Fippy Linux - General 4 07-25-2008 10:17 AM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 02:11 PM
is dm-0 in /proc/partitions a hard disk? linux_10_1 Linux - Newbie 3 04-11-2006 04:51 PM
/proc/partitions sighini Linux - General 0 11-17-2003 04:32 AM


All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration