LinuxQuestions.org
Register a domain and help support LQ
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 03-13-2011, 03:28 PM   #46
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1

Quote:
Originally Posted by Bob32 View Post
Come again ?
I am in the live ubuntu cd right now.
The last time I booted, it went straight to seven, so I have no reason to doubt why it would have changed since I don't recall having done anything special.
Do you want me to test again ?
Ok screw it then, just try this in order from the bash prompt (quit out of grub):


Code:
mkdir /mnt/sysimage
Code:
mount /dev/sda6 /mnt/sysimage
Code:
chroot /mnt/sysimage
Code:
cat /boot/grub/grub.cfg | sed s/hd1/hd0/g
If all that works, reboot w/out CD.

If it chokes on step 2, please show me the output of:

Code:
cat /proc/partitions

Last edited by Brocifer; 03-13-2011 at 03:29 PM.
 
Old 03-13-2011, 03:32 PM   #47
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Brocifer, did you read the last message from Tregedar ?
There seemed to be a lot of sense. It is indeed grub2, and it is indeed a live cd.
I think he was speaking more to you than to me though, the steps weren't that precise, it was more the outlines.
What should I do next then ?

edit: Tregedar, if you're still here to read that message, let me say (well, first thanks and) that I think I already tried (post 17) what you are referring to.

Last edited by Bob32; 03-13-2011 at 03:37 PM.
 
Old 03-13-2011, 03:47 PM   #48
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
Brocifer, did you read the last message from Tregedar ?
There seemed to be a lot of sense. It is indeed grub2, and it is indeed a live cd.
I think he was speaking more to you than to me though, the steps weren't that precise, it was more the outlines.
What should I do next then ?

edit: Tregedar, if you're still here to read that message, let me say (well, first thanks and) that I think I already tried (post 17) what you are referring to.
Hang tight Bob, was having some browser issues. Aha! Thanks for the info Tregedar, I use Fedora, CentOS & RHEL and it's a bit different. You just edit grub.conf manually. Ok, so with that new information in mind our path is clear:

1. Boot to your livecd environment

2. Run the following commands:

Code:
sudo mount /dev/sda6 /mnt
Code:
sudo grub-install --root-directory=/mnt/ /dev/sda
Restart w/out CD, hopefully should boot into Ubuntu now.

Then run:

Code:
sudo update-grub

Last edited by Brocifer; 03-13-2011 at 03:54 PM. Reason: typo
 
Old 03-13-2011, 03:52 PM   #49
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
I'm hanging tight...
ubuntu@ubuntu:~$ sudo mnt /dev/sda6 /mnt
sudo: mnt: command not found

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda
Probing devices to guess BIOS drives. This may take a long time.
Installing GRUB to /dev/sda as (hd0)...
Installation finished. No error reported.
This is the contents of the device map /mnt//boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
(hd3) /dev/sdd
ubuntu@ubuntu:~$

Last edited by Bob32; 03-13-2011 at 03:54 PM.
 
Old 03-13-2011, 03:54 PM   #50
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
I'm hanging tight...
ubuntu@ubuntu:~$ sudo mnt /dev/sda6 /mnt
sudo: mnt: command not found
haha sorry man, typo. It should be

Code:
sudo mount /dev/sda6 /mnt
 
Old 03-13-2011, 03:56 PM   #51
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Yeah, I found it out as well. So I did that, and restarted the computer. It logged directly to windows (seven).

Last edited by Bob32; 03-13-2011 at 03:59 PM.
 
Old 03-13-2011, 03:56 PM   #52
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
I'm hanging tight...
ubuntu@ubuntu:~$ sudo mnt /dev/sda6 /mnt
sudo: mnt: command not found

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda
Probing devices to guess BIOS drives. This may take a long time.
Installing GRUB to /dev/sda as (hd0)...
Installation finished. No error reported.
This is the contents of the device map /mnt//boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
(hd3) /dev/sdd
ubuntu@ubuntu:~$
Sweet, looks good! Now yank the CD and reboot into Ubuntu. Then from bash run the grub update so it can pick up your Windows installations.
 
Old 03-13-2011, 03:57 PM   #53
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Brocifer View Post
Sweet, looks good! Now yank the CD and reboot into Ubuntu. Then from bash run the grub update so it can pick up your Windows installations.
Which version of Windows are you in?
 
