James Revillini

Say 'no' to styrofoam.

Month: January 2010

[SOLVED] “fatal: Could not read bundle ‘/path/to/your/file.ext’.” during git clone

$ git clone /path/to/repo/*
Initialized empty Git repository in /path/to/file.ext/.git/
error: ‘/path/to/repo/file.ext’ does not look like a v2 bundle file
fatal: Could not read bundle ‘/path/to/repo/file.ext’.

Fortunately, it happened after I’d just done a serious site-wide rename of a bunch of files, and I decided to try cleaning the repository.

This solved everything:
$ git gc /path/to/repo

[SOLVED] Ubuntu Startup-manager killed my windows partition entry in GRUB2

The issue

I had a scary thing happen the other day: the windows xp entry on GRUB2’s boot screen went missing!  This happened shortly after the windows partition had been encrypted with a McAfee product.  Ubuntu didn’t remove the entry itself; it was actually only after I tried to make a change to the startup configuration using a program called Startup-manager (you may have it in System > Administration) that the windows entry was removed. It was bad enough that Ubuntu could no longer see any files on the windows partition (mounted as /windows), but now I had no way to boot into windows to retrieve files.

The fix

And of course, I had no freaking clue how to manually modify GRUB2’s startup screen.  But after some digging, I figured out how to do it.  This worked for me in Ubuntu 9.10 Karmic Koala.  Hopefully it will save someone else’s day:

  1. Figure out where windows is.  Is it /dev/sda1 (very likely)? /dev/sda2?  To do this:
    1. System > Administration > Disk Utility
    2. Click each partition and find the one which matches the size of your bootable windows parition and which, when selected, shows a partition type of HPFS/NTFS. Example:
    3. Note the location of the partition; it is the last line of the descriptors of the partition. In the screenshot above, mine is /dev/sda1.
  2. Press ALT+F2
  3. enter the command gksudo gedit /etc/grub.d/40_custom
  4. below the comments in this file, and below any other entries which may have been added by one thing or another, add the following:
    [sourcecode language=”plain”][/sourcecode][/sourcecode]

    echo “Adding Windows XP on {LOCATION OF YOUR WINDOWS PARTITION}” >&2
    cat << EOF
    menuentry “Windows XP Professional (on {LOCATION OF YOUR WINDOWS PARTITION})” {
    insmod ntfs
    drivemap -s (hd0) ${root}
    chainloader +1

  5. Replace {LOCATION OF YOUR WINDOWS PARTITION} in the code above with the location of your windows partition.
  6. Replace {JUST THE LAST NUMBER OF THE LOCATION OF YOUR WINDOWS PARTITION} with the last number of the location of your windows partition. E.g. /dev/sda1 would be 1.Your file will now look something like this:
  7. Save the file and close the editor.
  8. Press ALT + F2.
  9. enter the command gksudo grub-mkconfig

That should be it.  When you reboot, you should see your windows as a bootable option again.


The moral of this tale is to avoid startup-manager for grub configuration changes unless you’ve not got funky partitions. Keep in mind that future versions of start-up manager may fix this issue; the version i’m using is 1.9.12-ubuntu1.


I would not have been able to troubleshoot this issue if it weren’t for the following gracious contributions to the global knowledgebase.

© 2017 James Revillini

Theme by Anders NorenUp ↑