LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-19-2011, 04:35 PM   #16
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0

Thanks for the replies.

"choose manual partitioning and choose Ubuntu's partition as the destination of the boot-loader. At the bottom of the options. Then you can chainload."

That is what I have done. Doesn't work. No bootsector gets placed in the Ubuntu partition.

"Post output of fdisk -l"

I'll do this when I get back to the machine. Please look at the results.txt file I attached above. I believe it contains the same information.
 
Old 04-19-2011, 05:04 PM   #17
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
I'll do this when I get back to the machine. Please look at the results.txt file I attached above. I believe it contains the same information.
I just looked at boot info script wins didn't understand so had to switch computers.

I think that someone else should comment on this 1
The reason being that I'm a newbie myself I could be wrong, but grub has to be placed within 1st 128gig.
You would need resize or reposition ubuntu, which can be done.
But like I said wait for comfirmation from the more experienced help here.

Last edited by EDDY1; 04-19-2011 at 05:23 PM.
 
Old 04-19-2011, 05:22 PM   #18
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://ircanswers.com/ubuntu1/359285...xplained-about
 
Old 04-19-2011, 07:47 PM   #19
sunnydrake
Member
 
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 289
Blog Entries: 1

Rep: Reputation: 61
Partition Boot Start End Size Id System

/dev/sda1 * 63 1,026,143 1,026,081 6 FAT16
/dev/sda2 1,026,205 976,770,143 975,743,939 f W95 Ext d (LBA)
/dev/sda5 1,026,207 205,837,631 204,811,425 b W95 FAT32
/dev/sda6 205,837,695 222,223,679 16,385,985 b W95 FAT32
/dev/sda7 222,223,743 422,114,111 199,890,369 83 Linux
/dev/sda8 422,114,175 431,246,591 9,132,417 82 Linux swap / Solaris
/dev/sda9 431,246,655 956,301,695 525,055,041 7 HPFS/NTFS
/dev/sda10 956,301,759 976,770,143 20,468,385 af HFS

first thing before messing around is to make backups
to backup your mbr (save it on your removable device!)
sudo dd if=/dev/sda of=~/mbr.img bs=512 count=63
to restore
sudo dd of=/dev/sda if=(path to mbr.img) bs=512 count=63

then as EDDY said boot livecd with ubuntu and install of grub (not need to install whole system again!) sudo grub-install /dev/sda - if all ok tune configuration in grub.conf, if fails post output of grub-install etc..

you can always run gparted, shrink from start /dev/sda2 create new linux partition there /boot and out kernel images on it (copy /boot from sda7) then handtune grub)

Last edited by sunnydrake; 04-19-2011 at 07:51 PM.
 
1 members found this post helpful.
Old 04-20-2011, 11:54 PM   #20
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Output of "fdisk -l"

Ok, I booted from the live CD, and ran "fdisk -l" from a terminal window. Attached is a screen capture of the output. Nothing different here from the "results.txt" output I previoulsy posted on this page. Still hoping someone can tell me why GRUB won't install properly. (I've formatted and reformatted. Tried both Ubuntu and Fedora. Allowed GRUB to install to the MBR, and also tried to put it in the Linux install partition. Heck, I even tried to put Grub on a floppy. None of these things got me a linux bootsector. I also used a Super Grub disk to see if it could boot my machine. That didn't work either. I can't see anything unusual about my drive partitioning.

Sunnydrake, are you saying I CANNOT put Grub on the Linux install partition? Why not? Is EDDY1 right about GRUB having to be in the first 128 GB? I realize the preferred installation of Grub is to the MBR, but I've tried that many times and all it does is screw up my DOS and Windows boot. For that reason, I'd rather let NTLoader chainload Linux.

JC
Attached Thumbnails
Click image for larger version

Name:	fdisk -l output.png
Views:	26
Size:	54.4 KB
ID:	6776  

Last edited by Engineeringtech; 04-21-2011 at 12:05 AM.
 
Old 04-21-2011, 02:15 AM   #21
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Sunnydrake, are you saying I CANNOT put Grub on the Linux install partition? Why not? Is EDDY1 right about GRUB having to be in the first 128 GB? I realize the preferred installation of Grub is to the MBR, but I've tried that many times and all it does is screw up my DOS and Windows boot. For that reason, I'd rather let NTLoader chainload Linux.
For me the easiest solution would be to use gparted live
remove existing linux install on sda7 & sda8
move sda6 to the right, then sda5 to the right.
Now you have 2 options
1. Install linux to empty space within logial partition sda2
or
2. Resize logical sda2 from the left closing empty space within thereby creating empty space for a new primary to install ubuntu to which will be within 128G.
 
