LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2012, 07:09 AM   #1
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Rep: Reputation: Disabled
Checking root filesystem fails : No such file or directory while opening /dev/hda2


hi all,

I am running a CentOS base VM on top of Hyper-V server.
When i added SCSI controller(earlier it was ide controller) support with new kernel and install them in VM after reboot, i am hitting following filesystem check
error messages :
******************************************************
Setting hostname hostname:
Checking root filesystem
fsck.ext3/dev/hda2:
The superblock could not be read or does not describe correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem(and not swap or ufs or something else),then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

: No such file or directory while trying to open /dev/hda2

*** An error occurred during the filesystem check.
*** Dropping you to a shell; the system will reboot
*** When you leave the shell.

*****************************************************
Also, when I go to the repair filesystem mode. I found out the strange behaviour when i ran those command :

****************************************
(Repair filesytem) 1 # mount
/dev/hda2 on / type ext3 (rw)
proc on /proc type proc (rw)

(Repair filesystem) 1# cat /etc/mtab
/dev/hda2 /ext3 rw 0 0
proc /proc proc rw 0 0

(Repair filesystem) 1# df
Filesystem 1K-blocks used Available Use% Mountedon
/dev/hda2 4%

******************************************
I thin for all above command there should be /dev/sda2 instead of /dev/hda2.

Also my fstab , and fdisk -l looks like ok for me.
*******************************************
(Repair filesystem) 1# cat /etc/fstab
LABEL=/ / 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-xvda3 swap swap defults 0 0

(Repair filesystem) 1# fdisk -l
Device Boot Start End Block Id System
/dev/sda1 * 1 49 98535 83 Linux
Partition 1 does not end with cylinder boundary.
/dev/sda2 49 19197 39062500 83 Linux
Partition 2 does not end with cylinder boundary.
/dev/sda3 ......
Partition 3 does not ......
/dev/sda4 ......
Partition 4 does not end ....

(Repair filesystem) 1# e2label /dev/sda1
/boot

(Repair filesystem) 1# e2label /dev/sda2
/

(Repair fielsystem) 1# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4

(Repair filesyatem) 1# ls /dev/hd*
ls: /dev/hd*: No such file or directory


Kindly suggest any configuration or kernel configs missing or how to solve this issues

Many many thanks for your reply. Please ignore any spelling mistakes because it is hand written.

thanks & Regards,
Ujjwal
 
Old 12-04-2012, 02:46 PM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,500

Rep: Reputation: Disabled
Just reading through your post, & I think maybe you are right about using sd as against hd, because sd used to stand for scsi disk, (hd = hard drive/internal ide). Also as fdisk -l is showing sda, & listing /dev is only showing sda partitions. fsck can't check hda2 as it doesn't exist.
I think your problem came about because you changed an IDE controller to a SCSI controller. Make sure you have good backups of your data before doing anything.
 
Old 12-04-2012, 02:54 PM   #3
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
fatmac,
thanks for your reply, I have taken a backup. But still i don't understand why this is happening and searching for reliable solution...
 
Old 12-04-2012, 11:17 PM   #4
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 218

Rep: Reputation: 20
is there any kernel module missing?
 
Old 12-05-2012, 04:05 AM   #5
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
TKH,
I don't think or atleast i am not able to figure it out. Can you please suggest some configs or modules so that i can cross check?
 
Old 12-05-2012, 04:37 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Could you please in more detail describe what you did. I understand that you have a VM with Centos running on Hyper-V. Then you added a scsi drive to the host.

When you executed the fsck.ext3 command, how did you know that the parition is formatted with ext3? is it possible that it in fact has another filesystem?

Markus
 
Old 12-05-2012, 05:13 AM   #7
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
markush,

When VM reboots and coming with new kernel, after starting udev , setting clocksource and setting hostname it checks the filesystem there it invokes the fsck.ext3 command and go further for enabling swap space , sysstat and all that.

Below are the my kernel File Systems config:
#
# File systems
#
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4_FS is not set

Also, i am sure, it is in same filesystem.

-ujjwal
 
Old 12-24-2012, 12:18 AM   #8
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
hi all,

(Repair filesystem) 1 # mount /
mount: /dev/sda2 already mounted or /busy
mount: according to mtab, /dev/hda2 is already mounted on /

can anybody suggest why it is?

-ujjwal
 
Old 12-24-2012, 03:12 AM   #9
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
What's the problem? fsck can only work on unmounted partitions. You have mounted / already (which is /dev/sda2 and so it can't be checked.

If you want to check your root filesystem you'll have to tell fsck to do it at boottime when it isn't already mounted.

Markus
 
Old 12-24-2012, 06:28 AM   #10
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
hi markush,

I am worried about this line "mount: according to mtab, /dev/hda2 is already mounted on /" because there is no such device named as /dev/hda2 then from where mtab storing /dev/hda2.

-ujjwal
 
Old 12-24-2012, 06:32 AM   #11
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Could you please post your /etc/fstab file?

Markus
 
Old 12-24-2012, 11:41 AM   #12
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
I posted in first comment itself and posting again,

root@ujjwal# cat /etc/fstab
LABEL=/ / 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-xvda3 swap swap defults 0 0
 
Old 12-26-2012, 04:29 AM   #13
ujjwalKumar
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Also i like to add when I restart VM forcibly(means unclean shutdown/restart) and switch the kernel then this issue does not hit means system is coming up.
Any comment?
 
  


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
fsck.ex2:not found file or directory while opening /dev/mapper/root mukesh.methaniya Linux - Kernel 3 04-08-2011 09:39 AM
Linux Red Hat 7.0 Fails at Checking Root File System vdixit Linux - Newbie 11 01-20-2010 01:14 PM
installing Slackware 12.1 on /dev/hda2, boot fails zeelog Slackware 3 10-14-2008 08:14 PM
Error opening /dev/wacom no such file or directory Xirtrips Linux - Software 1 10-02-2006 04:20 PM
After updating SuSE 9.2 packages, system fails boot without mounting /dev/hda2 orgcandman Linux - Software 5 08-16-2005 09:59 PM


All times are GMT -5. The time now is 12:44 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration