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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-17-2005, 05:44 PM
|
#1
|
Member
Registered: Apr 2004
Location: Greece (Elladara!!)
Distribution: Debian
Posts: 59
Rep:
|
/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
|
|
|
01-17-2005, 06:21 PM
|
#2
|
Senior Member
Registered: Oct 2003
Posts: 3,002
|
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.
|
|
|
01-17-2005, 06:23 PM
|
#3
|
Moderator
Registered: Aug 2002
Posts: 26,216
|
/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.
|
|
|
01-17-2005, 06:53 PM
|
#4
|
Member
Registered: Apr 2004
Location: Greece (Elladara!!)
Distribution: Debian
Posts: 59
Original Poster
Rep:
|
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.
|
|
|
01-20-2005, 09:52 AM
|
#5
|
Member
Registered: Apr 2004
Location: Greece (Elladara!!)
Distribution: Debian
Posts: 59
Original Poster
Rep:
|
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...
|
|
|
12-10-2008, 10:54 PM
|
#6
|
LQ Newbie
Registered: Oct 2008
Posts: 3
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 05:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|