Windows 10 not showing in GRUB boot menu of Linux Mint

A rule of thumb for dual booting Linux and Windows is to install Windows first.

But as anomalies in the Matrix exist, doing so may cause to have only Linux in GRUB boot menu (the linux boot menu that let you choose the operating system you want to boot into).

There are GUI programs to fix this but i will show you the Terminal way. I know the linux Terminal is scary but you’ll se you have nothing to worry about.

Look at the bright side, it’s an exercise for linux Terminal and editing a text file.

So, it’s simple as that:

  1. Open a Terminal.
  2. Type without quotes: “sudo nano /etc/grub.d/40_custom”
  3. Enter your password.
  4. Add this to the file:

menuentry ‘Windows 10′ {

set root='(hd0,msdos1)’

chainloader +1

}

5. Save and exit the text editor.

6. Also on the Terminal, type without quotes: “sudo update-grub2”.

7. Enter your password.

8. Restart and enjoy.

 

Grub rescue > and how to recover your boot menu and make changes permanently

A few days ago, after resizing some partitions on my hard-drive i did a restart and boom, no boot menu and i got this message:

unknown filesystem.

grub rescue>

What happened until now:

– i have 1 hard disk with dual boot setup with GRUB (linux boot menu) with Debian Linux and Windows.

– the Windows part has 2 partitions: C:\ with the system (bootable) and D:\with stuff.

– the Linux part have 3 partitions: root (/) (also bootable), home (/home) and swap.

– i shrinked with gParted the D: partition and grow the root and home partition on Linux.

– restart and ran into the grub rescue> problem above. What happened was that when resizing the root partition i screwed up the boot part.

The solution is basicaly to identify your linux bootable root partition and update the GRUB with the correct settings so that at the next boot, GRUB to be able to “read” all bootable partitions in your hard drive.

1. Make sure what is your Linux bootable root (/) partition. To do that, make sure you have the Debian Live DVD and boot into this DVD.

2. Go and try the Live image. Wait to load.

3. Open a Terminal.

4. At the prompt, type (the sudo -s won’t require a password):

sudo -s

fdisk -l

What i get was all the partitions and the bootable ones marked with *. I get something like:

Drive           Bootable      Type          Mount         Size        Etc……

/dev/sda1     *                 ntfs

/dev/sda2                        ntfs

/dev/sda3   ………… blah            blah

/dev/sda4                        ext4          /home

/dev/sda5                        swap

/dev/sda6    *                  ext4          /

5. So the Linux root bootable partition will be /dev/sda6. TRY TO UNDERSTAND THIS: so it’s on the first drive (sda) and on the 6th partition (sda6). At point 7. you will understand.

6. Restart and take the Debian/Ubuntu Live DVD out.

7. Back at the grub rescue> you should type each line followed by [Enter]:

grub rescue>set boot=(hd0,msdos6)

grub rescue>set prefix=(hd0,msdos6)/boot/grub

grub rescue>insmod normal

grub rescue>normal

8. You are back at the lost boot menu. ^-^. Boot into Linux.

Back on track, but if you restart the computer, you will be back to the grub rescue> problem. So to make the changes to GRUB that will be permanent, we should reinstall GRUB on the hard drive and update the GRUB menu:

9. Open a Terminal and type (Now for every sudo command you should enter your user password):

sudo grub-install /dev/sda

sudo update-grub

10. That’s it! Your changes to the boot menu ar permanent.

NOTE: If Windows won’t boot, use a Windows installer DVD and do a Stratup Repair.

Have fun! ^-^

Things to do after installing Debian 6 Squeeze

Debian OpenLogo

Image via Wikipedia

Because i didn’t have much to backup from my hard drives, i decided to make a clean Debian 6 Squeeze install. The installer is very friendly and comprehensive and it can’t put you in trouble at all if you read a little the installation manual or check the internet for installing Debian.

From what i experienced, there are some easy steps one can do after installing Debian and here is what i did (i will not go in detail explaining in detail how things works, the scope of this article is just to get you started with a fully functional Debian install. If you are a true newbie just type the commands in a Terminal and stay tuned for articles explaining the details of Debian):

Checking software repos:

First check the sources from where you can install software, those sources being in  /etc/apt/sources.list and you can access that with the default text editor vim, typing this command on a Terminal:

vim /etc/apt/sources.list

Get to know and understand those lines in this file and read about those on www.debian.org and packages.debian.org

Now do an update of the apt-get as root like this:

su

[type the admin password]

apt-get update or aptitude update

———-

Getting the sound to work:

For me it was very simple as running as root:

alsactl init

And the sound worked after running this command

———-

Installing the flash player:

I installed the flashplayer-nonfree from the non-free repos of Debian Squeeze. Start in a Terminal:

su

[type admin password]

vim /etc/apt/sources.list

Inside vim, press ‘i’ to start inserting text (vim is very weird for a newbie and it requires some time to get to know him, but once you break the barrier you will do wonders) and add this line:

deb http://ftp.ro.debian.org/debian squeeze main contrib non-free

The ro in the line above can be replaced with a mirror of choice.

After you insert that line, still in vim do this:

press Esc

press :wq

This will exit the text insert mode, write the file and then quit vim (i told you it’s weird but very fast).

As root do apt-get update or aptitude update

To use Synaptic this time, go to System > Administration > Synaptic Package Manager and search for flashplugin-nonfree, thick and hit Apply. Now if you go to http://www.youtube.com you should play flash movies.

Installing NVIDIA drivers:

I use an NVIDIA graphics card and installing the drivers it’s very easy, you just have to pay attention a little at what the installer tells you. First thing to do is go to the NVIDIA website and download the driver for your card and your OS architecture (eg.: for a GeForce 8600 GT and Debian amd64 you should download the GeForce 8 series Linux 64 driver)

Now go to the directory where the driver is and make it executable:

chmod +x [the name of the driver file] HINT: use Tab for auto-completion

Next will be, maybe a game of starting the NVIDIA installer, seeing that you don’t have somehing installed, exit the installer, go in Synaptic and install the missing parts and going back to the NVIDIA installer:

/etc/init.d/gdm3 stop INFO: i use GNOME so for me it’s gdm3

Navigate to where you have the NVIDIA drivers with cd and start the installer:

./NVIDIA[use Tab for auto-complete]

If everything is ok following the installer, answer ‘yes‘ when it asks to configure X and if there are no errors go back in X window system with /etc/init.d/gdm3 start and enjoy the 3D power.

If the installer tells you that you missing something, you must exit the installer, start X (see above), go in Synaptic and install the missing parts, stop X again and restart the NVIDIA installer. I repeated that about 3 times i think, but it was ok, consider it an exercise and the next time you’ll install the graphics like a pro.:)

It asks me about a package version 4.4 and i had 4.3 installed, i ignored the warning, continued and everything went fine.

Now having flash player installed, having the sound working and the 3D at it’s glory i am set to start working, so guys, have fun!!!

[EDITED – by @erbureth guides on identi.ca]

[EDITED AGAIN – by Nickmind guides in the comments]