Old 04-21-2011, 02:19 AM   #22
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://www.bleepingcomputer.com/tuto...torial152.html
 
Old 04-21-2011, 07:27 PM   #23
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,547

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
You indicate that you currently boot with the xp bootloader and can boot xp and DOS. When you boot, do you get an entry for either Fedora (do you still have Fedora?) or Ubuntu on your windows menu? Do you just see the options for xp and DOS?

If you look at your bootinfo script, it does show windows in the mbr and the proper xp boot files in sda1. It also shows all the necessary boot files for Ubuntu Grub in sda7. It also shows the kernel and initrd files there.

In your initial post, you said that Fedora didn't detect other installations and would not boot. So you installed Fedora with Grub to the mbr and got what?? no boot menu, black screen. I guess it's irrelevant as you don't seem to have Fedora. Fedora is almost always good at detecting a windows install but rarely Linux so this is surprising.

When you installed Ubuntu with Grub in the mbr, what happened? Got a boot menu? black screen? blinking cursor?

If when you boot from xp, you do not get an entry for Ubuntu, you might take a look at the bootsect.lnx file and compare it to whatever was in the instructions to create that file to boot Ubuntu. Did you or your friend create this file while Fedora was installed or Ubuntu? Might make a difference if it was Fedora and is now Ubuntu, different Grub bootloader but don't know that is the problem? If you do see an Ubuntu entry, that's a different problem.

If you don't see an Ubuntu entry when booting from xp, you could take a look at the link below, The first part of it is in reference to the Lilo bootloader. Ignore that part and start reading about half way down the page in the paragraph with the dd commands in bold. Read through it a few times. If you don't think you understand it, stop and don't do anything. If you make a mistake with the dd command, you can really mess things up.

http://jaeger.morpheus.net/linux/ntldr.php

I had a link to another site that I though was better on booting Linux from xp but, can't seem to find it?

Found it. The site below seems a little more clear to me. Again, read it all before starting anything and if you don't feel you understand, stop! You will need to make some simple modifications, change the partition name in the command to your Ubuntu for one.

http://www.linux.com/archive/feature/113945
If you see an Ubuntu entry on your xp boot menu, what happens exactly when you select it.

Last edited by yancek; 04-21-2011 at 07:32 PM.
 
Old 04-22-2011, 10:10 AM   #24
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EDDY1 View Post
...... thereby creating empty space for a new primary to install ubuntu to which will be within 128G.
So you're saying Ubuntu HAS to be installed within the first 128GB? Or the grub boot loader / bootsector has to be within the first 128GB?

I don't know about re-ordering my partitions... Won't that screw up my DOS and Windows booting from NTLoader? If I had a high confidence Grub would pick up the OS's and all me to boot them, I would do that. However, I haven't had any luck with Ubuntu finding the other OS's. Very important to me that I don't damage DOS and Windows to get Linux.
 
Old 04-22-2011, 11:01 AM   #25
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
You indicate that you currently boot with the xp bootloader and can boot xp and DOS. When you boot, do you get an entry for either Fedora (do you still have Fedora?) or Ubuntu on your windows menu? Do you just see the options for xp and DOS?

If you look at your bootinfo script, it does show windows in the mbr and the proper xp boot files in sda1. It also shows all the necessary boot files for Ubuntu Grub in sda7. It also shows the kernel and initrd files there.
Since I have had no luck with Grub booting my system, I've been trying to chainload Linux from Windows NTloader. The process, widely described on the internet, involves DD'ing the Grub bootcode (first 512 bytes of the install partition) to a file named "bootsect.lnx" and referencing it in Window's "boot.ini". But my DD output is EMPTY. My conclusion is that Grub is not placing bootcode in the root of SDA7. That's what I'm trying to correct.

