LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2008, 09:07 PM   #1
357mag
Member
 
Registered: Feb 2005
Posts: 99

Rep: Reputation: 15
Did I put GRUB in the right spot?


Okay I just installed Ubuntu on my second hard drive. But I think I screwed up at the part of the installation when it asks you where you want GRUB put. I said put GRUB here:

/dev/sdb1

I'm getting this error:

Error 17: Cannot mount selected partition

But I think that put GRUB in the first partition when it needs to be in the boot sector. So could someone tell me exactly what to type at that part of the installation to tell it to put GRUB in the boot sector? I'll just redo the installation. It's simple enough.

When all this is done my plan is to just go into the BIOS and and use the BIOS to control which operating system gets booted.
 
Old 09-28-2008, 09:17 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
What operating systems do you have?

I wouldn't advise using the BIOS to select what boots; this is too much of a hassle. The Linux bootloader can boot from any drive, unlike the seriously defective WinDuhs bootloaders.

Now how did you install - did you remove the first disk before installing or what? Since GRUB is complaining that it cannot mount /dev/sdb1, what filesystem did you put on sdb1? Are you sure 'sdb1' was really your install disk and not the other disk?

You should be able to use the Ubuntu disc as a live CD and fix up any problems - but first we have to find out what your problem is.
 
Old 09-28-2008, 09:20 PM   #3
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by 357mag View Post
Okay I just installed Ubuntu on my second hard drive. But I think I screwed up at the part of the installation when it asks you where you want GRUB put. I said put GRUB here:

/dev/sdb1

I'm getting this error:

Error 17: Cannot mount selected partition

But I think that put GRUB in the first partition when it needs to be in the boot sector. So could someone tell me exactly what to type at that part of the installation to tell it to put GRUB in the boot sector? I'll just redo the installation. It's simple enough.

When all this is done my plan is to just go into the BIOS and and use the BIOS to control which operating system gets booted.
You can use the BIOS to control which operating system get booted ,
but during install this during should the first boot drive too
I mean installing on SDB than SDB is boot HD
Maybe it is not necessary to reinstall ,what is the outcome
of the command fdisk -l
 
Old 09-28-2008, 09:25 PM   #4
357mag
Member
 
Registered: Feb 2005
Posts: 99

Original Poster
Rep: Reputation: 15
I got XP on my first disk. I wanna put Ubuntu on my second. I did not remove any disks. I shouldn't have to do that I don't think. I just followed the defaults in the installation so I would imagine it used the correct Linux filesystems.

Last edited by 357mag; 09-28-2008 at 09:40 PM.
 
Old 09-28-2008, 10:02 PM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
OK, since the XP bootloader starts first, you don't have an option to boot Linux. If you were to swap things over in the BIOS then you should see GRUB start up but then fail to load the system.

You can either install GRUB to the MBR of the fist disk where it can boot Linux or chain to XP's ntldr, or you can install GRUB on the second HD and set up ntldr to chain to GRUB (in which case you get two sets of boot menus when you want to boot Linux) - so which one do you want? Booting via nldr means that you will have to update a file each time you upgrade your Linux kernel.
 
Old 09-28-2008, 10:05 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,691
Blog Entries: 4

Rep: Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026Reputation: 3026
Remember that Linux counts partitions from '1' whereas Grub counts them from '0'.

The best way to solve problems like this is to visualize what you have now, then compare it to what you intended to set up.
  1. Most basically, your BIOS needs to have something to boot. That "something" needs to be Grub's first-stage loader, which grub-install can set up. And, your BIOS has to know where to find it. If you see anything that "looks vaguely like GRUB" when you start the computer, you've cleared this hurdle. Otherwise, you haven't.
  2. Grub's first-stage loader needs to be able to find, in the designated partition, its own second-stage image and its configuration file. (If you're using a background-image, it needs to find that, too. The symptoms if it cannot are much uglier than you might have expected.)
  3. Grub now needs to find, at each of the locations specified in the configuration file, the proper operating-system to be booted according to the directions given in that file.
"So, what's wrong?" You'll need to figure that out, I am afraid, for yourself. But your careful observations, coupled with this description of the general process that Grub is attempting to go through, ought to help you to see your way clear. And, to learn something in the process. (Still stuck? Write back.)
 
Old 09-28-2008, 10:20 PM   #7
357mag
Member
 
Registered: Feb 2005
Posts: 99

Original Poster
Rep: Reputation: 15
Well what I tried now was I used something called Super Grub Disk. I ran it from the CD and just followed the menu and it fixed GRUB, and I was able to boot into Ubuntu.

But I got a new problem. When I entered my username and password, it would not let me in. And I know I entered them correctly.

My initial intention was to always go into the BIOS and just change which drive gets booted. My friend at the local tech shop told me I could do it that way. But after awhile that may get a little sickening. Cuz everytime I want to boot into the other system I would have to go back into the BIOS and change it again.

My next preference I think would be to use the Windows bootloader to load both operating systems. I believe you gotta copy the contents of the first 512 bytes or something of GRUB and place that in the boot.ini file of Windows. From what I've read this can either be done manually or by using BootPart.
 
Old 09-28-2008, 10:50 PM   #8
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Fixing the username/password issue should be simple -

1. Boot from the LiveCD and check out the /etc directory of your installed system
2. look in the 'passwd' file to see that you do have the username you expected
3. make a backup copy of 'shadow'
4. remove the user's password entry from 'shadow' - for example:

bob:$1$12345678$r/i3hP5obnYnQeyqmsJkU1:13559:0:99999:7:::

would become:

bob::13559:0:99999:7:::

and when you boot to the system, 'bob' should be able to log in without a password - unless of course PAM is misconfigured, in which case you'll need to check the Ubuntu website to see if there are any such known issues. Of course 'bob' has to change the password after logging in. There are other alternatives in which you can generate a proper md5 hash password entry, but simply removing the password is easier.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
editing grub to put Windowx XP first jhmac77 Linux - Software 4 02-07-2007 04:59 PM
Where do I put Grub? hda (XP) or hdb(FC2)? TimDog Fedora - Installation 1 10-04-2004 06:56 PM
GRUB installation, worried about where to put it... hoborocks Linux - General 3 01-08-2004 06:40 PM
How to put in GRUB rhl_one Slackware 2 12-21-2003 09:33 AM
Cursor hot spot won't stay put! markhall Linux - General 4 05-09-2003 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration