Today I logged into Windows on my dual-boot Ubuntu 16.04 / Windows 10 laptop, which I don't do very often, and Windows installed a heap of updates.
Seemed very fine to me until I restarted and tried to start my faithful Ubuntu - and to my dismay got stranded in a primitive text-only screen with a few lines of text that ended in:
grub>
So, as had happened before, Windows again borked my boot loader. Sigh. (And some profanities which I won't repeat here).
I already had repaired my boot loader in similar circumstances before, using Boot-Repair, but couldn't find my Boot-Repair Live USB so decided to boot into a Ubuntu 16.04 live USB and start Boot-Repair from there (following the "2nd option: install Boot-Repair in Ubuntu" on the Boot-Repair wiki page).
I did "Recommended repair" in Boot-Repair, but at the end I got a message that it had not worked due to "Locked-ESP detected", and I was recommended to create a /boot/EFI partition at the start of the disc, using eg. gParted.
I launched gParted and saw that there was already a /boot/efi partition on my hard drive, but I also saw little key icons next to the names of all the partitions - which rung a bell with the "Locked-ESP" message.
So I right-clicked the partitions one by one in gParted and selected "unmount", which made the key icons disappear.
I then started boot-repair again, with the Recommended Repair option, and lo and behold, it fixed my system neatly.
I do feel that it should be explained on the Boot-Repair wiki page that the hard drive has to be unmounted before attempting to run Boot-Repair with the 2nd option (installing it in Ubuntu"), but for this one edit to the wiki I can't find the courage to go through the process of getting the right account and permissions on the Wiki. So hopefully someone that already has those, will do the job...
Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts
Saturday, December 10, 2016
Windows 10 update broke my Ubuntu linux and boot-repair didn't work [SOLVED]
Thursday, January 1, 2015
Shrink volume in Windows 7
In order to install Ubuntu on a new HP Probook 430 G2, with Windows 7 pre-installed, I wanted to shrink the C: volume in order to make more space for Ubuntu.
So I did the usual:
- in Start Menu search box, I typed "partition"
- click on "Create and format hard disk partitions"
- I right-clicked on the C: volume and chose "Shrink volume"
- in the following window I could shrink the C: volume to about half its size. But the problem was that I wanted to shrink my partition more than what was allowed.
To cut short to the solution, here's how I unblocked the remaining space:
In short:
If you appreciated this article for some reason or another, please share it (see the buttons below), and, of course, don't forget to Flattr! (Why?)
So I did the usual:
- in Start Menu search box, I typed "partition"
- click on "Create and format hard disk partitions"
- I right-clicked on the C: volume and chose "Shrink volume"
- in the following window I could shrink the C: volume to about half its size. But the problem was that I wanted to shrink my partition more than what was allowed.
To cut short to the solution, here's how I unblocked the remaining space:
In short:
- I disabled virtual memory
- I disabled file indexing and deleted the index files
- I also deleted shadow copies
- Restart, shrink partition as desired
- As far as desired, re-enable virtual memory and/or file indexing and make a restore point.
In long and detailed:
- I disabled virtual memory (first steps are copied from Microsoft site):
- Open System by clicking the Start button Picture of the Start button, right-clicking Computer, and then clicking Properties.
- In the left pane, click Advanced system settings. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
- On the Advanced tab, under Performance, click Settings.
- Click the Advanced tab, and then, under Virtual memory, click Change.
- Clear the Automatically manage paging file size for all drives check box.
- Click on "No paging file" (further down in the same window)
- Restart
- Note: It might be necessary to disable also the creation of Recovery Points, which in my case wasn't active to begin with, so I can't help you here.
- Upon restart, I still had the same problem. So I tried manually shrinking the volume using Diskpart (to find info on this, start the partition manager as explained at the beginning of this article, right-click on C: volume, choose "Shrink partition", and in the following popup window click the link that says "See Shrink a basic volume" which brings you to a help page with all explanations).
- Diskpart didn't succeed in shrinking the volume more than the graphical interface did, of course, but it did write an event in the system logs. As explained in Windows help about shrinking volumes, in the Application logs you can search for event 259 which details the file that blocks further shrinking. So click on Start Menu, type "log" in the search box and choose "view event logs". There, under "Event viewer" -> "Summary page events" in the section "Information", look for event ID 259 and, at the right (in the "actions" pane, click on "view all instances of this event). Click on the last one, chronologically, and there you should see the file name of the file blocking the further shrinking.
- So here I found out that the indexing service was involved.
- So I disabled the windows indexing and deleted the index files:
- To disable the service:
- in Start Menu, type "services" and click above on "services"
- Look for "Windows Search", right-click on it, stop the service and and put "startup service" to "disabled" so on restart it doesn't start again.
- Then I deleted the index files:
- first find out where they are
- in Start Menu type "regedit" in the search box and click on "regedit" above.
- find HK_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows Search and click on it. To the right, next to DataDirectory, you'll find the right directory (in my case %ProgramData%\Microsoft\Search\Data).
- Then delete them as administrator: I opened a Windows Explorer window as administrator (type "explorer" in Start menu search field, right-click on Windows Explorer and select "Run as administrator"). Then I typed in the directory box on top "%ProgramData%\Microsoft\" (without the quotation marks), right-clicked on the "Search" subdirectory and chose "delete".
- I deleted shadow copies:
- I opened a command prompt as administrator (Start Menu -> All Programs -> Accesories -> Command prompt -> right-click and select: "run as administrator")
- Typde "vssadmin list shadows" in command prompt
- Typed "wmic" in command prompt and pressed enter. Then typed "shadowcopy delete" and at the prompt, selected "'Y" for every shadow copy.
- Then I restarted and was able to shrink the partition to the desired size.
If you appreciated this article for some reason or another, please share it (see the buttons below), and, of course, don't forget to Flattr! (Why?)
Labels:
dual boot,
partition,
shrink volume,
ubuntu,
windows
Subscribe to:
Posts (Atom)