UbuntuThis 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.
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.
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.
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:
Quote:
sudo grub
It should start the grub subsytem in terminal.
Quote:
Grub> root (sd2
after you type sd2 press tab key and it should list the partitions available, look for one with Ext3 filesystem
Quote:
Grub> root (sd2,1)
something like that, then it will display some info about where grub is located in that partition,
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.
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.
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,
Code:
grub> setup (hd0)
This would install grub to first HDD. when you reboot grub menu should come up- assuming you boot from first HDD.
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.
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.
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).
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
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 ???.
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:
Quote:
hd(0,1)
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.