Using GParted to fix an Ubuntu Install

So, I needed to fix up a Ubuntu install that went wacko. I guess a couple of partitions weren’t deleted and left, and a new partition layout was created beside the empty ones. Let’s just say, some space needed to be reclaimed.

1. I downloaed GParted, and fixed up my partitions so that I deleted the empty useless ones, and increased the root partition.

Once this was completed, I needed to update Grub to change the drive to boot off.

2. So I Mounted /dev/sda5 to /mnt/sda5 and then proceeded to mount /proc and /dev so that I could access the partitions in my chroot enviroment. Then I ran Grub and viola.

mkdir /mnt/sda5
mount /dev/sda5 /mnt/sda5
mount -t proc /proc /mnt/sda5/proc
mount -o bind /dev /mnt/sda5/dev
chroot /mnt/sda5
grub

Then within grub type the following.

find /boot/grub/stage1

Which will then return something along the lines of “(hd0,4)”. Then you will need to enter this value in Grub.

root(hd0,4)
setup(hd0)

Done!


Did you like this article?


0 Shares:
You May Also Like

Hard times for hard drives: US may ban popular imports

This could be a damaging blow to quite a few companies within the United States. For instance, take a dedicated server hosting company that relies on one of many hardware vendors like Dell or HP (Hewlett-Packard). Its possible that said vendor will have stock pile of hard drives. Put lets put this into perspective. If you read the entire article you will see a similar situation that ended with Broadcom filing a complaint against Qualcomm. The International Trade Commission banned Qualcomm from shipping any new chips and hardware into the United Sates, and any chips that were already being shipped to the United States could continue. The ban lasted for 45 days, until an appeal by Qualcomm was successful and then the ban was lifted.
Read More