You are not logged in.
I was using XFCE on my netbook recently and clicked "shutdown". It logged out to the command prompt and nothing happened. Assuming that I'd clicked "logout" by mistake, I typed "pacman -Syu" to run an update... And moments later it suddenly started the shutdown process.
Now, whenever I boot up, I see the message below. I tried booting from a GParted CD to check the filesystems for errors, but none were detected.
Can anyone suggest what I might need to do to fix the problem?
rootfs: clean, 11026/246512 files, 477083/984576 blocks
home: clean, 4386/527280 files, 237183/2105344 blocks
/dev/sdb2 is mounted. e2fsck: Cannot continue, aborting.
************* FILESYSTEM CHECK FAILED ************
*
* Please repair manually and reboot. Note that the root
* file system is currently mounted read-only. To remount
* it read-write type: mount -n -o remount,rw /
* when you exit the maintenance shell the system will
* reboot automatically.
*
*************************************************
Give root password for maintenance
(or type Control-D to continue):
Last edited by esuhl (2012-03-27 01:20:07)
Offline
What happens when you do try the suggestion given by it?
LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King
Offline
You can boot the system using a archlinux live cd, and run fsck manually on every linux partition in the old system with options.
DON'T mount any of the filesystems before running fsck, or your data will probably be lost. If you want to check the partition information first, run fdisk -l with root privileges.
Offline
. I tried booting from a GParted CD to check the filesystems for errors, but none were detected.
@lijpbasin
Out of curiousity, how Is your suggestion better than Gparted?
LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King
Offline
/dev/sdb2 is mounted. e2fsck: Cannot continue, aborting.
As mentioned already, the reason it's failing is because the /dev/sdb2 partition is mounted before it can be fsck'd. What is this partition exactly (which filesystem, what's on it, mountpoint,...)?
Burninate!
Offline
Write umount /dev/sdb2 in konsole or unmount partition in gparted by right click on problematic partition and click unmount. Than proced.
Last edited by Shark (2012-03-24 10:03:24)
If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau
Registered Linux User: #559057
Offline
Did you try adding the fsck hook to /etc/mkinitcpio.conf ?
Offline
Are you mounting the root drive with "ro" (read only) in fstab?
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Thank you all for your replies :-)
What happens when you do try the suggestion given by it?
I don't exactly know how I should "repair manually"... I thought a filesystem check in GParted would have been enough...
You can boot the system using a archlinux live cd, and run fsck manually on every linux partition in the old system with options.
DON'T mount any of the filesystems before running fsck, or your data will probably be lost. If you want to check the partition information first, run fdisk -l with root privileges.
Thanks. I tried booting from an ArchBang live CD last night and ran "e2fsck -pcv" on each partition. The check completed, but the problem persists... I just tried again using "fsck" as you suggested and got the following output (but the machine still fails to boot with the same error as before):
fsck from util-linux 2.20.1
e2fsck 1.41.14 (22-Dec-2010)
usr was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
usr: 115811/458752 files (1.7% non-contiguous), 783161/1834496 blocks
/dev/sdb2 is mounted. e2fsck: Cannot continue, aborting.
As mentioned already, the reason it's failing is because the /dev/sdb2 partition is mounted before it can be fsck'd. What is this partition exactly (which filesystem, what's on it, mountpoint,...)?
I'm not overly familiar with the Linux boot process, but why would it suddenly be mounting this partition before fsck-ing it? Even if it was mounted when the netbook shutdown, surely the boot process starts with all partitions unmounted...? Anyway, the partition details from /etc/fstab are below.
<file system> <dir> <type> <options> <dump> <pass>
tmpfs /tmp tmpfs nodev,nosuid 0 0
/dev/sda1 / ext2 defaults,noatime 0 1
/dev/sdb1 /home ext2 defaults,noatime,user_xattr 0 1
/dev/sdb2 /usr ext2 defaults,noatime 0 1
I'm (now) aware that mounting /usr as a separate partition is a bad idea and (having read the "Error when booting with the new initscripts" thread), I have told pacman to ignore updates to the initscripts package (until I figure out how best to work round or fix that issue).
Write umount /dev/sdb2 in konsole or unmount partition in gparted by right click on problematic partition and click unmount. Than proced.
If I type "umount /dev/sdb2" at the prompt, I get the following error:
umount: /usr: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
I tried "umount -l /dev/sdb2" to unmount when the device becomes free... but it never does.
I also booted into GParted, but there is no option to "unmount" /dev/sdb2. There is a "mount" option in the menu, but it is greyed out. If I open a terminal window from the GParted Live environment and type "sudo umount /dev/sdb2" I get the following message:
umount: /dev/sdb2: not mounted
Are you mounting the root drive with "ro" (read only) in fstab?
No (as shown above). I don't *think* I've messed anything up with fstab or any other config files -- everything was working perfectly till the netbook shutdown whilst pacman was running.
Offline
Did you try adding the fsck hook to /etc/mkinitcpio.conf ?
That looks promising. I have to go out now, but I'll look into that later. Judging by this post about mounting /usr on a separate partition (as I do), such hooks may be required.
Offline
By looking at your fstab, you have 2 drives in your netbook ? (sda and sdb)
And is there any particular reason why you chose ext2 ?
Last edited by DSpider (2012-03-24 16:20:19)
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
skunktrader wrote:Did you try adding the fsck hook to /etc/mkinitcpio.conf ?
That looks promising. I have to go out now, but I'll look into that later. Judging by this post about mounting /usr on a separate partition (as I do), such hooks may be required.
That's it indeed. If you're using /usr on a separate partition; there's a few additional requirements in the initramfs to make it work correctly. It's also documented on the wiki, here.
Burninate!
Offline
skunktrader wrote:Did you try adding the fsck hook to /etc/mkinitcpio.conf ?
That looks promising. I have to go out now, but I'll look into that later. Judging by this post about mounting /usr on a separate partition (as I do), such hooks may be required.
Actually the comments in /etc/mkinitcpio.conf contain this
## NOTE: If you have /usr on a separate partition, you MUST include the
# fsck and shutdown hooks.
Offline
By looking at your fstab, you have 2 drives in your netbook ? (sda and sdb)
That's right - it's an Asus EEE 901. It has two separate SSDs -- a ~3.7GiB one and (a slightly lower-performing) ~14.9GiB one. The space limitations are the reason that I have /usr mounted separately, whilst keeping the rest of / on the faster drive.
And is there any particular reason why you chose ext2 ?
I *think* I read something about it being a good choice because... the lack of journaling reduces the wear of the SSDs... or it uses less disk space... Maybe I should reconsider using something better...
Did you try adding the fsck hook to /etc/mkinitcpio.conf ?
That's it indeed. If you're using /usr on a separate partition; there's a few additional requirements in the initramfs to make it work correctly. It's also documented on the wiki, here.
Hmmm... I added the shutdown and fsck hooks to mkinitcpio.conf as suggested in the wiki, but it doesn't seem to have made any difference -- I get the same error every time I boot.
Offline
Hmmm... I added the shutdown and fsck hooks to mkinitcpio.conf as suggested in the wiki, but it doesn't seem to have made any difference -- I get the same error every time I boot.
And you remembered to run to run
# mkinitcpio -p linux
after editing?
Offline
esuhl wrote:. I tried booting from a GParted CD to check the filesystems for errors, but none were detected.
@lijpbasin
Out of curiousity, how Is your suggestion better than Gparted?
Sorry but I'm not familiar with Gparted, so I just posted what I would do if the same error occured, as a suggest
Offline
No (as shown above). I don't *think* I've messed anything up with fstab or any other config files -- everything was working perfectly till the netbook shutdown whilst pacman was running.
It seems the problem was closely related to the pacman process, assuming you had finished upgrading your system, rebooted, and the same problem appeared, then the upgrading must have brought something new into your system, a fix on mkinitcpio might be needed (as suggested by skunktrader).
If the problem was caused by the UNFINISHED pacman process, then finish (or undo) the upgrading process would fix it, since an uncleanly unmounted filesystem would have been repaired by fsck. Can you finish or undo the pacman process without booting the failed system? I don't know how to do it, but it's possible (like the arch installation process, and in my system pacman logs what's done in /var/log/pacman.log) and it's also risky!! I don't encourage you to do this, but if the problem happened to me, I will just backup my data and try.
Last edited by lijpbasin (2012-03-25 01:47:09)
Offline
And you remembered to run to run
# mkinitcpio -p linux
after editing?
Ahh... good point! I've booted from the ArchBang live CD, mounted /dev/sda1 (which contains all of /, except /usr and /home) to /mnt/myroot and run the command below:
[live@archbang ~]$ sudo mkinitcpio -c /mnt/myroot/etc/mkinitcpio.conf -g /mnt/myroot/boot/initramfs-linux.img
==> Starting build: 3.0-ARCH
-> Parsing hook: [base]
-> Parsing hook: [udev]
-> Parsing hook: [autodetect]
-> Parsing hook: [pata]
-> Parsing hook: [scsi]
-> Parsing hook: [sata]
-> Parsing hook: [filesystems]
-> Parsing hook: [usbinput]
==> ERROR: Hook 'shutdown' can not be found.
==> ERROR: Hook 'fsck' can not be found.
==> Generating module dependencies
==> Creating gzip initcpio image: /mnt/myroot/boot/initramfs-linux.img
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Image generation successful
Oh dear... I rebooted and now get this message:
Waiting 10 seconds for device /dev/sda1 ...
Root device '/dev/sda1' doesn't exist. Attempting to create it.
ERROR: Unable to determine major/minor number of root device '/dev/sda1'.
You are being dropped to a recovery shell
Type 'exit' to try to continue booting
sh: can't access tty: job control turned off
[ramfs /]#
Am I doing something really stupid?!
Last edited by esuhl (2012-03-25 01:52:26)
Offline
The hooks are in /usr/lib/initcpio, so maybe you should mount /usr too:
[karol@black ~]$ pacman -Ql mkinitcpio | grep -e shutdown -e fsck
mkinitcpio /usr/lib/initcpio/hooks/shutdown
mkinitcpio /usr/lib/initcpio/install/fsck
mkinitcpio /usr/lib/initcpio/install/shutdown
mkinitcpio /usr/lib/initcpio/shutdown
Last edited by karol (2012-03-25 02:04:42)
Offline
Perhaps you should run mkinitcpio from the target system, like in the aif scripts:
run_controlled mkinitcpio "chroot $var_TARGET_DIR /sbin/mkinitcpio -p linux" $TMP_MKINITCPIO_LOG "Rebuilding initcpio images ..."
The actual command is
chroot $var_TARGET_DIR /sbin/mkinitcpio -p linux
The target root filesystem / and /usr needs to be mounted first (eg. to /mnt and /mnt/usr, as a result, var_TARGET_DIR will be /mnt)
Last edited by lijpbasin (2012-03-25 02:22:53)
Offline
Argh, of course he should have chrooted ...
Offline
Perhaps you should run mkinitcpio from the target system, like in the aif scripts...
Argh, of course he should have chrooted ...
Thanks -- I booted into "maintenance mode" mounted the three drives (/, /home and /usr) as described in the chroot wiki page, and ran ran chroot /mnt/arch /sbin/mkinitcpio -p linux. The image was successfully created, but unfortunately it still fails to boot (with the same error as in my original post).
I've rebooted a few times now and noticed that, just before the error message appears, /dev/sdb2 is successfully fsck-ed:
:: Running Hook [shutdown]
:: performing fsck on '/dev/sda1'
rootfs: clean, 11027/246512 files, 477964/984576 blocks
:: performing fsck on '/dev/sdb2'
usr was not cleanly unmounted, check forced.
usr: 115811/458752 files (1.7% non-contiguous), 783161/1834496 blocks
INIT: version 2.88 booting
Yet later on, e2fsck fails causing the subsequent "FILESYSTEM CHECK FAILED" message:
/dev/sdb2 is mounted. e2fsck: Cannot continue, aborting.
Thanks for all your help so far! Any more ideas...?
Last edited by esuhl (2012-03-26 04:03:39)
Offline
Aha! I realised that my version of initscripts was probably outdated, so I chrooted again to do a pacman -Syu, and after the update my system boots normally!
Thanks again :-)
Offline