Announcement

Collapse
No announcement yet.

Resizing the /boot partition

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Resizing the /boot partition

    Hello Folks,

    I'm about to get into some repartitioning work, which is going to be a bit hairy for me, so I'd appreciate if somebody could look over my intentions and warn me if I'm likely to foul anything up.

    Long story short: I originally installed kubuntu as a trial, and wasn't very careful or sensible about how I organised my partitions. It's now the only OS I'm using (I've left openSuse behind) and I need to tidy up things a little.

    I originally made a boot partition of 32 Mb, which I'm finding isn't enough when it comes to kernel upgrades etc, so I want to enlarge it. I'm intending to give it a go using QtParted. Kubuntu lives on a 40 Gb disk, which is organised as follows:

    Code:
    Start		End		 Partition	Size		 Type		Mount point
    0.06 MB	23.71 GB	/dev/hda5	23.71 GB	 ext3		/usr2
    23.71 GB	38.01 GB	/dev/hda3	6.84 GB	 ext3		/
    38.01 GB	38.26 GB	/dev/hda2	251.02 MB	swap	
    38.26 GB	38.29 GB	/dev/hda1	31.38 MB	 ext3		/boot
    So, my /boot partition is hda1, but actually sits at the end of the disk, and is preceded by a swap partition. I don't need the swap anymore, so I planned to delete it and make the boot partition fill up the 38.01-38.29 GB space.

    To do this I'd have to (backup) and delete the existing /boot partition, because it's not possible move the start of an ext3 partition, and then make a new /boot partition in the free space.

    My first worry is: will the new partition still be hda1 ? Will Grub boot from the new partition without any further meddling? (I don't really know how Grub works - I guess it's written in the MBR that the Grub menu/kernel images are on hda1, but I wouldn't be very surprised if what I'm doing will muck something up.)

    Secondly, will I then simply have no hda2 partition? That doesn't bother me, but it seems odd. Are there any hazards associated with this?

    Any help or guidelines appreciated!
    Many thanks,
    DonB

    #2
    Re: Resizing the /boot partition

    I'd use GParted, but probably that's more a matter of taste. Also, you don't actually need a /boot partition, but I guess if you're intending to avoid a re-installation, then you're stuck with it.

    I would say, just keep a small swap, and slide everything to the right, letting /boot be enlarged a bit. If you want to preserve the current boot menu and installation, you can't delete any partition. In other words, /usr2 needs to shrink by however much /boot needs to stretch. "/" and swap can stay the same size, but slide right to allow /boot to enlarge. That's the simple approach. If you chose to re-install the OS, then you could delete the /boot partition entirely, and keep the other three, letting one of them get a bit larger.

    Although the "word on the street" is that swap is no longer essential in new Linux filesystems, I'm guessing you have older hardware there, given the 40G hard drive and existing swap space. I wouldn't test the theory of life without swap on that platform, unless you've got lots of RAM.

    Also, FYI, a substantial swap space is required if you ever wish to use Suspend-to-RAM or Suspend-to-Disk.

    Comment


      #3
      Re: Resizing the /boot partition

      Thanks for the reply! I would definitely like to avoid re-installation, so I prefer just to tweak things if possible. I agree with you about not working without a swap space, but there's space on my other hard disk for this. My main concern was that I'd end up having to poke around with the boot process, which I'd rather just leave alone if I can.

      With /boot being at the end of the disk and the start position of the partition being fixed, I don't see how I can enlarge it without deleting and remaking the partition. Perhaps the best solution is if I just shrink the swap partition and redefine the boot partition. If they remain hda2 and hda1 respectively, then hopefully the boot process won't see any difference. Is this likely to work?

      Thanks again.

      Comment


        #4
        Re: Resizing the /boot partition

        Yep, you can squeeze that swap space way down if you're going to set a swap partition on another drive, so that will work. But don't delete it.

        I'm sticking with my recommendation that you avoid deleting any existing partition. Doing that would cause re-numbering of your partitions, which would break /boot/grub/menu.lst and /etc/fstab, at least, and you wouldn't be able to boot until you fixed them both.

        Comment


          #5
          Re: Resizing the /boot partition

          Excellent. I'll give that a shot. Thanks a lot for the advice!

          Comment


            #6
            Re: Resizing the /boot partition

            a list of good freebie partition software as bellow may help you to resize partition and you may try each one of it for it is totally free


            http://www.partition-tool.com


            http://partedmagic.com/


            http://partitionlogic.org.uk/


            http://www.cutepm.com/


            http://www.ranish.com/part/

            Comment

            Working...
            X