Ubuntu 14.04 doesn't boot after moving to different partitions

Tags:

Answer: 1

26 hours ago

My original setup:

SSD:

/dev/sdc1: Windows System Reserve
/dev/sdc2: Windows
/dev/sdc3: /root

HDD1:

/dev/sda1: NTFS Storage

HDD2:

/dev/sdb2: Windows Documents
/dev/sdb1: Extended
  /dev/sdb5: /usr/local
  /dev/sdb6: /home

HDD2 is only 320GB, and I quickly ran out of room for my /home partition. So I decided to move both /usr/local and /home to HDD1, since it is a 1TB hard drive. So the changes result in:

SSD:

/dev/sdc1: Windows System Reserve
/dev/sdc2: Windows
/dev/sdc3: /root

HDD1:

/dev/sda1: NTFS Storage
/dev/sda2: Extended
  /dev/sda5: /usr/local
  /dev/sda6: /home

HDD2:

/dev/sdb2: Windows Documents
/dev/sdb1: Extended
  /dev/sdb5: old /usr/local
  /dev/sdb6: old /home

I left the original /usr/local and /home partitions on HDD2 just in case something went wrong during the copy over to HDD1. I also updated my /etc/fstab folder to reflect the changes to /home and /usr/local.

sudo blkid:

/dev/loop0: TYPE="squashfs" 
/dev/sr1: LABEL="Ubuntu 14.04.1 LTS amd64" TYPE="iso9660" 
/dev/sda1: LABEL="Storage" UUID="D83C84BC3C8496E2" TYPE="ntfs" 
/dev/sda5: UUID="9017071b-73f2-48af-b205-c1231139a414" TYPE="ext4" 
/dev/sda6: UUID="fc258128-7f32-4bbb-8b14-9c3d3da05619" TYPE="ext4" 
/dev/sdb2: LABEL="Windows Documents" UUID="024A89D14A89C1C1" TYPE="ntfs" 
/dev/sdb5: UUID="79e4b0e6-31a2-4ed6-93a5-69d2ac61af43" TYPE="ext4" 
/dev/sdb6: UUID="ea51e374-70a2-418f-a015-d7b2d92820c7" TYPE="ext4" 
/dev/sdc1: LABEL="System Reserved" UUID="B44443B344437760" TYPE="ntfs" 
/dev/sdc2: LABEL="Windows" UUID="6AE6459BE6456901" TYPE="ntfs" 
/dev/sdc3: UUID="8b617ecd-c7a4-4677-b44c-d87233a6602e" TYPE="ext4"

/etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=8b617ecd-c7a4-4677-b44c-d87233a6602e /               ext4    errors=remount-ro 0       1
UUID=fc258128-7f32-4bbb-8b14-9c3d3da05619 /home           ext4    defaults        0       2
UUID=9017071b-73f2-48af-b205-c1231139a414 /usr/local      ext4    defaults        0       2

After the changes, Ubuntu will not boot properly; it sits at a black screen with a blinking underscore. I tried reinstalling GRUB:

sudo mount /dev/sdc3 /mnt
sudo grub-install --root-directory=/mnt /dev/sdc

but this did not solve the problem. For reference, I made all of the changes using GParted from a Live CD boot. What needs to be done so that Ubuntu will boot once more?

Added by: Llewellyn Herman

Answer: 2

10 hours ago

Restore the system to its original condition.

And then move the partitions with the correct procedure.

In a normal session:

You must mount the partition on a temporary directory name to copy files to it the original /home.

Open a terminal (CtrlAltT). Run it:

You create the temporary directory

sudo -i 
mkdir /media/hometemp

Mount partition

mount /dev/sda6 /media/hometemp

To copy:

cd /home
cp -ax . /media/hometemp

This last line is the only one used to clone, attention "." the end.

Now mount the new /home previous rename the /home partition and remove the old.

cd /
mv /home /home.old
mkdir /home
umount /dev/sda6
mount /dev/sda6 /home

Now you have to find the UUID of the partition and edit the /etc/fstab file to mount the partition at startup.

blkid /dev/sda6
nano /etc/fstab

And you add these lines at the end with that reported blkid UUID.

# /dev/sda6 was /home
UUID=fc258128-7f32-4bbb-8b14-9c3d3da05619 /home ext4 defaults 0 2

Ctrl + O, save file. Ctrl + X, close nano.

Restarting have everything working exactly the same, but with other partitions.

Once everything is working well, delete the /home.old and /media/hometemp

sudo -i
rm /home.old
rm /media/hometemp

And now

You must mount the partition on a temporary directory name to copy files to it the original /usr/local.

Open a terminal (CtrlAltT). Run it:

You create the temporary directory

sudo -i 
mkdir /media/usrtemp

Mount partition

mount /dev/sda5 /media/usrtemp

To copy:

cd /usr/local
cp -ax . /media/usrtemp

This last line is the only one used to clone, attention "." the end.

Now mount the new /usr/local previous rename the /usr/local partition and remove the old.

cd /
mv /usr/local /usr/local.old
mkdir /usr/local
umount /dev/sda5
mount /dev/sda5 /usr/local

Now you have to find the UUID of the partition and edit the /etc/fstab file to mount the partition at startup.

blkid /dev/sda5
nano /etc/fstab

And you add these lines at the end with that reported blkid UUID.

# /dev/sda5 was /usr/local
UUID=9017071b-73f2-48af-b205-c1231139a414 /usr/local ext4 defaults 0 2

Ctrl + O, save file. Ctrl + X, close nano.

Restarting have everything working exactly the same, but with other partitions.

Once everything is working well, delete the /usr/local.old and /media/usrtemp

sudo -i
rm /usr/local.old
rm /media/usrtemp
Added by: Robin Renner

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9