PDA

View Full Version : [ubuntu] 9.04 installation issue



SgtEich
September 28th, 2009, 09:36 PM
I'm trying to setup a dual boot system with xp/ubuntu. I have xp installed and a second HD for ubuntu. What I've done is install ubuntu, taking the defaults onto the second harddrive - the issue i'm having is where's grub? - I boot directly into windows.

Did I miss something during the install? Maybe my memory is getting poor with my old age, but I could have sworn to dual boot all i basically had to do was boot from the live cd - run the install - reboot and there's grub all setup?

Thanks in advance for your help.

sgteich

tommcd
September 29th, 2009, 11:47 AM
Perhaps grub got installed to the second hard drive instead of the MBR of the first hard drive. Try setting the second drive as the first boot device in the BIOS and see if you get the grub menu and can boot ubuntu.
If this works, you can set the ubuntu drive as the first hard drive in the BIOS (or as master hard drive if they are IDE) and the windows drive as the second drive in the BIOS (or slave if IDE) and edit the /boot/grub/menu.lst file according to these threads so you can also boot windows:
http://ubuntuforums.org/showthread.php?p=677880#post677880
http://ubuntuforums.org/showthread.php?t=179902
Hope this helps.

Bartender
September 29th, 2009, 02:31 PM
+1
If Ubuntu is installed entirely to the second drive (basically all I mean by that is that GRUB Stage 1 did not tweak the Windows MBR on the first HDD) you should have a "quick-boot" option somewhere in your BIOS so that as the PC is starting up you tap on a certain key a few times and you get a window asking which device you want to boot to. This is a feature of your BIOS, not a Windows feature nor a Linux feature. It is NOT the same as changing boot priority in BIOS.

Try f8. That's a common key for this feature. There are a few other keys, depending on the BIOS. f8 gives you Safe Mode once Windows starts to boot, but if you tap on it before Windows starts it may give you the "quick-boot" option.

SgtEich
September 30th, 2009, 02:24 PM
I'm able to do the f8 trick to boot from the second drive. I get a no os found error. I have 3 ide drives (1 master/1 slave on one ide channel and a cdrom drive on the other) and 2 sata drives. I boot from the IDE drives and the 2 sata drives are for storage. If I boot from the live cd, do a sudo grub and then a find/boot/grub/stage1 i get hd3,0 for a responce. I've set the root to that and the setup to hd2 and it appears to write to hd2. When I do an fdisk -l it shows sda and sdb as the sata drives and sdc as the ide drive with windows installed and sdd as the drive with linux installed. After doing this, I reboot and I get a grub error 17. I'm not sure what to do at this point. I'm thinking of disconnecting the sata drives and trying a reinstall of ubuntu when I get home this evening to see if grub will be properly written to the boot drive. If there are any other suggestions - I'm all ears as it were.

Thanks

Sgteich

Bartender
September 30th, 2009, 04:03 PM
Since your BIOS supports the f8 "quick-boot" option, you might also want to try unplugging ALL drives except for the Ubuntu drive and install to that drive. If the Ubiquity installer sees only one drive it will place GRUB Stage 1 on that drive. GRUB Stage 1 is that little bit of data that is by default placed on the Windows drive (if the installer detects a Windows drive) and that's what causes a lot of confusion.

I'd imagine if we were to add up all the posts, questions over the GRUB bootloader are near the top of the list.

If you unplug all other drives, everything will go to the one detected drive during installation and you'll have to do the f8 trick. If you find yourself booting to the Ubuntu drive more than the Windows drive you could always change BIOS and/or physical connections to the motherboard so that Ubuntu became the primary drive, or you could reinstall GRUB (thousands of posts on this subject) so that it places GRUB Stage 1 on the Windows drive.

I've heard of problems with systems running PATA and SATA. I don't know if this is an issue with how BIOS detects the drives or what. Another thing to try is installing Ubuntu entirely to the one drive, then restarting the PC with just that one drive connected. See if it'll boot to Ubuntu. Plug some or all of your other drives in and see if it loses it's way, then work back the other direction if you need to. Try to isolate the problem.

presence1960
September 30th, 2009, 04:15 PM
Before you reinstall do this:

Let's get a better look at your setup & boot process. Boot the Ubuntu Live CD. Choose "try ubuntu without any changes", when the desktop loads come back here and use the link in my signature to download the Boot Info Script 0.32 to the desktop. Once on desktop open a terminal and run this command
sudo bash ~/Desktop/boot_info_script*.sh This will create a RESULTS.txt file on the desktop. Paste the entire contents of that file back here. Once pasted highlight all text and click the # sign on the toolbar to place code tags around the text.

SgtEich
October 1st, 2009, 01:14 AM
============================= Boot Info Summary: ==============================

=> Grub0.97 is installed in the MBR of /dev/sda and looks on boot drive #4 in
partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> Grub0.97 is installed in the MBR of /dev/sdb and looks on boot drive #4 in
partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> Windows is installed in the MBR of /dev/sdc
=> Windows is installed in the MBR of /dev/sdd

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sdb1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sdc1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM

sdd1: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.04
Boot files/dirs: /boot/grub/menu.lst /etc/fstab

sdd2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sdd5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders, total 586072368 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0000c860

Partition Boot Start End Size Id System

/dev/sda1 * 63 586,051,199 586,051,137 7 HPFS/NTFS


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders, total 586072368 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0000971f

Partition Boot Start End Size Id System

/dev/sdb1 63 586,067,264 586,067,202 7 HPFS/NTFS


Drive: sdc ___________________ __________________________________________________ ___

Disk /dev/sdc: 81.9 GB, 81964302336 bytes
240 heads, 63 sectors/track, 10587 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x5135775a

Partition Boot Start End Size Id System

/dev/sdc1 * 63 160,060,319 160,060,257 7 HPFS/NTFS


Drive: sdd ___________________ __________________________________________________ ___

Disk /dev/sdd: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xffffffff

Partition Boot Start End Size Id System

/dev/sdd1 63 153,468,944 153,468,882 83 Linux
/dev/sdd2 153,468,945 160,071,659 6,602,715 5 Extended
/dev/sdd5 153,469,008 160,071,659 6,602,652 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="D604C94D04C930F3" TYPE="ntfs"
/dev/sdb1: UUID="98D00791D0077532" LABEL="Backup" TYPE="ntfs"
/dev/sdc1: UUID="D0BCA709BCA6E964" TYPE="ntfs"
/dev/sdd1: UUID="635a389d-8d18-44e3-bb32-2b76469ddce5" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdd5: UUID="df700aa0-6157-404a-aad2-cce45e664c45" TYPE="swap"

=============================== "mount" output: ===============================

proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /lib/modules/2.6.28-11-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/modules/2.6.28-11-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)


================================ sdc1/boot.ini: ================================

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect


=========================== sdd1/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=635a389d-8d18-44e3-bb32-2b76469ddce5 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=635a389d-8d18-44e3-bb32-2b76469ddce5

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 635a389d-8d18-44e3-bb32-2b76469ddce5
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=635a389d-8d18-44e3-bb32-2b76469ddce5 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 635a389d-8d18-44e3-bb32-2b76469ddce5
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=635a389d-8d18-44e3-bb32-2b76469ddce5 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid 635a389d-8d18-44e3-bb32-2b76469ddce5
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdc1
title Microsoft Windows XP Professional
rootnoverify (hd2,0)
savedefault
makeactive
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1


=============================== sdd1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sdd1 during installation
UUID=635a389d-8d18-44e3-bb32-2b76469ddce5 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sdd5 during installation
UUID=df700aa0-6157-404a-aad2-cce45e664c45 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

=================== sdd1: Location of files loaded by Grub: ===================


17.0GB: boot/grub/menu.lst
17.0GB: boot/grub/stage2
16.9GB: boot/initrd.img-2.6.28-11-generic
16.9GB: boot/vmlinuz-2.6.28-11-generic
16.9GB: initrd.img
16.9GB: vmlinuz

presence1960
October 1st, 2009, 02:29 AM
you have GRUB installed on the wrong disks. Your sdc disk is booting first in BIOS that is why you boot right into windows. This is what I would do. I would install GRUB to sdd then reboot and go into BIOS and make sdd boot first , then sdc, then the other two disks. You want to set the hard disk boot order in BIOS that way.

First set up GRUB again:

1. Boot your computer up with Ubuntu CD
2. Open a terminal window or switch to a tty.
3. Type sudo grub. Should get text of which last line is grub>
4. Type "find /boot/grub/stage1". You'll get a response like "(hd3,0)".
Use whatever your computer spits out for the following lines.
5. Type "root (hd3,0)", or whatever your hard disk + boot partition
numbers are for Ubuntu.
6. Type "setup (hd3)", to install GRUB to MBR
7. Quit grub by typing "quit".
8. Reboot and remove the bootable CD.

Then reboot and reset the hard disk boot order in BIOS to sdd (82 GB), sdc (82 GB), sda (300 GB) and sdb (300 GB). This order is critical! Save changes to CMOS and continue booting into Ubuntu.

Now you need to add the windows entry to menu.lst. Open a terminal and run this command
gksu gedit /boot/grub/menu.lst
That is a lowercase L in .lst

change your windows entry to:


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdc1
title Microsoft Windows XP Professional
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1


click save at top toolbar, close file and reboot. try windows when the GRUB menu comes up.

SgtEich
October 2nd, 2009, 12:21 AM
Thanks - that's done the trick. But i think next time I rebuild I'm going to disable my sata drives and save myself some headaches.

Sgteich

presence1960
October 2nd, 2009, 12:24 AM
Thanks - that's done the trick. But i think next time I rebuild I'm going to disable my sata drives and save myself some headaches.

Sgteich

Glad you got it working! Enjoy Ubuntu.