noob installs ubuntu after xp, no option to choose os on startup xp boots automatically

Asked by Louis Samuel

noob (me) installs ubuntu 10.04 after xp, no option to choose os on startup xp boots automatically

i have done some reading and tried install with a few different cds burnt at different speeds, different versions (32/64 bit, both 10.04)

tried to install grub to mbr through command line (boot from cd):

mount | tail -1

get this

ubuntu@ubuntu:~$ ls /media//media/8c52892b-02ed-4a20-b891-95da2cc0cb4d/boot
ls: cannot access /media//media/8c52892b-02ed-4a20-b891-95da2cc0cb4d/boot: No such file or directory

this is all totally new to me so any help is much appreciated :)

dual core intel, intel chipset, sata (primary master) 150gb main drive has xp and apparently ubuntu, ide 200gb (3rd master with cd as slave) just data

also get i/o error after install but ive read this is just a bug......

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you mount the partition in the places menu in the LivCD desktop environment. You can the chroot to the installed system and edit /etc/default/grub to increase the timeout. If you have 2 physical drives with Ubuntu on a different drive to Windows then you will simply need to change the bootable device in BIOS.

Revision history for this message
Louis Samuel (louissamuel147) said :
#2

Thanks for your response, i have opened /etc/default/grub and have this, not sure what to edit?

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

how can i find out where grub is installed? i've read i need to install it to the mbr and have tried to do this but i don't know how to check where it is installed..... if you know of any good guides i could look at or something that would be great :) or the best method of installing to the mbr

i do have a second hd but have disconnected it at the moment to try to get this to work. at the moment i seem to have 2 installs of ubuntu on the same drive as xp

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Is that the file from the live CD or on the mounted partition? Editting the one on the CD will achieve nothing.

the path of the file will be something like this:

/media/849e9aae-99c4-4d47-803b-6ede182d0863/etc/default/grub

Your hex-named-folder WILL be different.

If that IS the right file, you can run:

gksudo gedit

Open the file as writable and change:
GRUB_TIMEOUT=10
to
GRUB_TIMEOUT=0

And it will wait forever. You will need to then chroot to the mounted folder and run:
sudo update-grub

To apply the setting. Use the command:

sudo chroot /media/849e9aae-99c4-4d47-803b-6ede182d0863

You can also run:
sudo grub-install /dev/sda

To make sure grub is installed ok. You may just need to run sudo update-grub

Revision history for this message
Louis Samuel (louissamuel147) said :
#4

when i mount the partition ubuntu is installed on through places the folder named media is empty

out of interest i had a look on the cd and it does have a folder similar name to 849e9aae-99c4-4d47-803b-6ede182d0863 in media

do you think its a problem with the install?

Revision history for this message
Louis Samuel (louissamuel147) said :
#5

ignore that ive worked out the file name...

Revision history for this message
Louis Samuel (louissamuel147) said :
#6

ok

prompt on terminal has changed from ubuntu@ubuntu:~$ to root@ubuntu:/# after the chroot command

when I do the below with the partition mounted though

root@ubuntu:/# sudo grub-install /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
No path or device is specified.
Try `/usr/sbin/grub-probe --help' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

root@ubuntu:/# sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
root@ubuntu:/#

any ideas? :s

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

you can chroot to the folder name and run the commands, it should run the commands on the installed system rather than the live cd. This is one very powerful aspect in Linux.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8
Revision history for this message
delance (olivier-delance) said :
#9

In a terminal (Applications->Accessories->Terminal), type the following command:
    sudo parted -l
where "-l" is lowercase "L". This will display list of partition.
I need it to get a better understanding of you problem.

Revision history for this message
Louis Samuel (louissamuel147) said :
#10

thanks very much for your help guys, last night did fresh install of xp and then installed ubuntu again, all works fine now although i am interested to know a few things.

i formatted around 20gb primary partition for the xp install
ubuntu install has increased this to 47gb and ubuntu partition now takes up the rest of drive as extended partition. i am going to look at resizing this but i am curious to know why it has done this. selected install option of installing side-by side and choosing between them at startup

louis@louis-desktop:~$ sudo parted -l
[sudo] password for louis:
Model: ATA SAMSUNG HD161HJ (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 47.0GB 47.0GB primary ntfs boot
 2 47.0GB 160GB 113GB extended
 5 47.0GB 155GB 108GB logical ext4
 6 155GB 160GB 4639MB logical linux-swap(v1)

again thanks very much for looking at this for me :)

Revision history for this message
delance (olivier-delance) said :
#11

I'm surprised because the installer (Ubiquity) doesn't change by itself size of Windows partition.
I did for testing half a dozen installation of Ubuntu with XP (on virtual machines) and I saw any change in Windows partition size.
If your computer now works well, could you mark question as "Solved" ?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#12

Your windows partition is set as bootable, you need to change the bootable partition to /dev/sda5

You will need fdisk for this:

sudo fdisk /dev/sda
press A
press 5
press W

Then if you are asked if you are sure press y or type yes or whatever it needs, reboot to test.

Can you help with this problem?

Provide an answer of your own, or ask Louis Samuel for more information if necessary.

To post a message you must log in.