Saturday, June 14, 2008

Multi boot system - partition reorg

I normally have 5 / 6 OS on my system on different partitions. And I keep removing / replacing them. This also involves deleting / adding new / moving partitions. everything was fine till one day when I ran testdisk (to fix an issue that arose due to the way vista handles partitions) that changed the partition numbers of my partition. Now I was not able to load the OS with changed partition numbers.

I had heard about GUID is sort of disk signature which would have hanged and causing the issue. Searched net with GUID, but could not find any helpful links (later I realized that this is referred to UUID in linux/ubuntu parlance).

I tried to manually edit the partition number during the grub menu & boot. Now the problem became even more stranger! though I set the root as partition I wanted to boot, it was booting another OS! I was going crazy!!! I thought if I could only capture those messages that scroll on the screen while it boots and I found few links that make use of serial terminal:

http://www.techanswerguy.com/2007/09/capturing-boot-messages-in-linux-via.html

Since I was not having another comp & also I was on laptop without serial port, this is ruled out. now the only option for me was to verify my grub menu entry thoroughly and this time I found the silly mistake I was making:

title Linux Mint, kernel 2.6.22-14-generic (recovery mode) (on /dev/sda13)
root (hd0,12)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda14 ro single

though I was changing the partition number in "root" part, I missed changing the partition number on "kernel" line. This was causing lot of trouble rendering most of my OSes un usable. But I still was having issues with ubuntu. This is because, ubuntu uses UUID and not the partition nubers (Probably this causd me to search for GUID earlier & miss the obvious partition number for mint OS). A search with UUID & Ubuntu revealed how to fix this. This needs updating the UUID at 3 places, menu.lst, fstab & some resume file (will paste the link later its on the other OS!). Also I founf a command, vol_id that gives you the UUID of a partition. I have not tried this yet. Will edit this post once I try this out.

This may help those who has a multi boot system and has to reorganize partitions for adding / removing new OS.

No comments: