Personal Blogs
A friend of mine wanted my help on installing Gnu/Linux on one of his new laptops. He had already installed Windows 7 on it and tried installing Ubuntu on it which had consistently failed to boot in normal or rescue mode.
After doing some research on the Internet, I found that people have faced similar problems using similar hardware. I tried a fresh installation of Ubuntu 14.04 (the latest) and it showed the same behaviour. That is no activity on screen after loading initrd. The same behavior was seen even for Archlinux.
All this time I was trying to boot using the BIOS method. Some post on the Internet have mentioned correct working of Ubuntu provided one use EFI method. UEFI method requires EFI partition which is a DOS FAT32 and requires GPT formatted disk.
It was clear then that disk would be reformatted. All I had to do was to boot the machine using EFI method and then Ubuntu installation would be taking care of the rest. Eventually it did but by removing entire data from disk without giving me any warning. And it stupidly took all the share of the disk by keeping 500MB for the EFI partition and the remaining 1 TB for itself.
Live Ubuntu CD again came for the rescue.
I had to fix it by first resizing the EXT4 using resize2fs and then fixing the partition table using the parted to match the partition size with that of file systems. To know file system size, used dump2fs to find block count and multiplied it by block size. Then created a few more partitions for swap and etc using parted; fdisk doesn’t work on GPT disks (why?)
Formatted the newly created swap partition using mkswap and fixed the /etc/fstab file with its correct UUID and rebooted the machine to see the Ubuntu 14.04 up and running.
Happy hacking.