[Solved] Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

[Solved] Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 8:49 am

I had a few issues with installing LM18 at the same time Windows 10 was installed, so I booted into my UEFI USB (containing the .iso for LM 18 cinnamon) and decided that the only way to get past the issue that I was having (where LM18 couldn't install the grub menu for some reason), was to choose the 'clear disk and install Linux Mint 18' which would remove my windows installation on my SSD and replace it with LM18. This was fine and all as I was happy to partition my SSD at a later state to reinstall windows, but now after installing LM18 I am unable to access my 1TB HDD as it gives me this error

Code: Select all

Error mounting /dev/sda1 at /media/jackk/Data: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda1" "/media/jackk/Data"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda1': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
Which prevents me from accessing my data stored on the other drive. To get around this I was going to install windows on a partition of my SSD using Gparted to create a partition, but I'm assuming due to me running the OS from the SSD, that GParted prevents me from resizing the partitions of my SSD. I assumed the only way to fix this is to boot from my UEFI USB for Linux Mint 18 and partition it from there, as there wouldn't be any interaction with the SSD so that i should be able to partition it. But since the installation of LM18, when booting with the UEFI USB for LM18 plugged into my USB 2.0 socket of my PC and then pressing F11 to choose the boot option, The boot loader loads but as soon as I select the device that I wish to boot from, the whole boot menu essentially crashes (The time freezes in the bottom right and it doesn't let me move my cursor or use the keyboard after pressing enter on any of the boot options.

So after it did that I was sort of out of options so I thought that I would just install windows on my 1TB HDD and then partition it. However, upon inserting my windows UEFI Installer, when pressing F11 to load the boot options, I am greeted with a black screen and a movable white cursor with a small white 'B4' text shown at the bottom right of my display. I have waited on this menu for 2 hours and nothing happens. I'm essentially stuck with LM18 installed and my primary goal was to dual boot LM18 and Windows 10 on the same SSD.

If anyone can help me in either restoring access to my 1TB HDD on LM18 or help me boot from either my windows recovery USB or my UEFI LM18 .iso USB that'd be great! :)
Last edited by Jackfi5h on Tue Jun 19, 2018 8:03 pm, edited 1 time in total.

fabien85
Level 6
Level 6
Posts: 1343
Joined: Tue Mar 11, 2014 4:30 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by fabien85 » Tue Jun 19, 2018 10:15 am

What happens is that your windows had fast-startup activated, so basically it was not shutting down but hibernating. As a consequence, as the error message says, the partition is in an unsafe state. The solution normally would be to boot the installed windows, disable fast-startup and have a full shutdown. Now that you blew up your windows, I dont know what you can do. This is more a windows question, and I dont use it personally. Maybe a windows forum would give more useful insights. (note that this would have happened even if you didnt install linux, it's sufficient that you blew up windows while it was hibernating, so there are probably other people who encountered the problem)

What you may try is the suggestion of the error message : mount the partition read-only

Code: Select all

sudo mount -o ro /dev/sda1 /mnt
You will at least be able to access the files (as root) this way

Unless someone has a better solution, I would suggest to backup all your data and start again fresh.

User avatar
Pierre
Level 17
Level 17
Posts: 7289
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Pierre » Tue Jun 19, 2018 10:31 am

it is possible to delete that Delete hiberfil.sys file in Windows 10, both from a Windows Install media,
and from a Linux System media - in order to mount the NTFS as a R/O environment, that you can work with.

but, since the Windows 10 is erased, then it may pay to <temporarily> remove that 1Tb drive from your machine,
and the manually partition that SSD in order to install both Windows & LinuxMint back onto that SSD.

use the Gparted program in the LinuxMint media to pre-partition that SSD,
and then install Windows 10 first, bott into that system, to check that it's working okay,
then install the LinuxMint secondly onto that SSD, then boot into both systems, to check that they work okay.

finally, re-connect that 1Tb drive back into the machine, and now see if you can access it with the
newly installed Windows 10 system,
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 11:03 am

That would be possible however I am unable to shrink my SSD in GParted which I assume is because I am using the SSD whilst attempting to shrink it. Is there a way I can access my 1TB drive or install windows without having to uninstall LM18 first because i fear that if i uninstall LM18 and then try to boot my windows installer, I will be unable to boot from the bios to either operating system and will be left with a broken PC.
Last edited by Jackfi5h on Tue Jun 19, 2018 11:07 am, edited 1 time in total.

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 11:06 am

fabien85 wrote:
Tue Jun 19, 2018 10:15 am
What happens is that your windows had fast-startup activated, so basically it was not shutting down but hibernating. As a consequence, as the error message says, the partition is in an unsafe state. The solution normally would be to boot the installed windows, disable fast-startup and have a full shutdown. Now that you blew up your windows, I dont know what you can do. This is more a windows question, and I dont use it personally. Maybe a windows forum would give more useful insights. (note that this would have happened even if you didnt install linux, it's sufficient that you blew up windows while it was hibernating, so there are probably other people who encountered the problem)

What you may try is the suggestion of the error message : mount the partition read-only

Code: Select all

sudo mount -o ro /dev/sda1 /mnt
You will at least be able to access the files (as root) this way

Unless someone has a better solution, I would suggest to backup all your data and start again fresh.
I tried using that command but now when i try to access the data on my 1TB HDD, it returns the error 'unable to mount location' 'can't mount file'
Ultimately I just want to access this drive, I'm not too fussed about reinstalling windows, Is there a way I can access this drive without having to reinstall windows?

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 1:06 pm

If it were me... In order.

Re-install Windows 10 on your SSD after creating a GPT UEFI bootable USB with rufus ( yup you'll need a working copy of Windows ).
During the installation ( you can google all this ).. use the DISKPART clean ( do not use the clean all command on an SSD ) to, eh, clean the drive then use the Windows installer to partition the drive. Make one primary partition and install to it ( you can leave the remainder blank for now )

Once Windows is installed use rufus again to create a Linux GPT UEFI bootable USB.

Now shut down Windows from the command prompt with

Code: Select all

shutdown /s /f /t 0
Now install Linux to the other partition and use a logical partition table. Use the 'other' method and create a separate / /home /swap and point the (U)efi to the Windows boot.

Once installed shutdown, plug your problematic drive in and boot to Windows. Again shut down Windows from the command prompt with

Code: Select all

shutdown /s /f /t 0
Boot back to Linux and if all goes well your data drive should be listed under /home devices and will be accessible providing you followed the steps correctly. If you can't then there's a bigger problem that may require recovery tools.

Good luck :)

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 3:00 pm

I've just reinstalled windows and partitioned a section off during the installation process, now on windows, now my 1TB drive isn't even recognised by windows, what should I do to recover it?

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 4:19 pm

Jackfi5h wrote:
Tue Jun 19, 2018 3:00 pm
I've just reinstalled windows and partitioned a section off during the installation process, now on windows, now my 1TB drive isn't even recognised by windows, what should I do to recover it?
Did you try the command prompt shutdown with the drive plugged in? Then check?


Boot up a Linux live, open terminal and run

Code: Select all

blkid | grep -i ntfs
See if the drive is an active block device. Note its designation. For example..

Code: Select all

/dev/sda3: LABEL="Windows Files" UUID="38B453D8B453976A" TYPE="ntfs"
This drives designation is /dev/sda3

Now run

Code: Select all

df -h
You're looking for the amount of space used.. for example

Code: Select all

/dev/sda3               100G  2.5G   98G   3% /mnt/Windows
Naturally you don't want to see 100% free space.

If you can find the drives designation use the already provided command

Code: Select all

sudo mount -o ro /dev/sda1 ~/Desktop/Windows
replacing sda1 with the correct one

If it mounts to your desktop open the folder and find the file

Code: Select all

hiberfil.sys
In terminal type ( adding a space at the end )

Code: Select all

sudo rm -f
then drag that file into the terminal window and hit enter. sudo pass in a live version is 'mint ( i think ). Be careful you run this on your USB drive not your new W10 install.

Hopefully the hibernation file will be deleted and a re-boot into windows will give access.

Its possible your re-install of W10 is struggling with permissions on that hiberfil.sys file... not sure.

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 5:15 pm

I just tried the command promp shutdown with the drive plugged in, it wont let me access it from either windows or linux.

I tried what you said on the terminal, after entering

Code: Select all

blkid | grep -i ntfs
it returns

Code: Select all

/dev/sda1: LABEL="Data" UUID="D8FEC83AFEC81324" TYPE="ntfs" PARTUUID="dda9d109-02"
/dev/sdb1: LABEL="Recovery" UUID="7852D22E52D1F0BC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="5e0db078-30e8-4ab1-a614-4fa067c745c2"
/dev/sdb4: UUID="7C0CDCAE0CDC64A4" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="3d7ff2ac-0b01-41d2-ac7b-41d25b0e0291"
i know that sda1 is 1mb of data, sda2 is where the 930GB of info is stored, and sda3 is classified as unknown in GParted and is 1.7mb.

I then type

Code: Select all

df -h
which returns

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           790M  9.5M  780M   2% /run
/dev/sdc1       299G  1.8G  297G   1% /cdrom
/dev/loop0      1.8G  1.8G     0 100% /rofs
aufs            3.9G   16M  3.9G   1% /
tmpfs           3.9G  748K  3.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs           3.9G  4.0K  3.9G   1% /tmp
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           790M   24K  790M   1% /run/user/999
then i type

Code: Select all

sudo mount -o ro /dev/sda1 ~/Desktop/Windows
which returns

Code: Select all

ntfs-3g-mount: failed to access mountpoint /home/mint/Desktop/Windows: No such file or directory
so I don't know what to do from here :/

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 5:39 pm

Try it again after running

Code: Select all

mkdir ~/Desktop/Windows
my bad

Code: Select all

sudo mount -o ro /dev/sda1 ~/Desktop/Windows
you need to change the 1 to 2 sda2 if you think that's where it is... although blkid lists no ntfs drive, sda2 when searching for it.

What does

Code: Select all

blkid
return?
Last edited by Mattyboy on Tue Jun 19, 2018 5:45 pm, edited 1 time in total.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1832
Joined: Thu Jan 04, 2018 1:00 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Sir Charles » Tue Jun 19, 2018 5:44 pm

Just wondered if the device shouldn't be mounted without therooption, If the hibernation file is to be removed?
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 5:47 pm

Marziano wrote:
Tue Jun 19, 2018 5:44 pm
Just wondered if the device shouldn't be mounted without therooption, If the hibernation file is to be removed?
I'm wondering if they have accidentally formatted the drive to ext.... Windose can't see it right????

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 5:48 pm

Now I can access my 1 TB hard drive through Linux live,what should I do now to ensure that I can access it in windows aswell?

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 5:58 pm

Jackfi5h wrote:
Tue Jun 19, 2018 5:48 pm
Now I can access my 1 TB hard drive through Linux live,what should I do now to ensure that I can access it in windows aswell?
In terminal type followed by a space

Code: Select all

cd
drag the folder Windows from the desktop in the terminal and press enter.. then

Code: Select all

find . -iname "hiberfil.sys"
and press enter. Does it find the file?

if so you need to navigate the windows folder find it and delete it. ( not sure if the find command will work properly on a ntfs drive so don't worry if it doesn't shouldn't be to far down the tree ).

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 6:11 pm

When I drag the 'Data' disk from my desktop into the terminal after 'cd ' and press enter it says

Code: Select all

 bash: CD: x-nemo-desktop:///Data.volume: no such file or directory
and does the same when I drag it in from my computer. The drive is called 'WDC WD10EZEX-08M2NA0: Data' for see reason on Linux where as it should be called just 'Data'

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 6:12 pm

Mattyboy wrote:
Tue Jun 19, 2018 5:58 pm
Jackfi5h wrote:
Tue Jun 19, 2018 5:48 pm
Now I can access my 1 TB hard drive through Linux live,what should I do now to ensure that I can access it in windows aswell?
In terminal type followed by a space

Code: Select all

cd
drag the folder Windows from the desktop in the terminal and press enter.. then

Code: Select all

find . -iname "hiberfil.sys"
and press enter. Does it find the file?

if so you need to navigate the windows folder find it and delete it. ( not sure if the find command will work properly on a ntfs drive so don't worry if it doesn't shouldn't be to far down the tree ).
quoting to notify you of my previous response (ignore this post)

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 6:14 pm

OK, no worries. Can you click on the folder, see its contents and find the file that way?

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 6:19 pm

Mattyboy wrote:
Tue Jun 19, 2018 6:14 pm
OK, no worries. Can you click on the folder, see its contents and find the file that way?

It's got over 900GB worth of stuff on there, windows was never installed on there so i dont know where to look, i performed a search for the hiberfil.sys file but no results were found

Mattyboy
Level 6
Level 6
Posts: 1196
Joined: Thu Mar 26, 2015 2:17 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Mattyboy » Tue Jun 19, 2018 6:32 pm

Jackfi5h wrote:
Tue Jun 19, 2018 6:19 pm
Mattyboy wrote:
Tue Jun 19, 2018 6:14 pm
OK, no worries. Can you click on the folder, see its contents and find the file that way?

It's got over 900GB worth of stuff on there, windows was never installed on there so i dont know where to look, i performed a search for the hiberfil.sys file but no results were found
Its possible it could be in a hidden folder not sure and like I say not sure if the command works properly on ntfs.

If you can't find it not sure how I can help you further.... but you do know now how to access the folder so making a backup of your files will be possible...

Blame Windows for this cr*p

The only other thing off the top of my head there may be something silly going on with the old $RECYCLE.BIN and System Volume Information files, both are safe to delete.

Maybe hit a windows forum? Good luck.... oh and to avoid this in the future use, in Windows

Code: Select all

msconfig
\boot tab and turn all that fast boot, hibernation rubbish off.

Jackfi5h
Level 1
Level 1
Posts: 13
Joined: Mon Jun 18, 2018 1:03 pm

Re: Can't Boot to UEFI LM18 or Windows 10 Installation USB after installing LM18

Post by Jackfi5h » Tue Jun 19, 2018 8:03 pm

I managed so sort the issue by booting into windows, opening up disk management and right clicking on the corrupt drive and choosing 'import foreign drive' which recognised it by windows, thanks again for everyone's help! :)

Post Reply

Return to “Installation & Boot”