LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-28-2008, 09:49 AM   #1
samengr
Member
 
Registered: Jan 2008
Posts: 59

Rep: Reputation: 15
/boot folder contents missing/deleted


Hi All,

I was playing with my linux machine for RHEL preparation. I dont know where i left it last time before going to leave :-). Now the system is up and I cant take risk to reboot the machine.

Now if i give the command

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
145G 133G 4.8G 97% /
/dev/sda1 145G 133G 4.8G 97% /boot
none 501M 152K 501M 1% /dev/shm


Strange thing is /dev/sda1 is mounted on /boot which is 100MB in size but if you see above its showing the specs of / into /boot

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
145G 133G 4.8G 97% /
same

/dev/sda1 145G 133G 4.8G 97% /boot


whats wrong with this ?

when I check the contents of /boot fodler it is empty.

# ls /boot

it gives nothing. and prompt to same place where it was (mean empty).

Please see the more outputs that can help

##########

# fdisk -l

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 9726 78019672+ 8e Linux LVM

Disk /dev/sdb: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9726 78124063+ 8e Linux LVM

###########

# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


############

If i go into grub with # grub

grub> find (hd0,0)/grub/grub.conf
(hd0,0)

grub> cat (hd0,0)/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-11.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-11.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.6.9-11.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.9-11.EL.img

grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 1, Filesystem type unknown, partition type 0x8e

grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeed
ed
Done.

grub> quit

###############

Mean: I can see the file and its contents in grub menu by (grub> cat (hd0,0)/grub/grub.conf ) but nothing in /boot folder out of grub menu.

# cat /etc/grub.conf
cat: /etc/grub.conf: No such file or directory
# ls /boot/
# still nothing in this folder

Another interesting thing I cant move the mounted directory to somewhere with different or same name, what i checked on other system but here it works

# mv /boot/ /root/boot
[root@example /]#

That make sense that it wasnt mounted properly in last bootup. but I am not sure.

I have to recover it without reboot. Can any one help and sort it out?

Please do let me know if you need more outputs.

Many thanks.

Cheers.
 
Old 11-29-2008, 07:17 AM   #2
__Ryan__
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
You have a boot partition which is mounted at /boot and this is fine. It may not be mounted any longer since you seem to be viewing the empty directory where this partition is mounted. Grub can view the contents because you are specifically telling it the device partition with "root (hd0,0)" command. Everything should be fine on reboot once the partition is correctly mounted once again.

You can try to remount all partitions in your /etc/fstab by running the following:

# mount -a
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot folder deleted !!! jujose Linux - General 18 10-22-2008 10:39 AM
Accidently deleted contents of /boot gainil Linux - General 2 11-14-2007 11:25 AM
deleted /boot contents- recover? kpachopoulos Linux - General 1 03-09-2007 03:40 AM
/usr/local folder contents accidently deleted jshaikh Linux - Newbie 1 07-12-2003 01:55 PM
Deleted /boot folder awlad Slackware 9 02-21-2003 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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