LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 01-26-2008, 06:53 PM   #1
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Rep: Reputation: 15
Problem with grub dual booting windows xp and ubuntu 7.04


i have Ubuntu on an external hard drive and windows xp on both partitions on my internal Hard drive. when i boot up my computer it says loading grub 1.5 then shows grub error 17. i can start up the computer by putting in my windows install cd. i set the bootcfg to default exit and i have a choice between both Ubuntu and windows, but when i turn off or reset i get the same problem. i have a dimension 2400 (dell) and uh I don't know. what do i do?
 
Old 01-26-2008, 07:14 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Has this configuration worked in the past?

If GRUB is on the MBR of the internal drive and its files are on the external, it may have trouble finding them during boot.

Personally, I would put both operating systems on the internal drive and use the external for shared data, backup, etc. What are the sizes of the drives, how full, etc.?
 
Old 01-26-2008, 07:15 PM   #3
zoranp
Member
 
Registered: Nov 2007
Location: Belgrade, RS
Distribution: Mandriva 2009.0 X86_64
Posts: 44

Rep: Reputation: 15
Once you restart computer, the sequence of your drives change. Maybe this link will help.

https://answers.launchpad.net/ubuntu...question/14606
 
Old 01-26-2008, 07:31 PM   #4
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Original Poster
Rep: Reputation: 15
my internal hardrive has two partitions
C: total:19.5
Free:8.99
D: total:54.9
Free: 29.6
External
F: total: 348
free: 344

The other half of my external is used for linux..

if im supposed to do anything, can you explain how? im such a noob at this
 
Old 01-26-2008, 07:38 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,098

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Quote:
Originally Posted by Frozen.past View Post
i can start up the computer by putting in my windows install cd. i set the bootcfg to default exit and i have a choice between both Ubuntu and windows
I don't understand this - is this the (Ubuntu) grub menu, or did you update the XP menu (boot.ini) to include both XP and Ubuntu ???.
You also haven't answered the question above - did this(dual boot) ever work properly ???.
 
Old 01-26-2008, 07:59 PM   #6
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Original Poster
Rep: Reputation: 15
i dont know what grub is im just seeing it everywhere...
I just started to use this configuration...
what i did was use the repair function on the windows install cd and did bootcfg /default
 
Old 01-26-2008, 08:00 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by Frozen.past View Post
if im supposed to do anything, can you explain how?
Sure---what do you want to do?

To get the current setup working you have to tell us more about how it got that way, and what might have changed. Is the info supplied by zoranp relevant? (One possibility is that there are other external devices that are changing the drive order.)

If you want to put both operating systems on the internal drive, we can help you with that too. It seems that you have lots of total drive space, and the change would be pretty easy.
 
Old 01-26-2008, 08:06 PM   #8
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Original Poster
Rep: Reputation: 15
the link zoranp gave wasnt relevant.
how i got here....i partitioned the external drive to put linux on and then installed it? i dont know what else to say..
if the external drive is changing the order how would i stop that?
 
Old 01-26-2008, 08:52 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,098

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Get into Ubuntu, then insert a USB stick, then go to a terminal and issue these commands - post all the output
Code:
sudo fdisk -l
df -hT
egrep -v "(^#|^\s*$)" /boot/grub/menu.lst
 
Old 01-27-2008, 07:14 AM   #10
zoranp
Member
 
Registered: Nov 2007
Location: Belgrade, RS
Distribution: Mandriva 2009.0 X86_64
Posts: 44

Rep: Reputation: 15
OK, let's try again.

GRUB is rather agnostic of thing such as hda, hdb, sda, sdb, ... It refers to disks as
(fd0) - floppy disk
(hd0) - (from its point of view) the first disk in the system
(hd1,1) - second partition of the (from its point of view) second disk in the system
etc.

To learn how GRUB refers to your disks, do
$ cat /boot/grub/device.map

The sequence of the disks in the system during instalation is not necessarily the one you will have after reboot (especially if you mix PATA and SATA disks and this is dependent on your MB BIOS settings). I have one PATA and one SATA disk. During the instalation they are /dev/sdb (PATA) and /dev/sda (SATA), i.e. /boot/grub/device.map which is written is
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb

After reboot, sda becomes sdb and sdb becomes sda, and I get boot error. Re-instalation is of no help.

Solution is to learn about new layout and manually adjust
/boot/grub/device.map, and
/boot/grub/menu.lst

So, my new /boot/grub/device.map should read
(fd0) /dev/fd0
(hd0) /dev/sdb
(hd1) /dev/sda

and I must adjust /boot/grub/menu.lst accordingly (sdb => sda, sda => sdb).

Use previously provided link to learn about new layout.
 
Old 01-27-2008, 12:00 PM   #11
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Original Poster
Rep: Reputation: 15
jeremy@jeremy-desktop:~$ sudo fdisk -~
Password:
fdisk: invalid option -- ~

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors



Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb2 ext3 343G 2.5G 323G 1% /
varrun tmpfs 506M 104K 505M 1% /var/run
varlock tmpfs 506M 0 506M 0% /var/lock
procbususb usbfs 506M 128K 505M 1% /proc/bus/usb
udev tmpfs 506M 128K 505M 1% /dev
devshm tmpfs 506M 0 506M 0% /dev/shm
lrm tmpfs 506M 33M 473M 7% /lib/modules/2.6.20-16-generic/volatile
/dev/sdb1 ntfs 349G 3.9G 345G 2% /media/New Volume
/dev/scd0 iso9660 534M 534M 0 100% /media/cdrom0
/dev/sdc1 vfat 3.9G 1.6G 2.3G 40% /media/disk


jeremy@jeremy-desktop:~$ egrep -v "(^#|^\s*$)" /boot/grub/menu.lst
default 0
timeout 10
title Ubuntu, kernel 2.6.20-16-generic
root (hd1,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=e0c96b6d-3de3-4785-a93b-8ccdc44a13f2 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd1,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=e0c96b6d-3de3-4785-a93b-8ccdc44a13f2 ro single
initrd /boot/initrd.img-2.6.20-16-generic
title Ubuntu, kernel 2.6.20-15-generic
root (hd1,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=e0c96b6d-3de3-4785-a93b-8ccdc44a13f2 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd1,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=e0c96b6d-3de3-4785-a93b-8ccdc44a13f2 ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd1,1)
kernel /boot/memtest86+.bin
quiet
title Other operating systems:
root
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
 
Old 01-27-2008, 12:12 PM   #12
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Original Poster
Rep: Reputation: 15
just realized that i did the first one wrong..

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 9725 57633187+ f W95 Ext'd (LBA)
/dev/sda5 2551 9725 57633156 7 HPFS/NTFS

Disk /dev/sdb: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 45457 365133321 7 HPFS/NTFS
/dev/sdb2 * 45458 90824 364410427+ 83 Linux
/dev/sdb3 90825 91201 3028252+ 5 Extended
/dev/sdb5 90825 91201 3028221 82 Linux swap / Solaris

Disk /dev/sdc: 4098 MB, 4098883584 bytes
128 heads, 63 sectors/track, 992 cylinders
Units = cylinders of 8064 * 512 = 4128768 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 992 3999649 c W95 FAT32 (LBA)
 
Old 01-27-2008, 12:14 PM   #13
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Frozen;
He said fdisk -l. If you look at the output you got from "fdisk", you'll see the "-l" option. YOU FIXED IT WHILE I WAS TYPING!!

What we know so far:
When running from Linux, we have the root (/) of the filesystem on sdb2---ie the 2nd partition of the second drive. Presumably, this means that Linux knows that the internal drive (sda) is there.

The grub config file (menu.lst) says that grub files will be found on (hd1,1). This is "grubspeak" for 2nd drive, 2nd partition. So far, so good.

since you can boot into Linux, we can try some things.

First, re-install GRUB using the following commands:
sudo grub
root (hd1,1)
setup (hd0)

Reboot and see what happens. If it still doesn't work, then get back to Linux using whatever method you did before, and try the same commands, but use root (hd0,1)

Another option:
From Linux, try putting GRUB on a floppy like so:
sudo grub
root (hd1,1)
setup (fd0)

then try booting from the floppy. If it doesn't work, try the same variant: root (hd0,1)


If you get tired of this, then try putting Linux on the internal drive......

Last edited by pixellany; 01-27-2008 at 12:18 PM.
 
Old 01-27-2008, 12:20 PM   #14
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
ok--the fdisk output matches everything else so far. Try one or more of my suggestions above
 
Old 01-27-2008, 12:33 PM   #15
Frozen.past
LQ Newbie
 
Registered: Jan 2008
Posts: 21

Original Poster
Rep: Reputation: 15
i think we should just move everything internal... doesnt look like it wants to work and my computer does not have a floppy drive....
 
  


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
Partition rearrangement & dual booting Ubuntu/XP via GRUB VoidRoamer Linux - Hardware 9 04-29-2007 08:32 AM
trouble dual booting Ubuntu and Fedora Core 4 with GRUB. bgryderclock Linux - Software 5 04-04-2007 12:46 PM
Problem dual-booting into windows xp with Grub justintime32 Debian 4 03-26-2005 12:27 PM
Dual-booting Ubuntu using Grub fails tsalem Linux - Newbie 10 01-25-2005 09:47 PM
Dual booting redhat 9 with windows XP using GRUB TechnoBod Linux - Software 2 07-09-2003 06:58 AM


All times are GMT -5. The time now is 07:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration