Tag Archives: GRUB

Update from Fedora 18 to 20 or 21 in few simple clicks and without (I hope) problems!

Fedora 21Sometimes simple things become hard problems. This happened to me when I discovered that my Fedora 18 OS was obsolete (very old indeed) and I tried to upgrade it to the Fedora 20 version.

Fedora 18 doesn’t support the automatic OS upgrade so I had to spend some hours to find information on Internet and create the right DIY solution for my case. At the end of my little (sic!) research I discovered that I was able not only able to upgrade the PC to Fedora 20 but I also found a good “trick” to upgrade to the latest Fedora 21 following in just a couple of steps with the help of fedup and some other escamotages.

This is how I succeed…

First, you have to open a Terminal and type:

su
init 3

but you will immediately leave the Fedora GUI and so it’s better if you write the below commands on an -old style, paper notepad- to be sure to have all the right information in you hands and correctly manage the upgrade from Fedora 18 to Fedora 20

sudo su -
yum update
yum install fedup
fedup-cli --network 20 --nogpgcheck

It’s better to add –nogpgcheck because often you are not able to complete your upgrade for the “old”, “bad saved” gpg key in your system.

reboot

Now, at the boot-up menu (GRUB 2 menu) you have to choose “System Upgrade (Fedup)”.

Then just to be sure you really have an up to date OS, in Terminal, type:

Yum update

If you have problems with one or more of your “old” repositories don’t forget to deconfigure them. In my case I had to launch this command line in Terminal due to skip an old repository and proceed with the upgrade:

yum-config-manager --save --setopt=home_moritzmolch_gencfsm.skip_if_unavailable=true

At this point, to upgrade from Fedora 20 to Fedora 21 you have to open (again) the Terminal and type:

su
fedup --network 21 --product=workstation --nogpgcheck

OR

fedup --network 21 --product=server --nogpgcheck

(if your Fedora version is the server one)

OR

fedup --network 21 --product=cloud --nogpgcheck

(for the Fedora cloud edition for generic virtual machines or Container)

Take it easy and go to bed for a long snap because, in my case, the download took some hours as for 2,577 files to be upgraded…

At the end, as before, you have to Reboot and select “System Upgrade (Fedup)” at the boot-up menu (GRUB 2 menu) and all the necessary files will be installed. Again, take a good book to read while you wait the installation.

Good luck and remind you MUST backup all your data before you start any upgrade because unforeseen risks are always around the corner!

References:

https://ask.fedoraproject.org/en/question/37247/upgrade-fedora-18-to-fedora-20-via-yum-or-fedup/

http://tecadmin.net/steps-to-upgrade-fedora-19-to-20-using-fedup-tool/

http://www.unixmen.com/upgrade-fedora-20-fedora-21-using-fedup/

https://ask.fedoraproject.org/en/question/39558/how-to-remove-a-repository-from-my-system

Repair GRUB on IBM Thinkpad – The best Linux solution

When you decide to add another OS to the usual OS on your PC you can potentially damage your grub package. The Grub (GNU GRand Unified Bootloader) is the “soul” of you hardware, the program which allows your PC to find the OS during the boot-up.

Today we will not discuss about the old and new malware that are able to influence the GRUB but we will focus our attention on how repairing your computer when you see grub rescue> on your black screen…

The first solution you can find on internet is a detailed command solution but it was unfortunately usefulness in my case because my PC was not able to correctly accept the insmod command. Consequently I decided to use a portable rescue CD-USB to fix the matter.

Normally, if you use an Ubuntu derived OS, you can use Boot-Repair and it will semi-automatically fix your Grub problem in just few minutes. In any case, it is moderately easy but you have to be 100% sure about what HD partition you want to repair. As usual, this wasn’t my case. I had to find something more generic -in term of serviced OS- but effective.

At the end I bumped into the Boot Repair Disk. I had just to burn the free iso on a RW DVD and I could start to test it on my “out of service” laptop. The Boot Repair live CD is a wonderful tool! As soon as you boot up the live CD, Boot Repair guides you to the best possible solution. You have just to follow the suggestion on the screen and, in few minutes, the Boot Repair Disk is able to fix the Grub and to perfectly restore your computer.

Easy, Fast, Effective!! AddThis

Reinstalling and Fixing Grub 2 by NixiePixel

AddThis

Recovering the GRUB 2 Boot Loader by cgermany77

AddThis

How to manage the GRUB and purge old Kernel versions on the start-up menu

After a kernel update, you find the start-up menu populated with extra lines related to all the old kernel versions plus the current one. To manage the start-up manager and safely remove old kernels you have to manually operate on it.
First of all you have to double-check what is the current kernel version.
Open a Terminal and type:
uname -r
The result will be something similar to: 2.6.32-35-generic
Then you will go to the boot directory through the command:
cd /boot ls vmlinuz*
The next step will be to obtain more information about old kernel you have on our PC:
ls vmlinuz*
Now in the Terminal you have results similar to these:
vmlinuz-2.6.32-21-generic  vmlinuz-2.6.32-25-generic  vmlinuz-2.6.32-35-generic
vmlinuz-2.6.32-24-generic  vmlinuz-2.6.32-26-generic
As last step you have to remove all the old version of the kernel using this command:
sudo apt-get remove linux-image-X.X.XX-XX-generic
where “x” is the obsolete kernel version you want to purge. In my specific case the proper command line I used was:
sudo apt-get remove linux-image-2.6.32-21-generic linux-image-2.6.32-24-generic linux-image-2.6.32-25-generic linux-image-2.6.32-26-generic
Last but not least go to System –> Administration –> StartUp Manager (available for installation on Synaptics or on Ubuntu Software Center) and select your OS choice in the Default Operating System menu. That’s all! AddThis

Video – Change GRUB menu list by curemind

AddThis

How to Change the Boot Order in Ubuntu

If you installed Ubuntu and Windows at the same time, you probably noticed that when you start your computer you can choose what operating system to launch. The responsible software for this is usually the GRUB loader and its menu. Obviously, after you install Ubuntu, it is placed as the first option and if you do not explicitly choose Windows in a few seconds, Ubuntu will be started. But what if you want Windows as your default option? Here is how you change the order:

1. Launch a new Ubuntu Terminal (Applications, Accessories). Type in the following command:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup

This will create a backup of the GRUB configuration file.

2. Now open the file. We’ll do it with a new command:

sudo gedit /boot/grub/menu.lst

You will be prompted for a password, after which a text editor will be launched. In most of the situations, the menu.lst file contains many comments. You have to search for a line that says

default 0

This should not be very far from the end of file. Here you will have to intervene. After a few lines you will the variable called ‘timeout’ and its value (10 by default). If you want to have more or less time available for choosing your operating system, change the 10 with what number you want.

So back to the boot sequence. Scroll through the file again until you find:

title Ubuntu, kernel 2.6.17-10-generic

There will be more titles. Count the order number of Windows, but start from 0. The value you choose should overwrite the default one. For example, if Windows is the 4th title in the list, you will need to type

default 4

instead of ‘default 0’, which was described above. All you need to do at this point is to save the file and restart your computer. AddThis

Recovering root password under Linux with single user mode

It happens sometime that you can’t remember root password. On Linux, recovering root password can be done by booting Linux under a specific mode: single user mode.
This tutorial will show how to boot Linux in single user mode when using GRUB and finally how to change root password.
During normal usage, a Linux OS runs under runlevels between 2 and 5 which corresponds to various multi-user modes. Booting Linux under runlevel 1 will allow one to enter into a specific mode, single user mode. Under such a level, you directly get a root prompt. From there, changing root password is a piece of cake.
Some Linux distribution, such as Ubuntu for instance, offer a specific boot menu entry where it is stated “Recovery Mode” or “Single-User Mode“. If this is your case, selecting this menu entry will boot your machine into single user mode, you can carry on with the next part. If not, you might want to read this part.
Using GRUB, you can manually edit the proposed menu entry at boot time. To do so, when GRUB is presenting the menu list (you might need to press ESC first), follow those instructions:
– use the arrows to select the boot entry you want to modify.
– press e to edit the entry
– use the arrows to go to kernel line
– press e to edit this entry
– at the end of the line add the word: single
– press ESC to go back to the parent menu
– press b to boot this kernel
The kernel should be booting as usual (except for the graphical splash screen you might be used to), and you will finally get a root prompt (sh#).
Here we are, we have gained root access to the filesystem, let’s finally change the password.
As root, changing password does not ask for your old password, therefore running the command:
# passwd
will prompt you for your new password and will ask you to confirm it to make sure there is no typo.
That’s it, you can now reboot your box and gain root access again. AddThis mp3 link

QGRUBEditor: a simple but effective GRUB editor for many Linux OS

TUXQGRUBEditor is one of the most interesting system tool for Linux I have met during the last two months. For this reason I decided to post a review in our Linux Page (in Spanish). This System tool is simple to install, easier to use and the results are very enjoyable. In our tests, we were able to easily modify the GRUB boot loader without damaging our OS. QGRUBEditor has a special feature which allows you to backup (highly recommended) your actual GRUB configuration before starting playing with its tools. If something goes wrong you can restore your previous GRUB just clicking on the restore button. Last but not least, QGRUBEditor allows you to add a password to rise the security of your GRUB. AddThis mp3 link