Does deleting a partition below Ubuntu mess up grub?
Robert Heller
heller at deepsoft.com
Sun Oct 12 13:53:18 UTC 2014
At Sun, 12 Oct 2014 14:35:41 +0100 "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> On 12 October 2014 14:27, William Scott Lockwood III <scott at guppylog.com> wrote:
> >
> > On Oct 12, 2014 8:16 AM, "Colin Law" <clanlaw at gmail.com> wrote:
> >>
> >
> >> I want to delete a partition (sda4) which is below the Ubuntu
> >> partition (sda5). I seem to remember when I did something similar
> >> some time ago that it messed up grub and the machine would not boot,
> >> due to the fact that the sda numbers changed when the partition was
> >> deleted. Is that still the case, and if so is there a procedure for
> >> deleting sda4 that will not cause such problems? This is Ubuntu
> >> 12.04.
> >>
> >> Cheers
> >>
> >> Colin
> >>
> >> --
> >
> > Mount by UUID rather than device name. Also, there are tools that help you
> > do this in a sane manor. Any of the gui partition managers should do,this
> > just fine.
>
> Thanks, but I am not sure if that is the problem. Looking in
> /boot/grub/grub.cfg it contains direct references to sda numbers, so
> my memory was that grub looked for the wrong partition. Perhaps my
> memory is wrong, however, and it was mounting the drives that caused
> the problem due to having sda numbers in fstab.
You may have both issues. Grub does use hard partition numbers to find the
kernel and initrd files. There is also the root= kernel parameter, which
*might* have a direct references to a sda number. This should be changed to
either use UUID= or LABEL=. And yes, you should make sure /etc/fstab is using
UUIDs or LABELs.
Also: *often* (but not always) partition #4 is the entended partition,
containing (logical) partitions 5 and up. Deleting partition #4 *in that case*
also deletes partitions 5 and up. Make sure this is not what you are doing!
>
> What tools are you referring to? I was planning on using gparted.
>
> Colin
>
> >
> >
> > --
> > ubuntu-users mailing list
> > ubuntu-users at lists.ubuntu.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list