My Ubuntu Experience: I Broke It!
November 18, 2006 – 18:04 | LAMP, UbuntuSo after getting myself comfortable enough in the new Ubuntu home, I thought it was time to expand it - quite literally - I wanted to carve a new partition out of what was now one big 66GB NTFS partition, and to move /home to there so that it would be kept separately from the rest of the system.
So I backed up everything on drive E:, the big NTFS partition, fired up the disk manager in Windows XP (if I were recording a chess game, this would be where I'd put "?? very bad move"), deleted the logical drive and the extended partition holding it, created a new extended partition holding a FAT32 drive of 22GB, which I intended to be used for sharing files between the OS's. Everything looked fine, the new FAT32 drive automatically got assigned the same E: drive letter, so everything should keep working in Windows once I restored all the files. All cool. Rebooting into Ubuntu to create the ext3 partition for the new /home...
Grub stage 1.5
Grub
Error 17
OK... how did I manage to break Grub after having merely deleted a data partition in Windows? Reboot from the Ubuntu Live CD... start gparted... Well, apparently since I used the Windows disk manager to manipulate the partitions, the device nodes for the Linux partitions had not been preserved. The / used to be on /dev/hdb4, and the swap on /dev/hdb5. Now since /dev/hdb2 and /dev/hdb3 were deleted in Windows and the new partition and logic drive were named /dev/hdb2 and (surprise) /dev/hdb5, the new / and swap had become /dev/hdb3 and /dev/hdb4, respectively.
So, looked like grub time. First mount /dev/hdb3 onto the in-memory file system (remember I booted from Live CD), open up menu.lst and adjusted what used to be (hd0,3) to (hd0.2), and /dev/hdb4 to /devhdb3. Then enter grub command line:
-
find /boot/grub/stage1 <em>just to confirm - returned (hd0,2) as I expected</em>
-
root (hd0,2)
-
setup (hd0)
Reboot. Yep, back in the game. This time redid the partitioning with gparted, and then moved /home over successfully.

One Response to “My Ubuntu Experience: I Broke It!”
Hey Jing - I don't really care about ubuntu - but was trying to get in touch with you and the manifoldronin address was long good. Send me a note...
By Dan Cox on Nov 25, 2006