LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How Windows 10 Fall Creators Update b0rked my Slackware partitions and how I could recover (https://www.linuxquestions.org/questions/slackware-14/how-windows-10-fall-creators-update-b0rked-my-slackware-partitions-and-how-i-could-recover-4175616003/)

sombragris 10-19-2017 08:47 PM

How Windows 10 Fall Creators Update b0rked my Slackware partitions and how I could recover
 
Today my upgrade to Windows 10 Fall Creators Update was complete and it wasn't without surprises, so I thought I could share some of the things I learned with my fellow Slackers. This writeup began as a Slashdot comment but now I added more specific details.

I use -current 64-bit) and Windows 10 in a dual boot setting managed by GRUB. Both OSes are in partitions of a single drive (/dev/sda).

My Linux partitions are just two, since space is limited and this is not a server machine: a /home partition, and a root partition with everything else. Let's say that root was /dev/sda6 and /home was /dev/sda7.

I thought of this setup as highly stable. It started as a dual boot between Slackware and Windows 8.1, just when I bought the laptop. Subsequently, it managed to survive upgrades to Windows 10 (original version), Anniversary Update and Creators Update without any hassle, so I thought this time would be equally painless. I was wrong.

This Windows upgrade totally b0rked my previous partitioning scheme. Upon the first reboot I got the dreaded message "GRUB error: Unkown filesystem" and a generic GRUB rescue prompt.

That was scary.

I googled and thanks to these sites I was able to recover the GRUB menu.

First order of business was to type 'ls' in order to see which partitions were seen by GRUB. Fortunately, the number of partitions appeared to be the same.

Now, the sites I visited suggested to enter at the prompt these commands:

Code:

set root=(hd0,6)
set prefix=(hd0,6)/boot/grub
insmod normal
normal

After some time trying various partitions, when I set root and prefix to (hd0,gpt4) (fictitious values), I struck gold and I was able to boot the kernel.

After that I was on my own. All that Ubuntu-centric advice just assumed that the system booted correctly, and then I just had to 'sudo' a reinstall of GRUB. But that was not the case for my system.

Surprise! e2fsck complained of a bad magic number on /dev/sda6. Then I was dropped to an emergency prompt. I was able to see everything on my root partition but it was mounted read-only.

And then it came something telling: e2fsck said that /dev/sda6 was a NTFS partition labeled 'Recovery'.

It turned out, that this Windows upgrade somehow changed the partitioning scheme. So, if my root partition previously was, say /dev/sda6, now it was /dev/sda4. But GRUB and the whole system kept looking for root still in /dev/sda6, which now was something else.

After realizing what was going on, I had to restore things to an usable state.

For that, I did something quite simple. Booted into Windows, where, thanks to ext2fsd, my Linux partitions were accessible. There, edited /boot/grub/grub.cfg so that the main option would boot into (hd0,gpt4) or /dev/sda4, and also edited /etc/fstab accordingly. Saved the changes, booted, and lo! Linux now booted normally to a login prompt! In this case, a SDDM prompt at runlevel 4.

So, went back to the console prompt, logged in as root. Ran grub-install and grub-mkconfig to ensure that GRUB would boot normally now. Rebooted... and now GRUB ran normally. Great!

Once again I booted, and Linux ran normally all the way through the SDDM prompt in runlevel 4.

I entered my username, password, just to be returned to the same SDDM prompt, again and again. What was going on?

I went to the console prompt, logged in with my username/password, and next, login told me that there was no home directory available and it was using / (root) as home directory.

Of course! I had /dev/sda7 as /home; but again, now this was not recognized.

So this is what I did: went into runlevel 3. Logged in as root. In xwmconfig, I selected a very simple window manager (IceWM). Ran GParted and there it was, my home partition was now /dev/sda5. Then, I edited /etc/fstab again to reflect the change. Rebooted, and you guessed it right: now I had a /home directory again.

EDIT: Another "gift" (?) from this upgrade. It turned out that it also enabled Fast Shutdown again. That means that I was unable to get read-write access to the NTFS partitions from Linux; they were read-only. I had to disable Fast Shutdown again. :doh:

