Murphy’s law

You have probably heard of Murphy’s law:  Whatever can go wrong will go wrong.

Yesterday was a Murphy day.

I wanted to install opensuse 13.2 on my laptop.  However, I also wanted to do some repartitioning.  I had been using a 100M “/boot” partition at the beginning of the hard drive, but that was smallish with the multi-version kernel support that has been part of opensuse since 13.2.

My plan was to shift partitions to the right, so that I could enlarge “/boot” to 500M.

The partitions where I had opensuse were not a problem.  The Windows partitions were the problem.

My plan was to boot the live rescue image from opensuse 13.2, and use the “gparted” that is on that disk.  I ran into problems with that, too.  But I discovered those problems, and a workaround, a few days earlier, so they were not part of my Murphy day.  I’ll post about that separately.

Backing up

I started with backups.  That was the part of my day before Murphy’s law kicked in.  The backups went fine.  I backed up Windows 7, using the Acronis True Image software.  And I backed up my linux home file system using “dar”.  I did not backup the opensuse 13.1 root file system, since I was planning to install 13.2 anyway.  My home file system does have a record of the configuration changes that I made, so that would be backed up.

Repartitioning

I started “gparted”.  I first deleted some linux partitions, including my encrypt LVM.  But I had backed up the important part of that.

I was left with two partitions for “/boot” (for different installs), and the windows partitions.

Next, I did a move of one of the Windows partitions (moving to the right).  I was warned by “gparted” that this might make the system unbootable and that I should have recovery plans.  For safety, I aborted that move and told “gparted” to just do the deletions that I had already scheduled.

Recovery disk woes

I next found the Windows recovery DVD that I had made when I first acquired that laptop computer.  And I proceeded to boot that as a test, to make sure that I would be able to recover booting.

The DVD booted.  But it booted to an error message:

Error 0x4001100200001012

I did a google search on that message.  Most of the related web pages were reporting that this error occurred when booting the recovery disk for a Dell Inspiron laptop purchased in 2009-2010.

My laptop fits that description.  It seems that Dell provided bad software for preparing that recovery disk.

Some of the messages indicated that one could instead use the original install media.  However, Dell was not providing install media during that time frame, and there was no way you could order it with your purchase (I had tried).

Perhaps the reinstall DVDs that I had created would work.  I decided not to test those at this stage.

Press on regardless

I decided to continue, in spite of this problem.  So I again booted the live rescue system and started “gparted” to continue with my plans.

I did modify the plans a little.  I already knew that I could make either the main Windows partition bootable (the active partition), or I could make the 14G recovery partition active.  So I decided to make the recovery partition active.  I then proceeded to move the main Windows partition but leave the recovery partition untouched.

I then rebooted.  Windows did boot, but it complained about boot problems and went into recovery mode.  After it was up and running, I forced a “chkdsk /F” on the “C:” drive.  It found errors and corrected them.  Then it booted without complaints.

Next, I went back to the live rescue boot and ran “gparted” again.  This time, I moved the recovery partition.  Then I set the active bit to boot the windows main partition.

I rebooted again.  Windows again reported boot problems and went into recovery mode.  I again ran a “chkdsk” to fix any problem.  And, after that, Windows seemed to be booting normally.

Preparing for 13.2

I was now almost ready to install opensuse 13.2.  I again booted the rescue media.  I resized the “/boot” partition, and ignored messages about possible booting problems.  Those warnings didn’t matter since I was going to do a new install.

Next, I created the encrypted LVM that I planned to use.  I first created a partition.  Then I configured it with LUKS encryption.  Then I used Yast partitioner to create an LVM using this encrypted partition.  I put in swap, home and root volumes.  I actually put in two root volumes — I called them “root1” and “root2”.  That to allow me to have a main install and a test install at the same time.

That all went reasonably well, and I followed up by installing 13.2 using the newly enlarged “/dev/sda1” as “/boot” with the remainer of the install inside that LVM.

Booting 13.2

I had previously used the Windows boot manager.  To use it, I would copy the opensuse boot sector (the first sector of “/dev/sda1”) to a file that Windows could use for booting it.

I tried that, but Windows did not like it.

I’m pretty sure that I could have fixed that by deleting the Windows boot manager entries, then recreating them with BCDEDIT.  However, for the present, I set the opensuse boot partition to be active, and booted Windows from the grub menu when that was needed.  I mainly use opensuse on that laptop anyway.

I later got everything back to working the way that it should work.  I’ll post separately on that.

Advertisements

About Neil Rickert

Retired mathematician and computer scientist who dabbles in cognitive science.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: