I have a number of partitions on a single hard drive that were installed in my first attempts to get Kubuntu up and running. There are multiples because it took me a couple of times before I figured out how to size the partition properly. As a result, my system looks like the table below, but I am now only using partitions /dev/sda2 and /dev/sda5. I don't use, nor do I intend to use the other partitions, so they are just taking up space on the hd.
Device Boot Start End Blocks Id System
/dev/sda1 2235 2482 1992060 83 Linux
/dev/sda2 1 1848 14844028+ 83 Linux
/dev/sda3 2115 2234 963900 5 Extended
/dev/sda4 * 1849 2114 2136645 83 Linux
/dev/sda5 2136 2234 795186 82 Linux swap / Solaris
/dev/sda6 2115 2135 168619+ 82 Linux swap / Solaris
Here's my questions (and I read much of the Grub doc and think I am describing this correctly):
It looks like Grub is installed on /dev/sda4, because that's where my PC boots from. When my boot menu first comes up, it's using the /boot/grub/menu.lst file on that partition. There is also a /boot/grub/menu.lst on /dev/sda2, so I guess that means that Grub is installed on /sda2 as well, but it's not booting from there. To fix this, do I need to re-install Grub on /sda2 with:
grub> root (hd0,1)
grub> setup (hd0)
grub> quit
Or do I need to do something like: sudo grub-install --root-directory=/boot /dev/sda2 ?
If I can get it to boot properly from /dev/sda2, then I can (hopefully) format the unused partitions and recover the diskspace using GParted. Am I on the right track?
Device Boot Start End Blocks Id System
/dev/sda1 2235 2482 1992060 83 Linux
/dev/sda2 1 1848 14844028+ 83 Linux
/dev/sda3 2115 2234 963900 5 Extended
/dev/sda4 * 1849 2114 2136645 83 Linux
/dev/sda5 2136 2234 795186 82 Linux swap / Solaris
/dev/sda6 2115 2135 168619+ 82 Linux swap / Solaris
Here's my questions (and I read much of the Grub doc and think I am describing this correctly):
It looks like Grub is installed on /dev/sda4, because that's where my PC boots from. When my boot menu first comes up, it's using the /boot/grub/menu.lst file on that partition. There is also a /boot/grub/menu.lst on /dev/sda2, so I guess that means that Grub is installed on /sda2 as well, but it's not booting from there. To fix this, do I need to re-install Grub on /sda2 with:
grub> root (hd0,1)
grub> setup (hd0)
grub> quit
Or do I need to do something like: sudo grub-install --root-directory=/boot /dev/sda2 ?
If I can get it to boot properly from /dev/sda2, then I can (hopefully) format the unused partitions and recover the diskspace using GParted. Am I on the right track?
Comment