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?
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.
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 from util-linux 2.12.2
e2fsck 1.42 (29-Nov-2011)
/dev/sda1: clean, 280 / 128016 files, 112346 / 512000 blocks
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.
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:
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
# 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
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?
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:
# 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.
/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)
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
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
[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:
What is the Graphical Environment on your Fedora install?
Have you tried reinstalling the DM?
Have you tried reinstalling the Graphical Environment itself?
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
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?
Have you considered setting it to boot into cli mode only (runlevel 3) and then debugging or re-installing the GUI from there?
|All times are GMT -5. The time now is 05:54 AM.|