Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-23-2007, 06:15 PM
|
#1
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Rep:
|
Ubuntu newbie -- GRUB failure?
Okay, been fighting this for a few hours now. Attempting to install Dapper Drake from an AMD64 Desktop CD.
I have a Windows XP installation I'm trying to preserve with a dual boot. Ubuntu installation appears to run smoothly, but at the point where I'm instructed to reboot without the CD, the machine boots directly into XP -- no evidence of GRUB doing its thing.
List of partitions (SATA drives):
/dev/sda5 through 8: NTFS
/dev/sda9: FAT32 for sharing (14GB)
/dev/sda10: linux swap (1GB)
/dev/sdb5 through 8: NTFS
/dev/sdb9: FAT32 (14GB)
/dev/sdb10: linux swap (1GB)
/dev/sdc1: Windows XP boot
/dev/sdc2: ext3; root assigned to this space (5GB)
Looking at Gparted, I can see 2GB of data on the ext3 partition, and the swaps are formatted. Booting into the Linux Rescue CD and poking around, I can see the /boot/grub/* files; the menu file appears to be fine.
Lastly, I tried copying the boot info to a file and adding it to the Windows bootloader -- that allows me to choose Ubuntu, but it just leads to a blank screen and no progress.
Any help greatly appreciated.
|
|
|
03-24-2007, 12:37 AM
|
#2
|
Member
Registered: Apr 2006
Distribution: Kubuntu 8.04
Posts: 129
Rep:
|
When you installed Ubuntu, which disk did you install grub in? It seems grub was not installed, i have never tried to add ubuntu to windows boot loader and i heard its not an easy task. To install grub, which will automatically have windows in the boot loader, use the live linux rescue disk and start a terminal
Then in terminal type: It should start the grub subsytem in terminal. after you type sd2 press tab key and it should list the partitions available, look for one with Ext3 filesystem something like that, then it will display some info about where grub is located in that partition, to install grub and then reboot.
Last edited by tidiman07; 03-24-2007 at 12:39 AM.
|
|
|
03-24-2007, 01:55 PM
|
#3
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Quote:
When you installed Ubuntu, which disk did you install grub in?
|
I wasn't given a choice. First time through, I thought I did something wrong. Second time through I paid very close attention, and at no point was I prompted to install GRUB. There were messages that GRUB was being installed, and configured, but control never came back to me until I was prompted to reboot without the Desktop CD.
I will try your suggestion and report back.
For the record, adding Ubuntu to the Windows bootloader wasn't difficult, just a bit time-consuming.
|
|
|
03-24-2007, 02:13 PM
|
#4
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Okay, started up the Linux Rescue CD; it put me in as root, and "sudo" was giving me errors (wanted to "correct sudo as _sudo"). Did the following:
14:02 root@sysresccd /root% grub
grub> root (sd2[tab]
Error 23: Error while parsing number
grub> root ([tab]
Possible disks are: hd0 hd1 hd2
grub> root (hd2,[tab]
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 1, Filesystem type is ext2fs, partition type 0x83
Note: That partition was created as ext3, not ext2; just verified in Gparted that it actually is ext3.
grub> root (hd2, 1)
Filesystem type is ext2fs, partition type 0x83
I'm not sure if that counts as showing where GRUB is located in the partition (doesn't look like it to me), so I quit at that point. Any advice or guidance greatly appreciated.
|
|
|
03-25-2007, 10:30 PM
|
#5
|
Member
Registered: Apr 2006
Distribution: Kubuntu 8.04
Posts: 129
Rep:
|
Thats shows where ubuntu is installed. Now what is your primary boot device? lets assume its the first hard drive, hd0. You would want to install grub there, This would install grub to first HDD. when you reboot grub menu should come up- assuming you boot from first HDD.
|
|
|
03-25-2007, 11:21 PM
|
#6
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336
|
O.K., looks like hd2 is correct given the partition count. Don't worry about your ext3 showing as ext2 - ext3 is merely ext2 with a journal.
Nothing is wrong.
The root command (of itself) doesn't prove anything - except that grub recognised the partition. In your case this will be the right partition, but you should try (from the grub prompt) "find /boot/grub/stage2" to be sure.
The setup command tidiman07 gave you will install to the MBR of the BIOS boot disk, and you should be right to go.
|
|
|
03-26-2007, 08:32 AM
|
#7
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Thanks to everybody for the advice; I'll have time to mess with this in a couple of days, and will report back on how it works. From everything I've read, my experience has been the exception to how Ubuntu normally takes care of all of this flawlessly. At least it's a learning experience.
|
|
|
03-30-2007, 06:06 PM
|
#8
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Right, following the instructions above, I booted the Linux Rescue CD, hopped over the "grub" prompt, and followed syg00's suggestion:
Quote:
grub> find /boot/grub/stage2
(hd2,1)
|
... which was what we expected. Used tidiman07's setup command:
Quote:
grub> root (hd2,1)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd2,1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd2,1)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd2,1)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd2,1) /boot/grub/stage2 p /boot/grub/menu.lst"... succeeded
Done.
|
Quit grub, rebooted without the CD
... and straight into Windows. No grub menu.
Verified in BIOS that the boot drive is the one that I think it is (easy determination: there are 2x80GB drives and 1x40GB, and it's the 40GB drive that's got Windows boot and Linux root on it).
I'm stumped. Any suggestions?
|
|
|
03-30-2007, 09:36 PM
|
#9
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336
|
Quote:
Originally Posted by gtyrrell
Used tidiman07's setup command:
|
No you didn't - you used your own variation of the setup.
If you ask for help, perhaps you should accept it when offered.
What was suggested puts the loader record in the MBR, what you did puts it in the partition - with no way to reference it.
|
|
|
03-31-2007, 01:18 PM
|
#10
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Tidiman's suggested syntax from 24 March:
Quote:
Grub> setup (sd2,1)
to install grub and then reboot.
|
Tidiman's suggested syntax from 25 March:
Quote:
grub> setup (hd0)
This would install grub to first HDD. when you reboot grub menu should come up- assuming you boot from first HDD.
|
As they both are listed as "install[ing] grub", I'm sorry that I didn't appreciate the difference between two nearly-identical commands. I will try:
since my boot isn't on the first HDD, but the third. Either way, I'll let you know how it works.
|
|
|
03-31-2007, 01:36 PM
|
#11
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Getting closer
Rebooted after installing grub to the MBR, and the grub menu actually displayed.
Chose "Ubuntu, kernel 2.6.15-26-amd64-generic" and hit enter. Result:
Quote:
Booting 'Ubuntu, kernel 2.6.15-26-amd64-generic'
root (hd2,1)
Error 22: No such partition
Press any key to continue...
|
Tried the next choice on the menu, got:
Quote:
Booting'Ubuntu, kernel 2.6.15-26-amd64-generic (recovery mode)'
Error 18: Selected cylinder exceeds maximum supported by BIOS
Press any key to continue...
|
Next choice:
Quote:
Booting "Microsoft Windows XP Home Edition;
Error 18: Selected cylinder exceeds maximum supported by BIOS
|
Rescue CD copy of GParted shows the ntfs partition, /dev/sdc1 (aka hd2,0), still has the boot flag, and the ext3 partition, /dev/sdc2 (aka hd2,1) does not. Exited the Rescue CD, rebooted and got the following:
Quote:
Booting "Microsoft Windows XP Home Edition;
root (hd2,0)
Filesystem type unknown, partition type 0xf
savedefault
makeactive
Error 12: Invalid device requested
Press any key to continue...
|
Help?
|
|
|
03-31-2007, 06:47 PM
|
#12
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336
|
First, sorry for the remark. Flipping back I only saw the latter offering from tidiman07. My bad.
Sooo ...
Which device did you do the setup to - hd0 or hd2. And did you boot straight afterwards ???. Also can we see the contents of /boot/grub/device.map.
From the grub menu, hit <c> to go to command prompt, and do the find for stage2 again - what does it show now ???.
|
|
|
04-01-2007, 09:51 AM
|
#13
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
No worries; I did the setup to hd2, since that's where the Windows boot and Linux ext partitions are.
Following the install (which was listed as successful), I exited grub and rebooted the machine right away.
Booting into grub and hitting <c>, and running find /boot/grub/stage2 gives:
which doesn't appear to be where I put it.
Contents of /boot/grub/device.map:
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
If I read the Windows boot failure correctly, the root cause of all of this is that I didn't carve out enough space on hd2 for Linux, and so the boot information is too far from the beginning of the drive. To be perfectly honest, right now my priority is getting bootability into Windows back; once that's restored, I'm happy to do whatever kind of start-from-scratch install is needed for the next attempt at getting Ubuntu to work.
As always, advice welcomed.
Edited to add: MBR reset, Windows booting again (good thing, too, since my wife is looking for a job and she apparently updated her CV since the last backups I took).
What I'm going to do is a bit of repartitioning before coming back for advice ... it looks like if I want to keep both Windows and Linux on the same boot drive, I need to make the ntfs partition smaller and get the Ubuntu root closer to the beginning of the drive.
Alternately, I'm considering shifting the 2x80GB HDDs; right now, they're set as mirror images, but I'd be willing to sacrifice the copy for a Linux-only drive (boot, swap, and a big hunk of fat32 for sharing between the two systems). In any event, some hard thinking to do before I take the next steps. Thanks all for your input, and if you have any suggestions I'm grateful for the input.
Gary
Last edited by gtyrrell; 04-01-2007 at 10:23 AM.
|
|
|
04-01-2007, 03:05 PM
|
#14
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,336
|
Quote:
Originally Posted by gtyrrell
If I read the Windows boot failure correctly, the root cause of all of this is that I didn't carve out enough space on hd2 for Linux, and so the boot information is too far from the beginning of the drive.
|
That's what it says. But don't worry doing any repartitioning - won't help.
I expected the result you got from the "find"; just needed confirmation. All the problems you are seeing are due to the "strange" arrangement you have with Windows on the third drive. Almost everything you read will say Windows must be on the first drive or it won't boot (using the M$oft loader). Which is almost true - it must be on the "boot" drive. The BIOS will start looking for a boot record on the first drive, then keep looking until it finds a valid boot record. Once it finds one, that drive becomes the boot (and thus first) drive. Confusing huh.
What we were all suggesting was you do "setup (hd0)" - then you wouldn't have seen these issue. Would probably require some fiddling with menu.lst to get Windoze sorted, but that's easy.
Edit: Added the italic text above for clarity.
Last edited by syg00; 04-01-2007 at 03:12 PM.
|
|
|
04-11-2007, 08:35 PM
|
#15
|
LQ Newbie
Registered: Mar 2007
Posts: 11
Original Poster
Rep:
|
Unexpected work travel, holiday kept me away
But I'm back now.
Thanks for the clarification about setting up grub on hd(0). I'll give that a try this weekend, hopefully -- I want to do some shifting of non-boot partitions first, make sure that I can share data between Windows and Linux.
So that I don't have to pester anybody, what should I be researching so that I can make the anticipated changes to menu.lst? Any good guides you can point me towards?
Gary
|
|
|
All times are GMT -5. The time now is 01:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|