Here's my problem. I'd like to reinstall Ubuntu. My laptop is an old HP Compaq nx7400. The optical drive went wrong, it can't read discs. I would use a USB port instead but the laptop won't boot from it. (It won't boot even if I set USB the first in the boot order in BIOS settings. Also on start up after pressing F9 to choose boot device USB won't appear in the list, only optical disk, netbook disk and network if I enable it.)

I wanted to resize the boot partiton to make space for the installation but I couldn't do that because it seems that the whole HDD is the boot partiton so it can't be unmounted using Gparted.

My partition system is the following:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e6661

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   486318079   243158016   83  Linux
/dev/sda2       486320126   488396799     1038337    5  Extended
/dev/sda5       486320128   488396799     1038336   82  Linux swap / Solaris

So how can I make a new partition to be able to install a "new" Ubuntu and get rid of the old one. Or any better solution for this problem? I hope it's not a catch 22...


You shouldn't have to repartition the disk just to reinstall Ubuntu. It seems like you just have one partition for Ubuntu, and one Swap partition in an extended partition, which is a standard partitioning scheme for an Ubuntu installation.

You could boot the Ubuntu iso from the Grub menu. When you boot from the iso file, you will be able to press a key upon boot to get to the Live boot menu. Add the toram kernel option.

You will be able to choose whether you want to save programs or Home folder data or just erase everything and reinstall.

And importantly, make reliable backup before executing the procedure! Though nothing should go wrong if you ensure that you know what you're doing.

  • Unfortunately OP has no working optical drive and can't boot from USB. In this situation I don't think there is a way, that doesn't require to copy $HOME to an external drive. – David Foerster Oct 15 '13 at 12:45
  • Thank you David! Could you elaborate on the steps? – Attila Oct 15 '13 at 12:52
  • 1
    Follow the linked instructions for booting the iso image off the hard drive. Add the "toram" option to the kernel arguments and it will load the whole system into ram so the hd can be unmounted. – psusi Oct 15 '13 at 13:51
  • 1
    Suggest backing up $HOME to an external drive first, though. After you boot with your current OS, can you plug in a USB drive and see it mount? If so, then copy the contents of $HOME and everything below it, for safety's sake. – K7AAY Oct 15 '13 at 16:07

There are 2 parts to this:

Open a terminal and run ls /boot If boot is full of old kernels you can go remove happy on them, I recommend keeping the original, the latest and the one before latest. the lowest number is normally the shipping kernel, the highest number will be the latest.

To grow boot you first need to shrink another partition so you have free space. I would suggest using the gparted tool on the live cd to do this. First decrease the size of/ or /home depending on your setup. Then increase the size of boot.

  • 1
    The question is how to reduce the size of the root partition, and he said he can't boot from cd. – psusi Oct 15 '13 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.