Quote:
Originally Posted by yancek View Post
...you said that Fedora didn't detect other installations and would not boot. So you installed Fedora with Grub to the mbr and got what?? no boot menu, black screen. I guess it's irrelevant as you don't seem to have Fedora. Fedora is almost always good at detecting a windows install...
Please understand I have reformatted SDA7 and reinstalled Linux many (10) times. I've tried Ubuntu 9.04, 10.04, 10.10 and Fedora 14. None of these installations, whether from a "live CD", or Ubuntu's "Alternate install CD", generated any error messages OR resulted in a bootable Linux installation. In each case, the installer TOLD me it had not detected any other OS's, and gave me the choice to place Grub to the MBR or another location. When I allowed the installer (whether Ubuntu or Fedora) to place GRUB in the MBR, the ONLY result was I could no longer boot DOS, or Windows. I did not get a Linux boot.

I don't like looking at a black screen with a flashing "_" cursor, so after I repaired the MBR the 2nd or 3rd time, I decided I wouldn't put Grub2 (or Grub Legacy) in the MBR again, unless I knew for certain it had detected my other OS's. So I've been trying to install GRUB to SDA7 (or a floppy), and chainload from NTLOADER. A lot of people tell me I'm making a mistake in using NTLOADER, but at least I have DOS and Windows working. If Grub is not doing the job for me, I want to fix what's wrong with that, not screw up DOS and Windows. Also, I don't want to do any more reformats and re-installs if I can avoid it. This was a new drive when I got started, and I'm afraid I will wear it out!

The last major work I did was to reformat SDA7, and reinstall Ubuntu 10.10. So yes, Fedora is gone.

JC

Last edited by Engineeringtech; 04-22-2011 at 11:07 AM.
 
Old 04-22-2011, 12:52 PM   #26
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
I don't know about re-ordering my partitions... Won't that screw up my DOS and Windows booting from NTLoader? If I had a high confidence Grub would pick up the OS's and all me to boot them, I would do that. However, I haven't had any luck with Ubuntu finding the other OS's. Very important to me that I don't damage DOS and Windows to get Linux.
Look at this it i quite simple.
http://www.bleepingcomputer.com/tuto...52.html#livecd

Last edited by EDDY1; 04-22-2011 at 12:54 PM.
 
Old 04-22-2011, 01:03 PM   #27
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,547

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Please understand! Nowhere in my last post do I suggest or recommend you use Grub! Both links I posted were on booting Linux from xp.

The questions I asked about Grub might give someone information which could help to resolve the situation. Since you didn't bother to answer them, not much can be done.

You didn't respond to what specifically happened when you tried to install Grub to the mbr, whether you got a menu or whatever after any of the installs. You also didn't bother to indicate what you get when you boot xp or DOS, do you see any entry for Ubuntu?

Additionally, if you run the dd commmand referenced in the links above from your Ubuntu CD and open the bootsect.lnx file and it is empty, there isn't much point in copying it to sda1 where your windows boot files are. Have no idea why dd wouldn't copy it.
 
Old 04-22-2011, 02:31 PM   #28
sunnydrake
Member
 
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 289
Blog Entries: 1

Rep: Reputation: 61
ahhh okay going a little deeper.. scarth my head and put some info i have (it may be not 100% correct)
MBR
(some systems have different methods(not MBR))
MBR or master boot record is a place from first sector of hdd to first partition. It's size about 31kb+ and have list of partitions and their sizes inside(that's why you need to backup mbr!). GRUB installs (as any os loader) in this GAP not into partion.
Second part of grub "main"
But there is "main" part of grub that is bigger then 31kb it usually reside on separate logical partion or /(linux root). Filesystem does not matter as grub lineread data directly(dunno maybe you can place it on FAT32 too, but it's better to keep on linux fs to avoid defragmentators).
Size limits.. grub uses BIOS calls to access second part, on older systems it can be 32Gb or 128GB, so second part must be placed within this limits.

I strongly suggest to place grub at top chain of os loaders, but as dirty example you can backup mbr(as i described),install grub there, grab it via dd, and restore old W$.. then use "magic" with NTloader to boot second part from /dev/sda2 FAT32 partiotion(find in google how: grub fat32). This is not solution but can do job for you. As time passes and you became more confident in grub use it.
 
1 members found this post helpful.
Old 04-22-2011, 10:42 PM   #29
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
.......The questions I asked about Grub might give someone information which could help to resolve the situation. Since you didn't bother to answer them, not much can be done.

You didn't respond to what specifically happened when you tried to install Grub to the mbr, whether you got a menu or whatever after any of the installs. You also didn't bother to indicate what you get when you boot xp or DOS, do you see any entry for Ubuntu?

Additionally, if you run the dd commmand referenced in the links above from your Ubuntu CD and open the bootsect.lnx file and it is empty, there isn't much point in copying it to sda1 where your windows boot files are. Have no idea why dd wouldn't copy it.
Sorry, but I DID tell everyone here what happened on the MULTIPLE occasions I allowed the installer to put Grub in the MBR. I wound up with a black boot screen with a "-" prompt. No Grub boot menu.

Now prior to installing Grub to the MBR, my dual boot worked just fine. Windows NTLDR displayed my boot.ini boot menu, and I could boot into DOS or Windows. I'm quite aware that an empty bootsect.lnx file will not boot Linux. Nor did I KNOWINGLY COPY an empty file to SDA1. I simply "DD" the first 512 bytes of the Linux install partition directly to an output file "bootsect.lnx" ON SDA1. (Not being familiar with Linux, I don't know how to examine those bytes before doing the transfer.)

I know next to nothing about Linux, but it's my belief that GRUB is not placing a bootsector on my machine. And that is what I've been asking for help with. But it seems to me the Linux community gets defensive and doesn't believe me whenever I say anything they perceive as negative about Grub. I'm not trying to insult your favorite OS, or Grub . I just want to find and correct the problem, and start using Linux. So if you have any useful advice to me about troubleshooting this problem, I'd appreciate it.
 
Old 04-22-2011, 10:58 PM   #30
Engineeringtech
Member
 
Registered: Apr 2011
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sunnydrake View Post
..MBR or master boot record is a place from first sector of hdd to first partition. It's size about 31kb+ and have list of partitions and their sizes inside(that's why you need to backup mbr!). GRUB installs (as any os loader) in this GAP not into partion. Second part of grub "main" But there is "main" part of grub that is bigger then 31kb it usually reside on separate logical partion or /(linux root). Filesystem does not matter as grub lineread data directly(dunno maybe you can place it on FAT32 too, but it's better to keep on linux fs to avoid defragmentators).
Size limits.. grub uses BIOS calls to access second part, on older systems it can be 32Gb or 128GB, so second part must be placed within this limits.

I strongly suggest to place grub at top chain of os loaders, but as dirty example you can backup mbr(as i described),install grub there, grab it via dd, and restore old W$.. then use "magic" with NTloader to boot second part from /dev/sda2 FAT32 partiotion(find in google how: grub fat32). This is not solution but can do job for you. As time passes and you became more confident in grub use it.
Thanks for your answer Sunnydrake. I already had a very general understanding of the MBR, and how Linux boots. But I appreciate your taking the time to explain. My motherboard was new in 2009. Can I assume the BIOS can access 128GB? Is there anything in the fdisk -l output I posted to indicate that the second part of Grub you describe is outside of the reach of the BIOS?

If I understand you correctly, you suggest I backup my MBR, install GRUB to the MBR, move it elsewhere with DD, and reinstall the MBR from the backup. As I explained previously, I have on at least three occasions allowed Grub to be placed in the MBR, but never even got a boot menu. So I don't know what this would do for me.

I'm still not hearing any ideas on why the Grub install process is not creating a bootsector, whether in the MBR or the Linux partition). The installer has also told me I have the option of installing Grub to a floppy. But on the one occasion I directed the installer to put Grub on a floppy (/dev/fd0), the drive never ran. There's got to be some reason why Grub is not installing properly. It seems useless to keep trying to put Grub in the MBR, if all it is doing is damaging my Windows and DOS boot.

Last edited by Engineeringtech; 04-22-2011 at 11:10 PM.
 
  


Reply



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
LXer: How to Triple-Boot Your Mac with Windows and Linux, No Boot Camp Required LXer Syndicated Linux News 0 05-05-2010 09:30 AM
Installing goblinX in triple boot laptop... no boot in the other linux OS amalgam Linux - Newbie 2 02-14-2008 01:08 PM
Trying to triple boot 3 Linux OSes gnumantsc Linux - Newbie 2 09-27-2004 06:22 PM
Linux with triple boot hsani Linux - General 4 04-15-2004 08:34 AM
How to triple-boot...two linux and one XP cbjhawks Linux - General 4 01-20-2004 06:31 PM

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

All times are GMT -5. The time now is 02:19 AM.

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
Open Source Consulting | Domain Registration