Author: Lisa

Recreating Grub Bootloader After the Windows Install Wipes It

Setting up the dual-boot Windows/Fedora system was straight-forward on my laptop. I installed Windows, then installed Linux and grub mkconfig found Windows and included it in the menu. Scott already had Fedora, and we needed to repair his Windows installation. Which, of course, blew away grub. Easy enough to get back, provided you’ve got a Live USB installation from which to boot.

Boot the Live media and use fdisk to find the Linux partition (in our installations, /boot is contained within the root partition).

[root@fedora02 ~]# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xd847fbc2

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 83 Linux
/dev/sda2 1026048 20971519 19945472 9.5G 8e Linux LVM

Mount that partition somewhere:

mkdir /mnt/mycomputer
mount /dev/sda2 /mnt/mycomputer

Add bind mounts so /dev and /proc are in there

mount –bind /dev /mnt/mycomputer/dev
mount –bind /proc /mnt/mycomputer/proc

Chroot yourself into the mount point

chroot /mnt/mycomputer

Now you can reinstall grub. You don’t want the partition (e.g. /dev/sda2) but the disk. The following commands install the grub2 bootloader and reboot.

grub2-install /dev/sda

If you forget to pay attention on boot and thus inadvertently end up in the default operating system (<G>), edit /etc/default/grub and increase “GRUB_TIMEOUT=5”. Build the grub config — this should identify your Windows partition and include it in the menu

grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot again, and you’ll be able to select between Windows and Linux.

Using grub rescue to boot machine and repair MBR

Using grub rescue to boot machine and repair MBR

Use “ls” to find your partition list:
(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

Check the content of each to find your Linux partition:
ls (hd0,msdos3)/
ls (hd0,msdos2)/
ls (hd0,msdos1)/

You want the one with the /boot folder. In our case, this is (hd0,msdos3). The following commands will boot your Linux OS.

set prefix=(hd0,msdos3)/boot/grub2
set root=(hd0,msdos3)
insmod normal

<root password for maintenance>

Use “df” or “mount” to figure out which disk holds the Linux partition. In our case, it is /dev/sdb. You don’t want the partition (e.g. /dev/sdb2) but the disk. The following commands install the grub2 bootloader and build a config file.

grub2-install /dev/sdb
grub2-mkconfig -o /boot/grub2/grub.cfg

Embroidery Thread Storage

Two years ago, I picked up a bunch of ArtBin 9101AB boxes for 9$ each in a pre-Christmas sale. They stack nicely, and I use them to store zippers, fold over elastic, sewing feet, beads … all sorts of craft supplies. I’m trying to use them to store my embroidery thread. I have a lot — a whole rainbow of colors, plus another box with grays, browns, and ‘special’ thread (metallic, glow in the dark). But the little bobbin cards aren’t quite big enough. It’s still an improvement over random skeins of thread, and unused portions can be wrapped around the bobbin card to ensure you know exactly which light blue that bit is. Hopefully I’ll come up with something that keeps these things upright … other than stuffing the box so there’s nowhere for them to move 😀

Linux – Finding “Missing” Disk Space

You can have ‘stuff’ in a folder, mount a partition to that folder, and have disk space used for which you cannot account. Rather than randomly umounting partitions to see if there’s anything in the mount point folder, you can bind mount root to another location and check the disk utilization on the new mount.


[root@fedora123 ~]# mount -o bind / /mnt/fakeout/
[root@fedora123 ~]# du -sh `ls /mnt/fakeout | grep -v mnt`
0 bin
0 boot
280K ca
8.0K cacert.pem
4.0K careq.pem
0 certs
0 crl
0 dev
44M etc
52K home
0 index.txt
0 lib
0 lib64
0 media
0 newcerts
0 openhab
724K opt
4.0K private
0 proc
847M root
0 run
0 sbin
227M srv
0 sys
4.0K tmp
3.0G usr
4.0K var
[root@fedora123 ~]# umount fakeout

GPO Changes Not Reflected On Computer

A year or three ago, we had set up a group policy to display logon information in the Windows welcome screen — last logon time, information about any bad passwords since your last successful logon. It’s nice, but you are unable to log in if the information is unavailable. So we disabled the setting (just clearing a GPO setting doesn’t always remove the config from anywhere it’s already set … you’ve got to change to the desired setting). Aaaaand … one server still shows the logon info. Or, more accurately, fails to display it and prevents the domain account from logging on. Luckily it’s a member computer and we can just log in with local accounts.

I thought about just editing the local computer policy (which would have priority anyway) to disable the logon info, but the computer policy could not be opened. It threw a strange access denied error. I could edit the local user policy. Just not the computer policy.

It seems that the local computer policy got corrupted. After deleting registry.pol from c:\Windows\System32\GroupPolicy\Machine … I am able to modify the local computer security policy. GPO settings from the domain are also applied as expected. WooHoo! I can sign in using domain IDs again!

New Embroidery Project

I finally got larger blank t-shirts for Anya. Anya and I will spend an hour or two in the evening relaxing and embroidering the shirts. About nine shirt-sized images fit on a 8.5″x11″ sheet of dissolving, printable transfer paper. I’ll create a single image and arrange all of the embroidery patterns to fill the page (needs to be black lines on a white background as the printout is fuzzy, and color or gray-scale makes a big mess). Cut out one image, stick it onto a shirt, add a hoop (I love Darice’s spring tension hoops!), and go.

I taught Anya to back-stitching along lines last year, and I taught her how to make a satin stitch today. She’s working on a cute little owl. I’m working on this hand embroidery pattern from Urban Threads. Should be finished tomorrow too!

Sparse Checkout With Git

I’ve encountered a few repositories that are huge. Unwieldy huge, and stuffed with files that aren’t relevant to what I need. The straight-forward solution is to use multiple repositories — that’s what I do at work with my code samples. There’s a different repo for each language because the PHP developers really don’t care what the C# code looks like. The Java developers don’t need a copy of the Python code. But there are advantages to having a single repository that may preclude you from taking the simple solution. Git sub-modules are an interesting approach — combining multiple repositories into a single functional unit. I’m going to play around with sub-modules some more. But that’s a pretty big change to an existing repo. And, if you participate in open source projects, it may not be your decision anyway.

There’s another option for selectively cloning when you’re working with a large repo — an option that doesn’t require any changes to the repository. An end user can perform a sparse checkout — essentially use a filter like .gitignore to select or deselect certain files/folders from being pulled into the local working directory. The file is named sparse-checkout and is located in .git\info — unlike a .gitignore file which indicates what shouldn’t get included, sparse-checking controls what is included (if you want an entire repo except one folder, use !path/to/folder/**)

The sparse-checkout file used to get just the core components of Scott’s OpenHAB helper libraries plus the OpenWeatherMap community scripts is:


To use sparse checkout, set the core.sparseCheckout config value to true. You can add sparse checkout to a repo you’ve already cloned and use

git read-tree -mu HEAD

to “clean up” unwanted files. Or you can set up sparse checkout before you clone the repo

D:\tmp>mkdir ljrtest

D:\tmp>cd ljrtest

D:\tmp\ljrtest>git init
Initialized empty Git repository in D:/tmp/ljrtest/.git/

D:\tmp\ljrtest>git remote add origin

D:\tmp\ljrtest>git config core.sparseCheckout true

D:\tmp\ljrtest>copy ..\sparse-checkout .git\info\
1 file(s) copied.

D:\tmp\ljrtest>git pull origin master
remote: Enumerating objects: 3591, done.
remote: Total 3591 (delta 0), reused 0 (delta 0), pack-reused 3591R ), 7.00 MiB | 6.95 MiB/s
Receiving objects: 100% (3591/3591), 9.26 MiB | 7.22 MiB/s, done.
Resolving deltas: 100% (1786/1786), done.
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master

Volume in drive D is DATA
Volume Serial Number is D8E9-3B61

Directory of D:\tmp\ljrtest

07/03/2019 09:07 AM <DIR> .
07/03/2019 09:07 AM <DIR> ..
07/03/2019 09:07 AM <DIR> .github
07/03/2019 09:07 AM <DIR> Community
07/03/2019 09:07 AM <DIR> Core
0 File(s) 0 bytes
5 Dir(s) 386,515,042,304 bytes free

D:\tmp\ljrtest>dir .\Community
Volume in drive D is DATA
Volume Serial Number is D8E9-3B61

Directory of D:\tmp\ljrtest\Community

07/03/2019 09:07 AM <DIR> .
07/03/2019 09:07 AM <DIR> ..
07/03/2019 09:07 AM <DIR> OpenWeatherMap
0 File(s) 0 bytes
3 Dir(s) 386,515,042,304 bytes free

Using sparse checkout, no one else has to do anything. Configure your client to get the files you want, and you’re set.


Did you know … Windstream’s Teams usage statistics through 2Q2019

Windstream will replace Skype for Business with Teams by the end of 3Q2019. That’s only three months away, so I wanted to provide another update on our progress toward this goal. There are just under 14,000 IM-enabled accounts (this includes both employees and contractors). About 3,800 accounts (about 27% of Windstream’s IM users) have been upgraded to Teams Only. Two third of the company should have already received communication letting them know when their accounts will be upgraded. The remainder of the company will see messages throughout July and August. If you are ready to upgrade before your scheduled date (visit Stream for more info on what to expect when your account is upgraded), use <redacted> to upgrade your account.

Teams accounts for around 80% of Windstream’s IM activity. This is a significant change from the same time last year when under 10% of our IM traffic was in Teams.

From 20 May onward, there have been more people logging into Teams than Skype each day. About 80% of our IM enabled accounts have logged into Teams at least once; and over 8,000 people, about 60% of our IM enabled accounts, are logging into Teams each day. If you aren’t one of these people who are already using Teams, check it out.

In the past year, the number of chat messages sent in Teams has increased 20-fold – from under 10,000 messages a day in July 2018 to around 200,000 messages in June 2019. We’ve seen a reduction in the number of instant messages sent through Skype – from 100,000 daily messages last year to under 50,000 daily messages this month. Some messages that would have been sent in Skype are now being sent in Teams, but the number of IMs sent across the company has doubled in the past year too – from 110,000 messages each weekday this time last year to 220,000 messages each weekday today.

How are people accessing Teams? Teams is predominantly accessed with the Windows desktop app. About 80% of the people using Teams each day use the Windows desktop app (OSX users haven’t been left out, but there are only 20 people using the Mac desktop app). About 5% of the people using Teams each day use the web client. Most of the desktop features are available in the web app, and you can use the web app from a computer that isn’t managed by Windstream. While screen sharing isn’t yet available in private chats, screen sharing is available in meetings when using the Chrome browser. We’ve seen mobile app usage increase from about 10% at the beginning of the year to 15% today, and the mobile app is used by about 30% of Teams users over weekends. The Teams mobile app makes it easy to check in at work while you’re working away from the office, and setting ‘quiet time’ keeps work from intruding on you time.

At the beginning of the year, mobile app usage was split about 50/50 between Android and iOS. By the end of 1Q2019, the percent of Android users dropped to 40%; and, at the end of 2Q2019, iOS accounts for 75% of the mobile app usage.

The Teams: Teams is more than just a replacement for Skype. In addition to private chats, Teams offers collaboration spaces too. The Teams spaces include conversations, shared files, tabs – even a SharePoint Online site. More than 7,000 messages a day are posted in Teams channel conversations.

There are over 3,000 Teams groups – over 1,000 of which were created this quarter. You can search public Teams groups at <redacted>. Microsoft is currently testing a setting which will allow private Teams to be searchable too. Follow our Stream space – we’ll post information on how to mark your private Team as searchable when the feature becomes available.

Fifteen percent of these groups are public – meaning anyone can join the group. Public teams are a great way to solicit end-user feedback, organize local events, provide mentorship, or even discuss “fun stuff”. You can currently search public Teams groups at <redacted>. Microsoft is currently testing a setting which will allow specially-configured private Teams to be searchable too. Follow our Stream space – we’ll post information on how to mark your private Team as searchable when the feature becomes available.

82% of our Teams have between 2 and 25 members. For anyone wondering what the point of a Team with one person is … Teams doesn’t let you send messages to yourself, but you can send messages to a Team that is just you. You can add tabs to provide quick access to your frequently used sites, use connectors to make external data readily available (as an example, I use my Teams space as an RSS aggregator), and play around with Teams functionality without annoying your colleagues.

59% of our Teams have had conversation activity in the past week. Most of the Teams with no conversation activity in the past year have been archived. Archived Teams keep information accessible – visible and searchable – without risking individuals starting conversations in a Teams space that is no longer watched by members.

If you want to see more information about Windstream’s Teams usage, current Teams usage information is available at <redacted>.