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) 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! |
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.
|
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
|
I have to give you guys props, I ran Windows 10 for about an hour then I wiped my HD and reinstalled Windows 7.
|
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: |
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. |
Quote:
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. |
Quote:
|
Quote:
|
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:
|
Quote:
Quote:
|
Quote:
|
Quote:
Quote:
|
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. |
Quote:
|
All times are GMT -5. The time now is 11:09 PM. |