Old 03-13-2011, 04:00 PM   #54
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
seven.
 
Old 03-13-2011, 04:02 PM   #55
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Did you double check your BIOS boot sequence? Is there a way to select which hard drive? There should be.

Very odd that it's booting to that, check the PM I just sent you if you'd like to try to troubleshoot it further via chat. Might be quicker/easier.
 
Old 03-13-2011, 04:04 PM   #56
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Well I don't know how to do that. There is definitely a list of different devices (usb stick, optical drive, hard drive, LS120, ...) to choose from, but not the name of the devices themselves. I'm not that familiar with it. Do you want me to write down all the menu entries and give them to you?
 
Old 03-13-2011, 04:12 PM   #57
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
Well I don't know how to do that. There is definitely a list of different devices (usb stick, optical drive, hard drive, LS120, ...) to choose from, but not the name of the devices themselves. I'm not that familiar with it. Do you want me to write down all the menu entries and give them to you?
That's ok, since you ultimately want to move the BCD boot partition from sdc to sda you might as well roll with this and just let the Windows bootloader handle everything.

The problem with Windows's bootloader is it will not coexist peacefully with any other bootloaders. Thus, if you want to ultimately boot all your operating systems from one drive this step was going to be necessary.

So with that in mind, I'd just recommend booting into Windows seven and downloading and installing EasyBCD. From there you should be able to just move the Windows bootloader off sdc (which we wanted to do anyways) and put it on sda.

Since it will not coexist peacefully with Grub and your requirement is for all to boot on sda, just use the Windows bootloader and add your Ubuntu boot partition (sda6) to it using EasyBCD and you are finished.
 
Old 03-13-2011, 04:14 PM   #58
Bob32
Member
 
Registered: Mar 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Oh never mind I found it, it was an unused option so far.
Okay, so now I set the sda as the first boot device, and rebooted.
The result is quite different. I don't get win7 anymore. Instead, I get the grub prompt (the prompt, not the menu). I guess it means there's still some things wrong. Is this the grub2 or grub prompt ??
 
Old 03-13-2011, 04:18 PM   #59
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
Oh never mind I found it, it was an unused option so far.
Okay, so now I set the sda as the first boot device, and rebooted.
The result is quite different. I don't get win7 anymore. Instead, I get the grub prompt (the prompt, not the menu). I guess it means there's still some things wrong. Is this the grub2 or grub prompt ??
Well that sounds correct then, and yes that is the grub2 prompt you should be seeing now. So now simply boot into Ubuntu and run that grub-update command from the previous post. After that, Grub should see Win XP & Windows 7 and you should be able to boot to all three operating systems.

Just remember, if you still want to move that Win 7 bootloader off sdc so everything runs off sda, follow the instructions in my previous post.
 
Old 03-13-2011, 04:21 PM   #60
Brocifer
Member
 
Registered: Mar 2011
Posts: 46

Rep: Reputation: 1
Quote:
Originally Posted by Bob32 View Post
Oh never mind I found it, it was an unused option so far.
Okay, so now I set the sda as the first boot device, and rebooted.
The result is quite different. I don't get win7 anymore. Instead, I get the grub prompt (the prompt, not the menu). I guess it means there's still some things wrong. Is this the grub2 or grub prompt ??
Argh, sorry I misread your previous post. It's booting to grub prompt now? :/

Note: You should probably be using Tregedar's suggested guide while making those grub changes to ensure it's done correctly. Regardless, if you can get into Windows 7 just fix it with EasyBCD and be done with it.

Last edited by Brocifer; 03-13-2011 at 04:23 PM.
 
  


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
Valgrind / loader / $ORIGIN issue jim2718 Linux - Software 1 12-17-2010 06:15 PM
reformat/boot loader issue babag Mandriva 2 06-16-2007 03:35 AM
boot loader issue tm2383 Fedora 1 11-02-2006 12:46 PM
Ahh help! (Grub Boot Loader Issue). RoaCh Of DisCor Linux - Software 9 09-09-2004 05:39 AM
grub boot loader issue mbegovic Linux - Software 2 04-17-2004 05:59 PM


All times are GMT -5. The time now is 10:29 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