LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   udev trouble (https://www.linuxquestions.org/questions/linux-newbie-8/udev-trouble-636006/)

crazy8 04-17-2008 09:29 AM

udev trouble
 
Ok last week I was having some issues and was told to remove then re-install udev. Well I have done both but right now I get an error that reads...

Booting 'Dedora Core (2.6.22.14-72.fc6)'

root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda1 rhgb quiet

Error 15: File not found

Press any key to continue...


So how do I fix this?

Thanks for the help

bigrigdriver 04-17-2008 09:50 AM

Quote:

Grub error 15 : File not found
This error is returned if the specified file name cannot be found,
but everything else (like the disk/partition info) is OK.
This usually means an error in the grub configuration file /boot/grub/menu.lst (grub.conf on some distros). The config file tells grub to look in the wrong place for it's files.

To resolve this, we need to see the following:

a) the output of fdisk -l

b) the contents of /boot/grub/menu.lst (just the menu entries with their kernel and initrd lines)

c) the contents of /etc/fstab

Your error is probably caused by an error in b), but the information from a) and c) is needed to determine the corrective edit to make in b).

crazy8 04-17-2008 10:07 AM

Ok I can get all of that for you. But how do I get to the shell, again when the system doesnt boot?

bigrigdriver 04-17-2008 10:39 AM

First, try using your Fedora installation cd. When you power up the computer and it goes to the cd, you may see a menu offering options such as install, boot from hd, etc. Select boot from hd, and it should find your Fedora installation and boot it up.

You may be able to fix your boot problem by running grub-install while in Fedora, which should correct the issue with /boot/grub/menu.lst. If not, you should at least be able to get the information I requested.

If you can't boot into the Fedora installation from the install cd, try booting a liveCD and mount your Fedora partition to get the information.

If you have the means to download and burn a liveCD, get Ultimate Boot CD, which also makes it possible to boot your Fedora installation.

crazy8 04-17-2008 11:35 AM

Well I am still downloading UBC right now but just so happened I had a Slax live boot CD on me so here is the info you requested.

Results of fdisk -l
Disk /dev/sda: 500GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 *512 = 8225208 bytes

/dev/sda1 /boot
/dev/sda2 /
/dev/sda3 swap


Results of /etc/fstab

tmpfs / tmpfs defaults 0 0 # AutoUpdate
devpts /dev/pts devpts gid=5, mode=620 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
/dev/hda /mnt/hda_cdrom iso9660 noauto,users,exec 0 0 # AutoUpdate
/dev/sda1 /mnt/sda1 ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda2 /mnt/sda2 ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda3 swap swap defaults 0 0 # AutoUpdate
/dev/fd0 /mnt/floppy vfat,msdos noauto,users,suid,dev,exec 0 0 # AutoUpdate

Results of /boot/grub/menu.lst

root (hd0,0)
kernel /vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda1 rhgb quiet
initrd /initrd-2.6.22.14-72.fc6.img


I hope I got everyting you were asking
Thanks so much for your help

bigrigdriver 04-17-2008 11:54 AM

Ok, here's what I see.

1) you have /boot on a seperate partition from the rest of the filesystem.
Quote:

/dev/sda1 /boot
/dev/sda2 /
2) your /boot/grub/menu.lst is looking for /boot in the same partition as the rest of the filesystem. And it show the root of the filesystem in the /boot partition instead of it's own partition of /dev/sda2.
Quote:

kernel /vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda1 rhgb quiet
initrd /initrd-2.6.22.14-72.fc6.img
To correct this to make it agree with your partition structure, make this correction
Quote:

kernel (hd0,0)/vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda2 rhgb quiet
initrd (hd0,0)/initrd-2.6.22.14-72.fc6.img
3) /etc/fstab has problems as well. The partition mount points are expressed incorrectly.
Quote:

dev/sda1 /mnt/sda1 ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda2 /mnt/sda2 ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
it should read
Quote:

dev/sda1 /boot ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
/dev/sda2 / ext3 auto,users,suid,dev,exec 0 0 # AutoUpdate
unless the fstab you copied is from the running Slack liveCD instead of the /etc/fstab in your Fedora partition.

crazy8 04-17-2008 01:26 PM

Quote:

unless the fstab you copied is from the running Slack liveCD instead of the /etc/fstab in your Fedora partition.
Thats exactly what happened and I didnt realize it when I was typing all of that. Anyway MINE reads this...

LABEL=/1 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 1
.
.
.Some stuff in here
.
.
LABEL=SWAP-sda3 swap swap defaults 0 0

Anyway there is my info

bigrigdriver 04-17-2008 02:29 PM

Quote:

Results of fdisk -l
Disk /dev/sda: 500GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 *512 = 8225208 bytes

/dev/sda1 /boot
/dev/sda2 /
/dev/sda3 swap
/dev/sda3 is your swap partition.

Quote:

LABEL=SWAP-sda3 /mnt/backup ext3 defaults 0 0
This nees to be corrected to agree with the output of fdisk -l. Make it look like this:
Quote:

LABEL=SWAP-sda3 swap defaults 0 0
Your external drive should have another drive designation, possibly /dev/sdb. Switch it on and wait a few seconds, then run fdisk -l again. You should see the external drive listed as well as /dev/sda.

crazy8 04-17-2008 02:43 PM

Right now I have...
LABEL=SWAP-sda3 swap swap defaults 0 0
and for this one...
Quote:

LABEL=/1 / ext3 defaults 1 1
should I turn that into...
Quote:

LABEL=/ / ext3 defaults 1 1
???

crazy8 04-17-2008 02:57 PM

Here is my /etc/fstab file complete...

LABEL=/1 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/dev/sdb1 /mnt/backup ext3 defaults 0 0

The only reason I show this now is that I noticed that lines 3 and 4 use the /dev dir and considering I removed udev which inturn removes the /dev directory wouldnt this be why I still get the "error 15" screen?

If so how do I fix it as I assume this may take a different approach now?

bigrigdriver 04-17-2008 04:24 PM

In your initial post in this thread, you indicated that you removed and re-installed udev. Now you say you removed udev, which removed dev, and nothing about re-installing udev. So, which is it? Udev is install or udev is not installed.

Are you still getting error 15 when you try to boot Fedora from the hard drive?

Once more, show me the contents of /boot/grub/menu.lst to see the changes you made in response to earlier posts I made.

crazy8 04-18-2008 09:24 AM

My appologies, yes I did remove udev and it did remove the /dev directory, then I did reinstall ( as I was told to remove and reinstall udev) As of right now I do have my /dev directory and to my knowledge udev is installed (I used yum to do it).

Yes I am still getting error 15
Here is my current configuration...

title Fedora Core (2.6.22.14-72.fc6)
root (hd0,0)
kernel (hd0,0)/vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda2 rhgb quiet
initrd (hd0,0)/initrd-2.6.22.14-72.fc6.img

bigrigdriver 04-18-2008 12:15 PM

Quote:

/dev/sda1 /boot
/dev/sda2 /
/dev/sda3 swap

title Fedora Core (2.6.22.14-72.fc6)
root (hd0,0)
kernel (hd0,0)/vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda2 rhgb quiet
initrd (hd0,0)/initrd-2.6.22.14-72.fc6.img
Oops! My bad. I missed an obvious error.

The root of the filesystem is /dev/sda2 (hd0,1) and the /boot partition is /dev/sda1 (hd0,0).

Change *root (hd0,0)* to *root (hd0,1)*.

Also, verify the correctness of the vmlinuz and initrd information by comparing them with the files in /boot. A typo in the kernel numbers would also cause problems.

PS: google up a copy of "Solving Boot Problems with Grub" and file it away somewhere. It's very handy to have around. Scroll to the end for a listing of grub error codes and their meanings.

chiu ni 04-18-2008 01:19 PM

i wish to reinstall fedora core6 but the system fails to boot from cd/dvd although i've changed the boot setup to boot from cd/dvd.The prompt to press enter in order to boot from cd/dvd does not appear but Grub loader starts up immediately

crazy8 04-18-2008 01:22 PM

