LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 09: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, 11:34 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
/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, 04: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, 07: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, 07:40 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 08:00 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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, 08:50 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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, 05:31 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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, 06: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, 07:28 AM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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, 08: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, 12: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, 02: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



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 10:54 PM
/proc/partitions disk usage Fippy Linux - General 4 07-25-2008 09:17 AM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 01:11 PM
is dm-0 in /proc/partitions a hard disk? linux_10_1 Linux - Newbie 3 04-11-2006 03:51 PM
/proc/partitions sighini Linux - General 0 11-17-2003 03:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:29 PM.

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
Open Source Consulting | Domain Registration