Archive

Posts Tagged ‘GRUB’

Fix no screen brightness on boot problem

October 14th, 2013 No comments

I recently upgraded my laptop to a brand new Lenovo Y410P and promptly replaced Windows 8 with a Linux install. Unfortunately I immediately ran into a very strange driver(?) issue where, on boot, the computer would default to the absolute lowest screen brightness level. This meant that I would need to manually adjust the screen brightness up just to see the login screen. Thankfully after some help from the excellent people over on the Ubuntu Forums I managed to find a very easy work around.

1) As root open up /etc/default/grub

I did this by simply issuing the following command:

sudo nano /etc/default/grub

2) Find the line that says GRUB_CMDLINE_LINUX= and add “acpi_backlight=vendor” to the list of options.

3) From a terminal run this command to update GRUB

sudo update-grub

4) Reboot!

That’s pretty much it. My computer now boots with the correct screen brightness as one would expect.




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

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 0×0 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.

Experience Booting Linux Using the Windows 7 Bootloader

July 26th, 2013 2 comments

Greetings everyone! It has been quite some time since my last post. As you’ll be able to read from my profile (and signature,) I have decided to run ArchLinux for the upcoming experiment. As of yet, I’m not sure what my contributions to the community will be, however, there will be more on that later.

One of the interesting things I wanted to try this time around was to get Linux to boot from the Windows 7 bootloader. The basic principle here is to take the first 512-bytes of your /boot partition (with GRUB installed), and place it on your C:\ as linux.bin. From there, you use BCDEdit in Windows to add it to your bootloader. When you boot Windows, you will be prompted to either start Windows 7 or Linux. If you choose Linux, GRUB will be launched.

Before I go into my experience, I just wanted to let you know that I was not able to get it working. It’s not that it isn’t possible, but for the sake of being able to boot into ArchLinux at some point during the experiment, I decided to install GRUB to the MBR and chainload the Windows bootloader.

I started off with this article from the ArchLinux wiki, that basically explains the process above in more detail. What I failed to realize was that this article was meant to be used when both OSes are on the same disk. In my case, I have Windows running on one disk, and Linux on another.

According to this article on Eric Hameleers’ blog, the Windows 7 Bootloader does not play well with loading operating systems that reside on a different disk. Eric goes into a workaround for this in the article. The proposed solution is to have your /boot partition reside on the same disk as Windows. This way, the second stage of GRUB will be properly loaded, and GRUB will handle the rest properly.

Although I could attempt the above, I don’t really want to be re-sizing my Windows partition at this point, and it will be much easier for me to install GRUB to the MBR on my Linux disk, and have that disk boot first. That way, if I decide to get rid of Linux later, I can change the boot order, and the Windows bootloader will have remained un-touched.

Besides, while I was investigating this approach, I received a lot of ridicule from #archlinux for trying to use the Windows bootloader.

09:49 < AngryArchLinuxUser555> uhm, first 512bytes of /boot is pretty useless
09:49 < AngryArchLinuxUser555> unless you are doing retarded things like not having grub in mbr
(username changed for privacy)

For the record, I was not attempting this because I think it’s a good idea. I do much prefer using GRUB, however, this was FOR SCIENCE!

If I ever do manage to boot into ArchLinux, I will be sure to write another post.


I am currently running ArchLinux (x86_64).
Check out my profile for more information.

Linux Saves the Day

December 23rd, 2009 5 comments

Earlier this week I had an experience where using Linux got me out of trouble in a relatively quick and easy manner. The catch? It was kind of Linux’s fault that I was in trouble in the first place.

Around halfway through November my Linux install on my laptop crapped out, and really fucked things up hard. However, my Windows install wasn’t affected, so I started using Windows on my laptop primarily, while switching to an openSUSE VM on my desktop for my home computing needs.

About a week back I decided it was time to reinstall Linux on my laptop, since exams and my 600 hojillion final projects were out of the way. I booted into Win7, nuked the partitions being used by Linux and… went and got some pizza and forgot to finish my install. Turns out I hadn’t restarted my PC anywhere between that day and when shit hit the fan. When I did restart, I was informed to the merry tune of a PC Speaker screech that my computer had no bootable media.

… Well shit.

My first reaction was to try again, my second was to check to make sure the hard drive was plugged in firmly. After doing this a few times, I was so enraged about my lost data that I was about ready to repave the whole drive when I had the good sense to throw in a BartPE live CD and check to see if there was any data left on the drive. To my elation, all of my data was still in tact! It was at this precise moment I thought to myself “Oh drat, I bet I uninstalled that darned GRUB bootloader. Fiddlesticks!”

However, all was not lost. I know that Linux is great and is capable of finding other OS installs during its install and setting them up in GRUB without me having to look around for a windows boot point and do it myself. 20 minutes and an openSUSE install later, everything was back to normal on my laptop, Win7 and openSUSE 11.1 included!

As we speak I’m attempting an in-place upgrade to openSUSE 11.2 so hopefully I get lucky and everything goes smoothly!