That was scary, but thankfully Slackware enables you to solve such snafus with minimum damage. Thanks to Pat, the Slackware Crew and every fellow Slacker that at some time guided me with patience for enabling us to recover from such pickles ;)

Hope this is useful to someone who is exposed to similar troubles. Thanks!

hitest 10-19-2017 09:04 PM

I've stopped dual booting Windows 10 and Slackware for this reason. Microsoft doesn't care about other OSs living on your HD; it creates new partitions for each of these yearly updates. I run Slackware on 5 units and Debian on one laptop. I run Windows 10 all by itself on another laptop.

willysr 10-19-2017 09:13 PM

Good thing i only need to run bcedit to restore Grub2 and all is back to normal again with Slackware64-current and Windows 10 1709 Fall Creators Update. I have it documented on my blog just in case i need to do it again on the next update

Skaendo 10-19-2017 09:19 PM

I have to give you guys props, I ran Windows 10 for about an hour then I wiped my HD and reinstalled Windows 7.

aragorn2101 10-20-2017 03:24 AM

Many thanks to sombragris for this thread. Lots of people who are dual booting Win10 and any Linux distro are going to be in this trouble when they update.

I personally stopped using Windows since 4 years. I still have the Win10 on my laptop in some corner. I never update it and never connect to internet with it. I just have it there because of games and also because I technically bought it together with the laptop.

I think it is very dangerous that an OS will change UUID's on a disk without even asking for confirmation.

For me too, Slackware saved the day many many times. :hattip:

GazL 10-20-2017 06:57 AM

I had the 1709 update come down yesterday and it borked my slackware boot but not because of partition renumbering.

Somehow the efi partition's fat was corrupted and my slackware vmlinuz was one of the files that got clobbered. elilo was starting but couldn't find the image. I had to boot from my install-usb, fsck and clean up the mess.

I don't know whether the update caused the corruption, or whether it was just a victim of existing structural damage that had happened previously (though I don't know how as I'm very particular about correctly unmounting /boot/efi after a kernel update), but luckily I had backup copies of everything that got mangled.

Anyway, if you're expecting this update to come down sometime, it might be worth doing a fsck on your efi partition just to make sure it's healthy.


Oh, and the update took the best part of 2 hours! How the hell do they manage to be so slow? I could install slackware around 8 times over in that time.

Gerard Lally 10-20-2017 08:29 AM

Quote:

Originally Posted by Skaendo (Post 5771837)
I have to give you guys props, I ran Windows 10 for about an hour then I wiped my HD and reinstalled Windows 7.

I'll give Microsoft credit for one thing though -- their Windows 8.1 and 10 phones are heaps better than 90% of the Android junk out there.

As for the PC, I was lucky enough to get a student licence for Windows Server 2012, so I no longer have to put up with the crap Microsoft put their home users through.

hitest 10-20-2017 08:40 AM

Quote:

Originally Posted by Gerard Lally (Post 5771969)
I'll give Microsoft credit for one thing though -- their Windows 8.1 and 10 phones are heaps better than 90% of the Android junk out there.

I'm not a huge fan of Microsoft, but, they have made an effort to beef up security on Windows. I resent the fact that my Droid phone is insecure at the moment. Maybe my next phone will be a Pixel or an iPhone.

Gerard Lally 10-20-2017 09:17 AM

Quote:

Originally Posted by hitest (Post 5771971)
I'm not a huge fan of Microsoft, but, they have made an effort to beef up security on Windows. I resent the fact that my Droid phone is insecure at the moment. Maybe my next phone will be a Pixel or an iPhone.

I bought a string of Android phones to find one that implemented accessibility properly for my elderly mother. For all the talk about how great Android is, every single one of these phones failed spectacularly. That's the kind of arrogance you get when Google insists on employing under-35s. Even the Blackberry Z30 I got failed the accessibility test. Then, at my wit's end, I tried a Lumia 640. Bingo. First time. Accessibility worked properly. Fonts scaled up everywhere, including on tiles. Far superior contrast even without High Contrast turned on. Phone GUI as it should be. Secure phone, with only the apps you need. I've ordered Lumias now for myself and the brothers, and my Android junk will be flogged on ebay next week to the highest bidder. Good riddance.

