Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-17-2005, 05:44 PM   #1
Registered: Apr 2004
Location: Greece (Elladara!!)
Distribution: Debian
Posts: 59

Rep: Reputation: 15
/proc/partitions does not exist


I have the following problem :

The /proc/partitions file was deleted (somehow, not sure about it) after the installation of a new kernel in the bootloader (lilo). Does anyone know where can I find the information that the /proc/partitions file holds so I can edit it by hand? My system does not boot in the moment (obviously) because the kernel can't mount the root partition of the device, which "does not exist". I tried to edit the file by copping the knoppix output results of the command "cat /proc/partitions" but still the kernel,at boot time, can't find my root partition. Oh! The new knoppix is really nice by the way. I didn't have the chance to use this version before (thank god!)...

Old 01-17-2005, 06:21 PM   #2
Senior Member
Registered: Oct 2003
Posts: 2,559

Rep: Reputation: 213Reputation: 213Reputation: 213
Your post doesn't make a lot of sense. All the contents of /proc are recreated every time you boot. If you boot with a knoppix cd and look at the /proc directory of any linux system you have installed on your hard drive you will see it's completely empty. /proc is generated anew everytime you boot, i.e. the directory is entirely virtual - the files don't exist on your hard disk; they're created on the fly by the linux kernel. You undoubtedly made an error compiling your new kernel.
Old 01-17-2005, 06:23 PM   #3
Registered: Aug 2002
Posts: 16,035

Rep: Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853
/proc is a pseudo file system i.e. it only exists in memory and the kernel creates it at boot up. Hopefully you still have the capability to boot the old kernel? Hindsight is always 20-20 but it is a good idea to not delete old kernels until you have verified the new one.

So, something else is amiss. Explain the procedure you used to install the new kernel.
Old 01-17-2005, 06:53 PM   #4
Registered: Apr 2004
Location: Greece (Elladara!!)
Distribution: Debian
Posts: 59

Original Poster
Rep: Reputation: 15
Thanks for your replies,

Luckily I haven't erased my old kernel which seems to be working fine. I have the problem though with the new kernel.
I followed these steps to compile-install the kernel:

1)Extracted the kernel source (tar)
2)Created a link which targets on a "linux" file
3)make xconfig (I prefer that because the comments provided make it easier)
4)make-kpkg buildpackage -rev <filename>
5)dpkg -i <filename>.deb (I use debian)
6)Input the new image to lilo
7)Updated lilo

Can't see something wrong with that. Maybe is something wrong with my new kernels configuration. I'll configure again and post.


Last edited by Impaler; 01-17-2005 at 06:55 PM.
Old 01-20-2005, 09:52 AM   #5
Registered: Apr 2004
Location: Greece (Elladara!!)
Distribution: Debian
Posts: 59

Original Poster
Rep: Reputation: 15

The problem was the configuration of my new kernel. I had made some errors with the filesystems and the root partition could not be mounted. I fixed the errors, compiled , installed and everything works fine.

Thanks a lot for you help everyone...
Old 12-10-2008, 10:54 PM   #6
LQ Newbie
Registered: Oct 2008
Posts: 3
Blog Entries: 1

Rep: Reputation: 0
Talking I've got a new solution for this question

First,I'd like to say that I am not good at English.
I've got the same problem yesterday. I used one morning to find out how to fix it.It's hard to open the linuxquestions's website here,if not so,I would like to ask you in Finally I found the solution and successfully boot my machine.
I got the it here:

Then the answer comes:
If you run in to a problem on Linux when after a reboot you get the following error 'dup2: bad file descriptor error' do not be alarmed, your system has not been compromised and your hard drives have not failed. This error is displayed if you or someone (hopefully your coworkers) have accidentally deleted or overwritten a /dev/null file. The instructions below will show you how to easily fix that problem.

Among the errors that you might recieve are the following: "dup2: bad file descriptor" to "/dev/null: Read-only filesystem" to "could not open /proc/partitions some text about UUID and Label". The step-by-step instructions below will help you fix these errors.

Warning: Only use these if you get "dup2: bad file descriptor" and "/dev/null: Read-only filesystem" during bootup, and
"could not open /proc/partitions some text about UUID and Label" when trying to remount a filesystem.

First you must boot into the single user mode. Although if you get the error and you restart the system it will automatically drop you in into the single user mode shell.

Next you need to mount the /proc partition:

$ mount -o ro /proc

Now you must mount the / filesystem in rw mode

$ mount -o remount,rw /

Next you must delete the /dev/null file and replace it with the correct inode.

$ rm -f /dev/null
$ mknod -m 666 /dev/null c 1 3

The last step is to remount / filesystem back to the ro mode, and restart the system

$ mount -o remount,ro /
$ reboot

That should do it. Hopefully these instruction will save your at the time when errors like that happen.


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 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
USBFS nor /proc/bus/usb exist... Gripp Linux - Hardware 1 03-25-2005 10:03 PM
When I run /sbin/lilo on Debian it says /proc/partitions does not exist coldy Linux - General 1 03-21-2004 08:28 AM
/proc/partitions sighini Linux - General 0 11-17-2003 03:32 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 AM.

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