Start UP Menu (GRUB) (SOLVED)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Start UP Menu (GRUB) (SOLVED)

Post by WM7793 »

Hi I am a Linux newbie, and would appreciate any help to resolve a small issue.

I have two seperate hard drives. One with Win7 and the other is Linux Mint.

Both work fine independently.

I wish to have the option of selecting which O/S to use on start up.

I have tried to update the GRUB using sudo update-grub but this does not present me with the menu on boot up. It boots only to Linux Mint.

Could you please help me?

Best regards,

WM7793
Last edited by WM7793 on Wed Jun 06, 2012 12:47 pm, edited 1 time in total.
User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Start UP Menu (GRUB)

Post by Aging Technogeek »

When you installed Mint, where did you install Grub (if you did not let the installer use the default location)?
Registered Linux User 483387
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Thank you for your reply, as far as I can remember correctly I was not asked anything regarding the installation of Grub. This is probably because I had the windows 7 drive disconnected when installing Mint. This is because I got myself in a right mess when installing Mint for the first time and I did not fully understand the options for installation and somehow managed to overwrite windows 7 with Linux (my own stupid fault) hence the disconnection of the windows drive.

So I need some advice on how to rectify this and have the option to boot from either O/S. Hope you can help me.

Best regards,

WM7793
wayne128
Level 10
Level 10
Posts: 3411
Joined: Tue Jul 13, 2010 12:15 am

Re: Start UP Menu (GRUB)

Post by wayne128 »

Plug in your windows drive.

Boot your computer with Live DVD. Open a terminal, type below command and post terminal output.
sudo os-prober
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Thank you wayne128, I will give that a go.

Many thanks,

WM7793
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Hi Wayne 128, this is what I have.

/dev/sda1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sdb1:Windows 7 (loader):Windows:chain


What do i need to do now, as the strange thing is that it now defaults to windows !!

Best regards,

WM7793
wayne128
Level 10
Level 10
Posts: 3411
Joined: Tue Jul 13, 2010 12:15 am

Re: Start UP Menu (GRUB)

Post by wayne128 »

I have tried to update the GRUB using sudo update-grub but this does not present me with the menu on boot up. It boots only to Linux Mint.
WM7793 wrote: /dev/sda1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sdb1:Windows 7 (loader):Windows:chain

What do i need to do now, as the strange thing is that it now defaults to windows !!
at first you said it boots only to MInt.
Now it defaults to windows!!

I suspect your 'bios boot order' is kind of 'opposite of what os-prober says', but that is just a guess.

Please do these to verify.
1. reboot computer
2. go to bios, check what is the boot order of these two hard disk.
state which is windows hard disk and which is mint hard disk.
3. proceed to boot and see yourself on grub boot menu, take note and see what is the first line, second line, 3rd, 4th and so on.
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Right Wayne128 here goes, hope things are now a little clearer and many thanks for all your help to date !!

I reinstalled linux as other things I tried in the mean time messed things up totally with the grub and nothing would load.

I am now back to square one as per operating systems both OK.

As I have identical hard drives it is not clear in the bios which on it is booting from and there is no choice other than the DVD to boot from, as there is only the ONE hard drive shown.

However there is now a new line in the terminal which may mean something to you.

/dev/sda1:Windows 7 (loader):Windows:chain

Thanks again for your help.

WM7793
wayne128
Level 10
Level 10
Posts: 3411
Joined: Tue Jul 13, 2010 12:15 am

Re: Start UP Menu (GRUB)

Post by wayne128 »

As I have identical hard drives it is not clear in the bios which on it is booting from and there is no choice other than the DVD to boot from, as there is only the ONE hard drive shown.
This is a good problem.
It will confuse you whenever you use bios setting to switch first boot drive. :mrgreen:
But then you can stop doing that and let one of the drive be the first boot drive and let one of the 'master boot loader' handle the job.
However there is now a new line in the terminal which may mean something to you.
/dev/sda1:Windows 7 (loader):Windows:chain
Yes, this means windows 7 drive is currently the first boot drive. hopefully , still it may not be :mrgreen:

anyway, as you should figure out what type of format and partitions on the two drives.
Just boot computer from Live DVD, on terminals, type a few commands and post results

1. sudo fdisk -l
2. sudo parted -l print
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Hi Wayne128, sorry for not replying before today but I have been on vacation and had major problems with cabling and internet issues. I am now back online and the situation is as this:

I reinstalled linux ok which i needed to do to book holidays. I have today disconnected the linux drive and reconnected windows. This gave me a blank screen. I disconnected windows drive and reconnected linux drive and this also now gives me a blank screen arrggghh!

Going back to your first instruction the results are here:

mint@mint ~ $ sudo os-prober
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sdb1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sdd1:Windows 7 (loader):Windows1:chain

I really appreciate your help on this matter.

Many thanks in anticipation.

Best regards,

WM7793
mintybits
Level 6
Level 6
Posts: 1123
Joined: Fri Jan 27, 2012 5:09 pm

Re: Start UP Menu (GRUB)

Post by mintybits »

WM7793 wrote:This is probably because I had the windows 7 drive disconnected when installing Mint. This is because I got myself in a right mess when installing Mint for the first time and I did not fully understand the options for installation and somehow managed to overwrite windows 7 with Linux (my own stupid fault) hence the disconnection of the windows drive.
Very good idea. Keep your Windows drive safe from the Mint installer. :wink:

The way Mint works is different to Windows. The Grub install program is in parts and one part is at the front of the disk (the MBR area) and the other parts are in the linux partition itself. So if you happen to have the parts on different disks then nothing will boot at all without both disks connected. What you want is both parts of Grub only on the linux disk and nothing but Windows and the standard MBR on the Windows disk.

It sounds like the Windows disk might have Grub in its MBR which is why nothing happens when you disconnect the Mint disk. Also, it sounds like the Mint disk does not have Grub in its MBR and that is why the Mint disk won't boot on its own.

To fix this:
Connect both disks and boot into Mint.
Open a terminal and run "mount". The first line shows which disk partition the Mint root "/" is on. Make a note of this, for example sdb1. This means the first partition of disk sdb.
Then run "sudo dpkg-reconfigure grub-pc" and say "ok" to the menus until you get to the one to select the install disk. Choose the disk that "/" is on...eg: sdb. Note: not sdb1 - don't choose anything with a number at the end.
The "sudo dpkg reconfigure grub-pc" will reinstall Grub and run update-grub. So you ought to see Windows at the end of the list.

Now, the Mint disk should boot on its own. Either set it as first boot disk in your bios or, if you cannot choose in the bios, swap the cables over between your Windows disk and Mint disk.

If you still don't see Wndows in the Grub boot menu list there may be a problem with your Windows installation or your bios and you should run this script http://bootinfoscript.sourceforge.net/ in Mint and post the results inside code tags so we can see what is going on.

What is your PC model?
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Many thanks for your swift reply Mintybits.

First let me state that I am a novice to Linux hence the mess I have got myself in !!! albeit I like the software better than windows as this is only installed for my good lady to use !

I booted into live CD mint and this is the result of your first instruction (not quite what I was hoping for)

mint@mint ~ $ mount
/cow on / type overlayfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/mint/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mint)
mint@mint ~ $

ps my machine is a I5 2500 CPU based machine which I built myself.

Many thanks for your reply, see what you make of this and please advise.

Best regards,

WM7793
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Hi Minty, this is the current status using os-prober, as per earlier post.

mint@mint ~ $ sudo os-prober
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sdb1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sdd1:Windows 7 (loader):Windows1:chain

Best regards,

WM7793
mintybits
Level 6
Level 6
Posts: 1123
Joined: Fri Jan 27, 2012 5:09 pm

Re: Start UP Menu (GRUB)

Post by mintybits »

WM7793 wrote:Hi Minty, this is the current status using os-prober, as per earlier post.

mint@mint ~ $ sudo os-prober
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sdb1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sdd1:Windows 7 (loader):Windows1:chain

Best regards,

WM7793
Hi there. In my previous post I intended that you would boot into Mint on your hard drive (because in your first post you say you can do that). Then run the mount command. Then do "sudo dpkg-reconfigure grub-pc" and when it shows you a list of drives and partitions with *s next to one or more of them, use arrow keys and space bar to only have an * next to the drive name of linux...whatever drive the mount command shows, probably /dev/sdb (but not sdb1 or anything with a number at the end).
This will make sure Grub is installed to the MBR (the very first sectors) of the linux drive. Then reboot and tell the bios to boot that drive first. :)
mintybits
Level 6
Level 6
Posts: 1123
Joined: Fri Jan 27, 2012 5:09 pm

Re: Start UP Menu (GRUB)

Post by mintybits »

WM7793 wrote:ps my machine is a I5 2500 CPU based machine which I built myself.
So is mine. 8) I am using an ASRock P67 motherboard with 8GB of RAM. It is nice and fast. I also have a RAID-10 array so if you ever want to set up a RAID I know how to do it.
What mobo have you got?
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Hi Minty bits, yes you are right in saying that I was able to boot into Mint. I then decided that in my poor wisdom to try to get windows hard drive working independently. I therefore disconnected Linux and reconnected windows which was a big mistake as windows did not boot up and neither did Mint when reconnected separately, hence the pickle that I am in at the moment.

As I stand at this minute I am still unable to boot into either operating system. The only way in is to boot from live CD.

mint@mint ~ $ sudo os-prober
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sdb1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sdd1:Windows 7 (loader):Windows1:chain

Please advise if you can.

Best regards,

WM7793
mintybits
Level 6
Level 6
Posts: 1123
Joined: Fri Jan 27, 2012 5:09 pm

Re: Start UP Menu (GRUB)

Post by mintybits »

Have you tried booting with both drives connected?
If so, and it doesn't work, just disconnect all hard disks except the linux disk, for now.
Boot live CD and mount the linux root partition at /mnt: sudo mount /dev/sda1 /mnt
(I'm assuming the disk is now called sda but the bios may still call it sdb. Use whichever is right. Check using 'sudo fdisk -lu')

Then reinstall Grub:
sudo grub-install --root-directory=/mnt /dev/sda
(or /dev/sdb depending on what the bios is calling the disk)
sudo update-grub

Then reboot off the hard disk. If it now boots ok shutdown and reconnect the other two disks.
Reboot and configure the bios to boot off the linux disk. Once booted, follow my previous instructions.

This should enable you to boot linux and Windows via the linux disk. However, you still won't be able to boot Windows without the linux disk. To do that you need to reinstall the normal MBR on your Windows disk(s). Let's deal with that when the time comes.
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Hi Mintybits thank you for your help so far.

Please make what you think of this and please advise.
mint@mint ~ $ /mnt: sudo mount /dev/sda1 /mnt
bash: /mnt:: No such file or directory
mint@mint ~ $ sudosudo mount /dev/sda1 /mnt
sudosudo: command not found
mint@mint ~ $ sudo mount /dev/sda1 /mnt
mint@mint ~ $ sudo mount /dev/sdb1 /mnt
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sdb1
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
mint@mint ~ $ sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
mint@mint ~ $ sudo fdisk -lu

Disk /dev/sda: 64.0 GB, 64023257088 bytes
255 heads, 63 sectors/track, 7783 cylinders, total 125045424 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00019384

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 108335103 54166528 83 Linux
/dev/sda2 108337150 125044735 8353793 5 Extended
/dev/sda5 108337152 125044735 8353792 82 Linux swap / Solaris

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000edc50

Device Boot Start End Blocks Id System
/dev/sdb1 63 488392064 244196001 7 HPFS/NTFS/exFAT

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x052ec4e3

Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 1953521663 976759808 7 HPFS/NTFS/exFAT
mint@mint ~ $


Many thaks

WM7793
WM7793
Level 1
Level 1
Posts: 39
Joined: Fri May 04, 2012 12:50 pm

Re: Start UP Menu (GRUB)

Post by WM7793 »

Hi Mintybits. Forgot to add that this is with the Windows drive disconnected and booting from live CD.

Many thanks,

WM7793
mintybits
Level 6
Level 6
Posts: 1123
Joined: Fri Jan 27, 2012 5:09 pm

Re: Start UP Menu (GRUB)

Post by mintybits »

WM7793 wrote:Hi Mintybits. Forgot to add that this is with the Windows drive disconnected and booting from live CD.

Many thanks,

WM7793
You correctly mounted /dev/sda1 and then you immediately mounted /dev/sdb1 in place of it (?)

Start again. :)
sudo umount /mnt
sudo mount /dev/sda1 /mnt

Then do
sudo grub-install --root-directoy=/dev/mnt /dev/sda

Then do
sudo update-grub


If any errors are reported along the way stop everything and post them
Post Reply

Return to “Installation & Boot”