Well changing the root (hd0,0) to (hd0,1) didnt work either :(

Do you recommending me changing any of this stuff also???

kernel (hd0,0)/vmlinuz-2.6.22.14-72.fc6 ro root=/dev/sda2 rhgb quiet
initrd (hd0,0)/initrd-2.6.22.14-72.fc6.img

I will take a look on google and see what I can find. How ever I have taken a look in my boot partition and my /boot directory and have found this...

/boot partition contents...
/grub
/lost+found

/boot directory on /sda2...
---empty---

This doesnt feel good now that im seeing this.

crazy8 04-18-2008 01:59 PM

So I have to ask. I cant even begin to explain how many countless hours I have put into setting this server up for my boss, but is there anyway possible for me to reinstall linux or grub or anything that WONT destroy everything I have done on the server?

bigrigdriver 04-18-2008 02:07 PM

The boot directory on /dev/sda2 should be empty. It's the mount point for /dev/sda1, and will not show files unless /dev/sda1 is mounted.

So, if you are looking at /boot and seeing an empty folder, that implies that /dev/sda1 is not mounted (which may be the problem in the first place).

Try "mount /dev/sda1 /boot'. Do you get any kind of message? If not, then look at the contents of /boot again.

What do you see?

crazy8 04-18-2008 02:29 PM

Ok I think I may have gone wrong with understanding that I am using a live CD to do all the command stuff. Anyway I am using a slax CD and once I log into the terminal I get a "root@slax:/#" prompt.
here is what I get...

root@slax:/# cd boot
root@slax:/# ls
grub/ lost+found/

Now I thought this was just coming off the CD so I also did this...
root@slax:/# cd /mnt/sda1
root@slax:/# ls
grub/ lost+found/

And to be sure that what I was looking at made since I also did this...
root@slax:/# cd /mnt/sda2
root@slax:/#ls
...all my folders and files (ones I did personally) show up here...
root@slax:/# cd boot
root@slax:/# ls
root@slax:/# (I get nothing)

With showing these examples (hopefully it helps illustrate any confusion either of us has) When I did the first example then did this...
root@slax:/# vi grub/menu.lst
.
.
.
-contents of menu.lst are displayed-
everything that is shown in this are all the changes we made to the file but I was under the impression that it would have been just a copy of the file on the disk.

Oh yea I almost forgot. I did try to mount sda1 and it said it already was which may explain away the confusion I had with thinking I may end up looking at a CD version of the menu.lst file.

bigrigdriver 04-18-2008 03:12 PM

Quote:

Now I thought this was just coming off the CD so I also did this...
root@slax:/# cd /mnt/sda1
root@slax:/# ls
grub/ lost+found/
That's bad news. Most of the files that should be in /boot are missing (the system map, kernel and initrd images, etc).

Quote:

And to be sure that what I was looking at made since I also did this...
root@slax:/# cd /mnt/sda2
root@slax:/#ls
...all my folders and files (ones I did personally) show up here...
root@slax:/# cd boot
root@slax:/# ls
root@slax:/# (I get nothing)
That's bad news. All of the files that should be in /boot are missing.

It seems that when someone (whomever that someone is) tried to seperate /boot from the root of the filesystem and put it in it's own partition, the files of /boot were incompletely moved from the /boot under the root of the filesystem to the new /boot partition.

'ls /boot' should look something like this:
Quote:

coffee.bmp grub memtest86+.bin System.map-2.6.17
config-2.6.17 initrd.img sarge.bmp vmlinuz
debian.bmp initrd.img-2.6.17 sid.bmp vmlinuz-2.6.17
debianlilo.bmp memtest86.bin System.map xen-3.0-i386.gz

If you have a backup that you can restore, then you can recover those missing files.

If you don't have a backup, you will have to re-install the grub rpm from the Fedora install cd. Copy it from the cd, and re-install with 'rpm -i --replacefiles <grub rpm name here>'.

crazy8 04-18-2008 03:16 PM

Well based on what you have said, I will have to reinstall grub. Now I have FC6 so do I want to do a "text install" then, in order to run this
Quote:

rpm -i --replacefiles <grub rpm name here>
???

I have always done graphical, thats why I ask.
And thanks much for your help and patients in all of this. I greatly appreciate it.

bigrigdriver 04-18-2008 03:45 PM

I suggested the command-line version of rpm installation because I don't know what Fedora provides by way of GUI installer, and I don't know if the GUI installer will allow you to specify the --replacefiles option (to replace those missing files in /boot).

Indeed, I'm not certain re-installing grub will replace the kernel, initrd, systemmap, etc., or if those files are copied there during the OS installation. I'm hoping that the installation of grub is what drives the copying of files into /boot. Those missing files certainly go a long way to explain the grub error 15.

If this still doesn't work, there is still one option left: backup what you have (as in system backup) then re-install Fedora. If it comes to that, be careful during installation, when it gets to the part of selecting the partition(s) to install into, select /dev/sda1 with a mount point of /boot and do not format, then select /dev/sda2 with a mount point of / and do not format.

That should get your /boot files back. But it will (may?) undo anything else you have done in setting up the server. Just restore that backup (all except /boot) and you're back in business.

crazy8 04-23-2008 09:43 AM

Ok one last question and I am going to try what your requesting me to do, to fix this. How do I find the grub name, for this <grub rpm name here>?

Thanks again

crazy8 04-23-2008 11:13 AM

Well just as an FYI I tried the rescue mode [F5] and it ends up saying something like it had problems mounting some things and then lets me hit enter to get a sh-3.1# prompt... Im still unsure how to find the rpm grub name though.

EDIT: Here is another thing I just tried...
http://roshan18.wordpress.com/2008/0...b-boot-loader/
if I do this...
# root (hd0,0)
# setup (hd0)

It all looks good except that one line says...
Checking if "/boot/grub/stage1" exists...no

Does that mean anything to you?


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