LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Windows improper shutdown, fedora won't start (https://www.linuxquestions.org/questions/linux-general-1/windows-improper-shutdown-fedora-wont-start-4175518950/)

NeXuS_2006 09-15-2014 08:27 PM

Windows improper shutdown, fedora won't start
 
Hi all!

Running Fedora 20 and Win 7 together on a laptop. Had windows running, shut the lid (I don't know if it went on standby, hibernate, or just screen-off), and forgot about it. Battery died, so I go to boot fedora, and kept getting weird errors, it wouldn't boot. Basically, fedora would take me to emergency mode, let me log in as root, and suggested a few commands to review logs. The logs just showed everything starting then stopping, looked like runlevel 1 maybe, I'm not sure. It wouldn't let me set runlevel 4 or 5, it would try and then just go back to emergency mode.

I booted windows, which showed a recovery prompt, and then shut it down properly, then linux now boots correctly. Win7 is a primary partition, and fedora is in an extended partition along with a linux swap, if that makes any difference.

Here is my question: what does windows have to do with any linux partitions (AFAIK it can't even read them), and why does it block booting? Also, is there a way to work around this from the linux command line, and not have to boot back to win (I don't care about corrupting the windows install or losing data over there in this case)?

goumba 09-16-2014 07:42 AM

Can you give us any more info from the logs, maybe cut & paste?

Is the Windows partition listed at all in /etc/fstab?

NeXuS_2006 09-16-2014 09:28 AM

Quote:

Originally Posted by goumba (Post 5238999)
Can you give us any more info from the logs, maybe cut & paste?

Is the Windows partition listed at all in /etc/fstab?

Here is the fstab (only 2), and I think this must be the relevant part of the log. Prior to this snippet its startup as usual, afterword its a bunch of xxx service stopping and then end.

Code:

UUID=eaf94cd5-b991-4472-a421-80aed0daa1c5 /                      ext4    defaults        1 1
UUID=4088915088914576 /run/media/nexus/OS ntfs defaults 0 0

Code:

Sep 15 12:25:45 localhost systemd: Started Login and scanning of iSCSI devices.
Sep 15 12:25:45 localhost systemd: Mounting /run/media/nexus/OS...
Sep 15 12:25:45 localhost systemd: bus_connection_get_unix_fd failed Bad file descriptor
Sep 15 12:25:45 localhost systemd: Failed to get caller's security context on: Bad file descriptor
Sep 15 12:25:45 localhost systemd: Stopped LVM2 metadata daemon.
Sep 15 12:25:45 localhost systemd: Stopped Emergency Shell.
Sep 15 12:25:45 localhost systemd: Stopped Load/Save Screen Backlight Brightness of backlight:intel_backlight.
Sep 15 12:25:45 localhost systemd: Stopped Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Sep 15 12:25:46 localhost mount: Windows is hibernated, refused to mount.
Sep 15 12:25:46 localhost mount: Failed to mount '/dev/sda3': Operation not permitted
Sep 15 12:25:46 localhost mount: The NTFS partition is in an unsafe state. Please resume and shutdown
Sep 15 12:25:46 localhost mount: Windows fully (no hibernation or fast restarting), or mount the volume
Sep 15 12:25:46 localhost mount: read-only with the 'ro' mount option.
Sep 15 12:25:46 localhost systemd: run-media-nexus-OS.mount mount process exited, code=exited status=14
Sep 15 12:25:46 localhost systemd: Failed to mount /run/media/nexus/OS.
Sep 15 12:25:46 localhost systemd: Dependency failed for Local File Systems.
Sep 15 12:25:46 localhost systemd: Dependency failed for Mark the need to relabel after reboot.
Sep 15 12:25:46 localhost systemd:
Sep 15 12:25:46 localhost systemd: Dependency failed for Relabel all filesystems, if necessary.
Sep 15 12:25:46 localhost systemd:
Sep 15 12:25:46 localhost systemd:
Sep 15 12:25:46 localhost systemd: Triggering OnFailure= dependencies of local-fs.target.
Sep 15 12:25:46 localhost systemd: Unit run-media-nexus-OS.mount entered failed state.


schneidz 09-16-2014 10:33 AM

i'm curious, i would comment out anything ntfs related in /etc/fstab and retry the experiment.

(my nexus-7 mounts as mtp ?).

i've had problems with thumbdrives/sdcards not being plugged in and fedora would thow a fit while booting. not sure why fedora is so sensitive with removable drives.

yancek 09-16-2014 11:07 AM

Quote:

The NTFS partition is in an unsafe state. Please resume and shutdown
Sep 15 12:25:46 localhost mount: Windows fully (no hibernation or fast restarting), or mount the volume
This is pretty common with windows 8 as it uses hibernation by default which often results in the message above on a Linux system, definitely not limited/specific to Fedora. Your fstab entry shows you are trying to mount the ntfs partition on boot and it is seen as being in an unsafe state due to the hibernation, not being shutdown properly and battery failure. You had to boot windows in recovery mode so there was definitely a problem there. Do they both boot now?

schneidz 09-16-2014 11:18 AM

fyi:
http://www.linuxquestions.org/questi...9/#post5228954

suicidaleggroll 09-16-2014 11:47 AM

Two things:

1) Windows was improperly shut down, this put the ntfs partition into an "unsafe" state. Linux will not mount ntfs partitions in an unsafe state.

2) The ntfs mount was placed in /etc/fstab without any "noauto" or "nofail" mount options. This tells the Linux OS that the ntfs mount is required for proper operation and it should not continue the boot process without it.

Because of #1, Linux refused to mount the ntfs partition. Because of #2, the fact that it couldn't mount the partition means that the boot process was halted so that you could fix the problem.

Booting back into Windows repaired the ntfs partition, which then allowed Linux to mount it and boot normally. Alternatively you could have added "noauto" or "nofail" to the mount options for the ntfs partition to tell Linux to continue booting normally if that partition is unmountable for whatever reason.

schneidz 09-16-2014 09:04 PM

is there any reason why your nexus is ntfs formatted ? or is it that your windows partition is named nexus.

goumba 09-17-2014 03:54 AM

Based on his user name, it's a name he uses for his PC as well (based on /run/media/nexus... debian mounts my removable filesystems under /media/<username>).

This behaviour of systemd... I get what TobiSGD means in the linked thread about it meaning the system is not booted into an inconsistent state... however I'm guessing anaconda (fedora's installer) added it to /etc/fstab, in which case knowing it was an NTFS partition should have added the necessary flags.

Kirsty_jawn 09-21-2014 05:02 AM

В какой вуз пост&
 
Куда можно заочно поступить?

NeXuS_2006 09-29-2014 02:10 PM

Ok thanks everyone, I was in another country for a while, thus the delay.

That makes sense, I'll update the fstab accordingly to prevent this in the future.


All times are GMT -5. The time now is 05:13 AM.