Archive

Posts Tagged ‘boot’

Dual Booting Ubuntu 13.04 and Windows 8 on a Lenovo Y400 IdeaPad

July 27th, 2013 1 comment

With the third edition of The Linux Experiment already underway, I decided to get my new laptop set up with an Ubuntu partition to work with over the next few months. A little while back, I purchased this laptop with intent to use it as a gaming rig. It shipped with Windows 8, which was a serious pain in the ass to get used to. Now that I’ve dealt with that and have Steam and Origin set up on the Windows partition, it’s time to make this my primary machine and start taking advantage of the power under its hood by dual-booting an Ubuntu partition for development and experiment work.

I started my adventure by downloading an ISO of the latest release of Ubuntu – at the time of this writing, that’s 13.04. Because my new laptop has UEFI instead of BIOS, I made sure to grab the x64 version of the distribution.

Aside: If you’re using NoScript while browsing Ubuntu’s website, you’ll want to keep an eye on the address bar while navigating through the download steps. In my case, the screen that asks you to donate to the project redirected me to a different version of the ISO until I enabled JavaScript.

After using Ubuntu’s Startup Disk Creator to create a bootable USB stick, I started my first adventure – figuring out how to get the IdeaPad to boot from USB. A bit of quick googling told me that the trick was to alternately tap F10 and F12 during the boot sequence. This brought up a boot menu that allowed me to select the USB stick.

Once Ubuntu had booted off of the USB stick, I opened up GParted and went about making some space for my new operating system. The process was straightforward – I selected the largest existing partition (it also helped that it was labelled WINDOWS_OS), and split it in half. My only mistake in this process was to choose to put the new partition in front of the existing partition on the drive. Because of this, GParted had to copy all of the data on the Windows partition to a new physical location on the hard drive, a process that took about three hours.

The final partitioning scheme with my new Linux partition highlighted

The final partitioning scheme with my new Linux partition highlighted

With my hard drive appropriately partitioned, it was time to install the operating system. The modern Ubuntu installer pretty much takes care of everything, even going so far as selecting an appropriate space to use on the hard drive. I simply told it to install alongside the existing Windows partition, and let it take care of the details.

The installer finished its business in short order, and I restarted the machine. Ubuntu booted with no issues, but my Windows 8 partition refused to cooperate. It would seem as though something that the installer did wasn’t getting along well with UEFI/SecureBoot. Upon attempting to boot Windows, I got the following message:

error: Secure Boot forbids loading module from (hd0,gpt8)/boot/grub/x86_64-efi/ntfs.mod.
error: failure reading sector 0x0 from ‘cd0′
error: no such device: 0030DA4030DA3C7A
error: can’t find command ‘drivemap’
error: invalid EFI file path

Press any key to continue…

Uh oh.

Like I said, I could boot Ubuntu, so I headed on over to their website and read their page on UEFI. At first glance, it seemed as though I had done everything correctly. The only place that I deviated from these instructions was in manually resizing my Windows partition to create space for my new Ubuntu partition.

Thinking that I might be experiencing troubles with  my boot partition, I took a shot at running Ubuntu’s Boot-Repair utility. It seemed to do something, but upon restarting the machine, I found that I had even more problems – now a Master Boot Record wasn’t found at all:

It would appear as though I may have made things worse...

It would appear as though I may have made things worse…

After dismissing the boot device error, I was prompted to choose which device to boot from. I chose to boot Windows’ UEFI Repair partition, and was (luckily) able to get to a desktop. Unfortunately, none of the other partitions on the device seem to work, so I’m back where I started at the beginning, except that now in addition to having to put up with Windows 8, I also have a broken master boot record.

Lenovo: 1 / Jon: 0.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

TrueCrypt, kernel compilation and where’d /boot go?

October 5th, 2009 1 comment

Since I’ve installed Gentoo, I haven’t had access to my other drives. One of them is an NTFS-formatted WD Raptor, and the other is a generic Seagate 300GB drive that contains my documents, pictures and Communist propaganda inside a TrueCrypt partition. Getting the Raptor to work was fairly simple (as far as Gentoo goes) – I added the entry to my /etc/fstab file and then manually mounted the partition:

/dev/sdb1               /mnt/raptor     ntfs-3g         noatime         0 0

The TrueCrypt drive proved to be more of an issue. After installing the software and attempting to mount the partition, I encountered an error:

device-mapper: reload ioctl failed: Invalid argument 
Command failed

A quick Bing and the Gentoo Wiki described this problem exactly, with the caveat that I had to recompile my kernel to add support for LRW and XTS support. Into the kernel configuration I went – the only difference I noticed is that LRW and XTS are considered “EXPERIMENTAL” but aren’t noted as such on the requirements page:

Kernel configuration options

(This may come down to an x64 vs. x86 issue, but I haven’t run into any issues with these options enabled (yet!))

Of course, then came the make && make modules_install commands, which didn’t take too long to complete. The question then became, how do I install the new kernel? Looking in my /boot partition, I only had a few template files – and not the kernel itself or any grub settings. Essentially, /boot had nothing in it but the system still launches properly!

I then tried mounting /dev/sda1 manually, and the kernel and grub.conf showed up properly in the mountpoint. Something is obviously wrong with the way my system remounts /boot during the startup process, but at least now I’m able to install the new kernel. After copying /arch/x86_64/boot/bzImage to the newly available directory, I rebooted and the new kernel was picked up properly. TrueCrypt now lets me open, create and delete files from /media/truecrypt1, and automatically uses ntfs-3g support to accomplish this.

Overall, I’m pretty pleased at how easily I can recompile a kernel, and installation was seamless once I figured out that /boot wasn’t pointing to the right location. I expect I’ll try and manually remove the directory from /dev/sda3 and see if that makes a difference.




I am currently running Ubuntu 14.04 LTS for a home server, with a mix of Windows, OS X and Linux clients for both work and personal use.
I prefer Ubuntu LTS releases without Unity - XFCE is much more my style of desktop interface.
Check out my profile for more information.