upnort 10-20-2017 10:50 AM

This is good info sombragris.

Recently I read about this problem elsewhere (reddit?).

The recommended solution is use UUIDs in fstab and GRUB when dual booting with Windows 10.

Apparently the Windows 10 installer tries to create a recovery partition in case the update fails. My understanding is if any sufficient space is found on the disk then the recovery partition is created. The installer is supposed to install the recovery files on the operating system partition if other methods fail.

Using UUIDs will not prevent creating the recovery partition but avoids partition order problems.

For anybody wanting to delay the forced updates (delay, not stop), configure the Windows 10 system to delay feature updates for 180 days. Another 60 day delay is possible by selecting the Pause feature updates option. Change these options in Group Policy Management Editor -> Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Windows Update -> Defer Upgrades and Updates.

I ran into problems getting Windows 10 to update to the 1703 release. Probably because I run Windows 10 from within a VM using raw disk access and Windows 10 is prevented from modifying the disk outside its own assigned partitions. At this time my Windows 10 system is not yet running 1703 or 1709.

Quote:

I have it documented on my blog just in case i need to do it again on the next update
You moved your blog to blogspot? Now visitors cannot read the blog unless they enable JavaScript.

bassmadrigal 10-20-2017 01:44 PM

Quote:

Originally Posted by hitest (Post 5771971)
I'm not a huge fan of Microsoft, but, they have made an effort to beef up security on Windows. I resent the fact that my Droid phone is insecure at the moment. Maybe my next phone will be a Pixel or an iPhone.

I have always been a fan of the Google "made" phones, ever since my Nexus One. I've owned almost all of them. But I hardly ever stick with the stock OS and tend to jump to custom ROMs pretty quick. They tend to be really quick in patching these things, sometimes even before Google patches them in AOSP.

Quote:

Originally Posted by upnort (Post 5772014)
For anybody wanting to delay the forced updates (delay, not stop), configure the Windows 10 system to delay feature updates for 180 days. Another 60 day delay is possible by selecting the Pause feature updates option. Change these options in Group Policy Management Editor -> Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Windows Update -> Defer Upgrades and Updates.

I believe this is only available if you're running the Professional or higher versions. Home version, which most computers come with, doesn't provide the Group Policy Editor. There have been reports of installing it using, what I assume, is an extracted version from Pro, but I didn't have any luck on it on my laptop. Luckily, my university offers the education edition for free, and that is pretty much a rebranded Enterprise edition. I just threw in the new key and it worked right away.

willysr 10-20-2017 07:37 PM

Quote:

Originally Posted by upnort (Post 5772014)
You moved your blog to blogspot? Now visitors cannot read the blog unless they enable JavaScript.

My blog was always in BlogSpot since the beginning :)

upnort 10-20-2017 11:21 PM

Quote:

I believe this is only available if you're running the Professional or higher versions.
I think I read that somewhere too. :)

Quote:

My blog was always in BlogSpot since the beginning
Ah, my mistake. Anyway -- the new theme requires JS. Can't view the contents with Reader View or disabling styles. JS only. :(

Philip Lacroix 10-22-2017 05:42 AM

Thanks a lot for sharing your notes, @sombragris, @willysr and @GazL.

I maintain a machine that came with Windows 8 preinstalled, then went through the Windows 10 upgrade right under my nose. So I resized its main partition, created some new ones and installed a friendly Slackware environment on them, setting up an EFI dual boot using elilo. Then I taught the owner to use Slackware: who said that complete newbies cannot learn Slackware and like it? Windows 10 is still there (just in case) but I have disabled its use of all network devices, and now I'm very glad I did. In my jurisdiction Windows won't deserve Internet access, unless ferociously limited by an external filter, and that only in very special cases.

CTM 10-25-2017 07:47 PM

Quote:

Originally Posted by Gerard Lally (Post 5771969)
I'll give Microsoft credit for one thing though -- their Windows 8.1 and 10 phones are heaps better than 90% of the Android junk out there.

Which, naturally, is why they're promptly killing off their smartphone business. (They also sold the feature phone business they bought from Nokia to a private equity firm last year.)


All times are GMT -5. The time now is 11:09 PM.