LinuxQuestions.org
Register a domain and help support LQ
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 07-16-2013, 04:42 PM   #1
tmort
Member
 
Registered: Feb 2006
Posts: 33

Rep: Reputation: 15
Using fsck and unmounting


I think I have some corruption is /etc as my system will not boot,

I want to run fsck, but, if I run fsck on /etc I get a message saying the /dev/mapper-lv_root is mounted. I did a little poking around and thought I could unmount it with umount /dev/sda1, but, it still didn't work as it appears to have been remounted or something.

How do I go about running fsck on /etc?
 
Old 07-16-2013, 05:25 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,590

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
You will need to boot off of a live usb or cd. You cant fsck a mounted and in use filesystem. And you cant unmount your root partition while the OS is running off of it.
 
1 members found this post helpful.
Old 07-22-2013, 11:42 AM   #3
tmort
Member
 
Registered: Feb 2006
Posts: 33

Original Poster
Rep: Reputation: 15
I booted from a live CD and ran fsck on /dev/sda1 and /dev/sda2. It looks like sda1 is OK and there is a problem with sda2. This is the output:

#fsck /dev/sda1
fsck from util-linux 2.12.2
e2fsck 1.42 (29-Nov-2011)
/dev/sda1: clean, 280 / 128016 files, 112346 / 512000 blocks

#fsck /dev/sda
fsck from util-linux 2.12.2
fsck: fsck.LVM2_member not found
fsck: error 2 while executing fsck
LVM2_member for /dev/sda2

I found some discussions on this problem, but, they lead in a number of directions and I'm unfamiliar with any of the commands they are discussing.
 
Old 07-22-2013, 05:45 PM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,590

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
That is because you are trying to run an fsck on a partition labeled as an LVM or logical volume member.


So if you have:

/dev/sda2
/dev/sdb2


And both of these are setup as logical volume, you would run the fsck against the logical volume name.


Sometimes it will come up as /dev/mapper/volumename or /dev/VolumeGroupName/Volume name.


Can you do a

Code:
cat /etc/fstab
And post that output.
 
Old 07-25-2013, 09:14 AM   #5
tmort
Member
 
Registered: Feb 2006
Posts: 33

Original Poster
Rep: Reputation: 15
# cat /etc/fstab
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
none /dev/pts devpts gid=2, mode=620 0 0
/dev/fd0 /mnt/floppy auto noauto, rw 0 0
 
Old 07-26-2013, 04:05 AM   #6
itsgregman
Member
 
Registered: Jan 2008
Location: North Carolina
Distribution: Pclinuxos, Slackware, salix
Posts: 157

Rep: Reputation: 50
I assume you ran that command from the live session.

If you can access the root partition of your installed system post the contents of /etc/fstab from the installed system.

Also you said you want to run fsck on /etc, do you have etc on its own partition?
 
Old 07-27-2013, 12:14 PM   #7
tmort
Member
 
Registered: Feb 2006
Posts: 33

Original Poster
Rep: Reputation: 15
I'm not sure why I tried using the Live CD. I forgot I can get to the command prompt with Fedora. Here is the /etc/fstab output:

#
# /etc/fstab
# Created by anaconda on Thu Jul 21 13:16:04 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=f42b9503-6083-4e78-83d0-292e64741389 /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_home /home ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

In regards to whether I have /etc on its own partition: I don't know. I let the installation take care of creating partitions.
 
Old 07-27-2013, 12:44 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,165

Rep: Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784
/etc is part of the / logical volume.

If you can get to the command prompt with fedora then we will need some clarification to what you mean by "will not boot".

FYI to run fsck on your / logical volume from a live CD:
lvchange -ay /dev/mapper/VolGroup-lv_root (To activate the logical volume)
fsck /dev/mapper/VolGroup-lv_root
 
Old 07-27-2013, 01:47 PM   #9
tmort
Member
 
Registered: Feb 2006
Posts: 33

Original Poster
Rep: Reputation: 15
By will not boot I mean it will not boot all the way into the Fedora 18 graphical environment. It hangs up where it is saying waiting for Plymouth. This started after a kernel upgrade, but, I also noticed some errors when I powered off. It doesn't fully boot into the earlier kernels in the boot manager either. I thought it was a bug so I reported it to bugzilla and sent some log files, etc. but they said it was not a bug but probably a corrupted file system.

If I run vchange -ay /dev/mapper/VolGroup-lv_root from the command line while booted for a Pupply Linux live CD I get:

bash: lvchange: command not found
 
Old 07-27-2013, 02:30 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,165

Rep: Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784
As far as I know puppy does not have LVM support.

I would suggest using the Fedora installation CD/DVD and boot to rescue mode.

There is a bugzilla report for what seems like the same problem and after a bit of googling this was a suggested fix. Without seeing the same information you submitted I do not know the difference but hopefully it will work for you.

sudo yum update plymouth ; sudo dracut -f
 
Old 07-29-2013, 10:10 AM   #11
tmort
Member
 
Registered: Feb 2006
Posts: 33

Original Poster
Rep: Reputation: 15
I did:

[root@localhost ~]# lvchange -ay /dev/mapper/VolGroup-lv_root
[root@localhost ~]# fsck /dev/mapper/VolGroup-lv_root
fsck from util-linux 2.22.1
e2fsck 1.42.5 (29-Jul-2012)
/dev/mapper/VolGroup-lv_root: recovering journal
Setting free blocks count to 8283805 (was 8283803)
/dev/mapper/VolGroup-lv_root: clean, 318613/3276800 files, 4823395/13107200 blocks

and tried booting up again. It still got stuck as it was booting up the graphical environment.

I also did:

sudo yum update plymouth
sudo dracut -f

and rebooted again and it still did not fully boot to the graphical environment.

I guess I'll go back and do:

/dev/mapper/VolGroup-lv_home &
/dev/mapper/VolGroup-lv_swap

Any thoughts?
 
Old 07-29-2013, 02:38 PM   #12
itsgregman
Member
 
Registered: Jan 2008
Location: North Carolina
Distribution: Pclinuxos, Slackware, salix
Posts: 157

Rep: Reputation: 50
What is the Graphical Environment on your Fedora install?
Have you tried reinstalling the DM?
Have you tried reinstalling the Graphical Environment itself?
 
Old 07-29-2013, 11:12 PM   #13
tmort
Member
 
Registered: Feb 2006
Posts: 33

Original Poster
Rep: Reputation: 15
The graphical environment is Gnome 3. I hadn't thought about re-installing it. I don't know what DM is, device mapper? and no I haven't tried re-installing it.

Please tell me more
 
Old 07-30-2013, 12:36 AM   #14
itsgregman
Member
 
Registered: Jan 2008
Location: North Carolina
Distribution: Pclinuxos, Slackware, salix
Posts: 157

Rep: Reputation: 50
If I were you I'd try reinstalling Gnome and GDM.

Another question is have you tried logging into Gnome as root user or only into your normal users account?
 
Old 08-01-2013, 07:19 AM   #15
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Have you considered setting it to boot into cli mode only (runlevel 3) and then debugging or re-installing the GUI from there?
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Boot fails at fsck but I get no error when I run fsck myself. new install on ssd. rlx Slackware 1 12-02-2012 03:29 PM
ext4 won't mount - fsck required - 2nd fsck in less than a week td3201 Linux - General 1 09-10-2012 01:07 AM
unmounting all nfs filesystems without unmounting local ones kaplan71 Linux - General 1 03-05-2009 12:00 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 08:51 AM
CD unmounting Paul_assheton Linux - General 14 04-16-2002 03:37 AM


All times are GMT -5. The time now is 12:18 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration