LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot login in windows after i installed Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-login-in-windows-after-i-installed-ubuntu-752488/)

drunkenbrawler 09-03-2009 02:50 PM

Cannot login in windows after i installed Ubuntu
 
I am a regular Windows user and have decided to use Ubuntu as i have heard it is good.

I have two hard-discs. 1 is 80Gb PATA disc and other 1 is 160Gb SATA disc. I have Windows XP- service pack 2 installed on SATA disc which is my secondary boot device (first being my CD-ROM).

I installed Ubuntu 8.10 on my 2nd hard-disc (PATA) and then restarted the computer. At that moment i got an error message saying
"DISC BOOT FAILURE. PLEASE INSERT THE SYSTEM DISC IN TRAY AND TRY AGAIN"

After this, i went in the boot menu and tried to boot in Windows but the same error kept on repeating.
I can select to boot in my secondary hard-disc and boot in Ubuntu without (till this moment) any problem.

I am happy with Ubuntu but i need to boot in Windows for using softwares for my academics.

I have used Windows for long time but i am completely new in Linux world.
my system configuration is

Pentium 4 processor, 2.6 GHz,
1.2 Gb RAM, 64 Mb on-board graphics card,
160 Gb SATA hard disc (secondary boot device)
80 Gb PATA hard disc (tertiary boot device)

Any help will be greatly appreciated.

jimjones 09-03-2009 03:09 PM

the right way to go about dualbooting is to use a bootloader like grub - not messing with bootorder in bios

you get the option to install this during the linux install - it will even detect your windows and automagically configure the shebab

have never tried to install grub after install but i suppose its possible - find yourself a howto (good starting place is the grub site)

jstephens84 09-03-2009 05:24 PM

By default grub should be installed. when you boot up to Ubuntu can you post the output of /boot/grub/menu.lst? If you look down through there you should see something that might say
Code:

title windows vista
rootnoverify (hd0,0)
chainloader +1

you may have to change your (hd0,0) to say (hd0,1) if you have a recovery partition. This is also assuming that you have your windows installation on the first hard drive also. If is is on the second hard drive you may need to change it to (hd1,0) or (hd1,1)

drunkenbrawler 09-03-2009 08:16 PM

@jimjones

I have Grub installed by default. When i boot in Ubuntu, it says "Grub loading..." etc. I have installed Ubuntu once before and it used to show Ubuntu and Windows before booting, allowing me to choose OS to boot.

@jstephens84

I could not clearly understand what you want me to do. so i typed "/boot/grub/menu.lst" in terminal. It displayed on next line "permission denied". Is that what you wanted me to do? Do i have to get some privileges to do this? and if yes, how do i do that?

thanks for your replies :)

yancek 09-03-2009 09:05 PM

The menu.lst file in /boot/grub/ directory is only accessible with root privileges. Type: "sudo". you will be prompted for your user password, enter it, hit Enter key and then type vi /boot/grub/menu.lst. vi is a text editor, if you aren't familiar with it, use nano or whatever text editor you have with Ubuntu. If you're not familiar with the menu.lst file, post it here. It would also be a good idea to post the output of "sudo fdisk -l" (lower case Letter L in that command) as that gives your partition informaiton.

jstephens84 09-03-2009 09:06 PM

Quote:

Originally Posted by drunkenbrawler (Post 3668979)
@jimjones

I have Grub installed by default. When i boot in Ubuntu, it says "Grub loading..." etc. I have installed Ubuntu once before and it used to show Ubuntu and Windows before booting, allowing me to choose OS to boot.

@jstephens84

I could not clearly understand what you want me to do. so i typed "/boot/grub/menu.lst" in terminal. It displayed on next line "permission denied". Is that what you wanted me to do? Do i have to get some privileges to do this? and if yes, how do i do that?

thanks for your replies :)

if you use the cat command you can read what is in the menu.lst file.
Code:

cat /boot/grub/menu.lst
if that command does not work then place sudo in front of cat. this should display what is in the menu.lst file. What we need you to post is the output from that command.

drunkenbrawler 09-03-2009 09:18 PM

I typed cat /boot/grub/menu.lst. It worked. I don't know exactly what to paste, so i'm posting this :

Code:

# 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                3

## 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

also, i did "sudo fdisk -l"
output was as following
Code:


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb067f032

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        2550    20482843+  7  HPFS/NTFS
/dev/sda2            2551      19457  135805477+  5  Extended
/dev/sda5            2551        5099    20474811    7  HPFS/NTFS
/dev/sda6            5100        8923    30716248+  7  HPFS/NTFS
/dev/sda7            8924      12747    30716248+  7  HPFS/NTFS
/dev/sda8          12748      19457    53898043+  7  HPFS/NTFS

Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe99ee99e

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        2550    20482843+  83  Linux
/dev/sdb2            2551        2677    1020127+  82  Linux swap / Solaris
/dev/sdb3            2678        9733    56677320    5  Extended
/dev/sdb5            2678        9733    56677288+  7  HPFS/NTFS


jstephens84 09-03-2009 09:23 PM

Ok so you will need to check your menu.lst and make sure that the rootnoverify has (hd0,0) next to it. hd0 is the first hard drive on your computer and the next 0 means use the first partition on that system.

looks like you didn't get all the information as there should be more.

if you do
Code:

cat /boot/grub/menu.lst | less
this should allow you to scroll up and down using the arrow keys. However I would verify the information about the rootnoverify first.

drunkenbrawler 09-03-2009 09:54 PM

Here is complete output of menu.lst file
Quote:

# 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 3

## 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=313d3f5d-a0e7-4bd0-a389-aca7cdb261dd ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=313d3f5d-a0e7-4bd0-a389-aca7cdb261dd

## 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

## 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 8.10, kernel 2.6.27-14-generic
uuid 313d3f5d-a0e7-4bd0-a389-aca7cdb261dd
kernel /boot/vmlinuz-2.6.27-14-generic root=UUID=313d3f5d-a0e7-4bd0-a389-aca7cdb261dd ro quiet splash
initrd /boot/initrd.img-2.6.27-14-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-14-generic (recovery mode)
uuid 313d3f5d-a0e7-4bd0-a389-aca7cdb261dd
kernel /boot/vmlinuz-2.6.27-14-generic root=UUID=313d3f5d-a0e7-4bd0-a389-aca7cdb261dd ro single
initrd /boot/initrd.img-2.6.27-14-generic

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 313d3f5d-a0e7-4bd0-a389-aca7cdb261dd
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=313d3f5d-a0e7-4bd0-a389-aca7cdb261dd ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 313d3f5d-a0e7-4bd0-a389-aca7cdb261dd
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=313d3f5d-a0e7-4bd0-a389-aca7cdb261dd ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 313d3f5d-a0e7-4bd0-a389-aca7cdb261dd
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

jstephens84 09-03-2009 10:07 PM

ok try this.

First we create a backup
Code:

cp /boot/grub/menu.lst /boot/grub/menu.lst_bkup_09032009
then using vim do the following
Code:

sudo vim /boot/grub/menu.lst
then go to the last line. I believe that shift+g will get you to the last line. Then hit the i key for insert mode. then add the following at the bottom
Code:

title          Windows XP (loader)
rootnoverify    (hd0,0)
chainloader    +1

then hit the escape key then hit the following :wq which means to write and quite. Then try rebooting your pc and selecting Windows XP. That should get you back into windows and a fully working dual boot system.

drunkenbrawler 09-03-2009 10:18 PM

I did something i was told on ubuntuforums and it had some change but not the solution.

I was told to
Quote:

Boot into Ubuntu, when the desktop loads open a terminal and run this command:
Code:

gksu gedit /boot/grub/menu.lst
That is a lowercase L in .lst

Scroll down to this line
### END DEBIAN AUTOMAGIC KERNELS LIST


and add this under it skipping a line
Code:

title          Windows XP
rootnoverify  (hd0,0)
chainloader    +1

click Save on the toolbar and close the file.
Reboot. Keep your 160 GB disk (sda) first in hard disk boot order in BIOS. This will bring up GRUB when you boot. Select the windows entry and boot into windows
I did as mentioned above

After that i restarted and increased the priority of my SATA drive in boot configuration to make it first boot device in hard-discs.

After that i saw message "Grub loading. press ESC to enter boot menu."

As i pressed ESC, i saw familiar boot menu that allowed to select OS to boot in...

I selected Windows XP and i got following message.
Quote:


NTLDR missing
Press CTRL+ALT+DELETE to restart

there was nothing there except this message on black screen

What do i do now? Do i need to restore original menu.lst?

jstephens84 09-03-2009 10:29 PM

No we are actually getting somewhere. NTLDR is the boot loader for windows. You may just need to keep changing the (hd0,0) to 5. I see that you have several partitions on that system so I can't say which one for sure is your c drive. But since 0 didn't work try (hd0,4).

drunkenbrawler 09-03-2009 11:14 PM

I tried all the variations from 0 to 4.
For 1 to 4, after I select Windows XP, it displayed "Starting up..." but that was all. It hung up there for ever. :(

For 0, It was
Quote:

Starting up...

NTLDR missing
Press ctrl+alt+delete to restart
:-?

jimjones 09-04-2009 03:18 AM

i have no id how grub exactly numbers its drives -
you could try (hd1,0) (or 1,2 ...)

bonne chance

drunkenbrawler 09-04-2009 06:45 AM

I tried hd1,0 but it displayed

Quote:

error 13: invalid or unsupported execution
press any key to continue
after pressing any key, i was redirected to GRUB boot menu.

I think the hard-disc hd1 is the hard-disc with Ubuntu because whilw booting in Ubuntu it shows

Quote:

Booting from hd1,0 ext3 partition
so what do i do now? :-?


All times are GMT -5. The time now is 04:57 AM.