LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hi,

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!)...

Thanks
 
Old 01-17-2005, 06:21 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 3,002

Rep: Reputation: 394Reputation: 394Reputation: 394Reputation: 394
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
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,216

Rep: Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100
/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
Impaler
Member
 
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
8)Rebooted

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

Thanks

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

Original Poster
Rep: Reputation: 15
Hi,

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
Cody_CN
LQ Newbie
 
Registered: Oct 2008
Posts: 3
Blog Entries: 1

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

Hi!
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 linuxquestions.org. Finally I found the solution and successfully boot my machine.
I got the it here:
www[.]goitexpert[.]com/entry.cfm?entry=Fixing-dup2-bad-file-descriptor-error-on-Linux

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.
 
  


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 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:15 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