Partition problems...

Asked by Ardain

My computer is a Dell Inspiron 640m and I am a complete newbie to Ubuntu.

My Problem:

I had Windows XP on the computer before I installed Ubuntu with an old 8.10 live cd.
After I installed Ubuntu, i Upgraded to 9.04. Then, when I rebooted to see if Xp still worked, in the GRUB boot loader, XP wasnt even in the menu. I didnt delete any Windows partitions, so i dont know what happened. Please help. This Dell is my personal use computer so I'd be glad to get a reply soon.

Thanks in advance!
~Ardain

Question information

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

Hi,
Can you post the output of your menu.lst file
type the following in a terminal window:
gksudo gedit /boot/grub/menu.lst

Revision history for this message
Tom (tom6) said :
#2
Revision history for this message
Tom (tom6) said :
#3

Please shutdown the machine NOW!!! Stop doing anything that might do read/writes to the hard-drive! The more you use it the less data you are likely to be able to retrieve from it.

Please then start up the machine and put the Ubuntu Cd in the Cd/Dvd-drive and before it finishes booting up do a reboot (power-switch or CtrlAltDel) so that you boot-up from the Ubuntu Cd
https://help.ubuntu.com/community/LiveCD
Note that this also works from a Usb-stick, not just from a Cd but we still call it a LiveCd session.

When you get to the LiveCd session see figure 3 to help you open up the partition editor, probably called "GPartEd" although it miht be "QtPartEd". Find the red "linux-swap" partition, right-click on it and do "Swap Off".

Ok, now you should be able to use Ubuntu straight off the Cd without touching your hard-drive at all :) Firefox should be able to connect and help you surf into here. Please let us know :)

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#4

Ok, you have said that you didn't delete any partitions when installing Ubuntu but just to make sure please work from a LiveCd session as described in my last post.

Please get to a command-line
https://help.ubuntu.com/community/UsingTheTerminal#Starting%20a%20Terminal
and copy&paste the output from this command into here

sudo fdisk -l

where " -l" is a lower-case " -L". The password is your normal user password, not your SuperUser/Root one and sudo wont give you any stars as you type.

Thanks and regards from
Tom :)

Revision history for this message
Ardain (adrian-chen88) said :
#5

@ubucrates:

# 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=e720cf61-aafc-4238-8c2d-912ef5903f3f ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=e720cf61-aafc-4238-8c2d-912ef5903f3f

## 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-15-generic
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro single
initrd /boot/initrd.img-2.6.28-15-generic

title Ubuntu 9.04, kernel 2.6.27-7-generic
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 9.04, kernel 2.6.27-7-generic (recovery mode)
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 9.04, memtest86+
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Revision history for this message
Ardain (adrian-chen88) said :
#6

@Tom: I don't really know what your're talking about in your second post.
Is what you're talking about, this?:

Disk /dev/sda: 78.5 GB, 78518522880 bytes
255 heads, 63 sectors/track, 9546 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0f4738c

   Device Boot Start End Blocks Id System
/dev/sda1 2 4620 37102117+ f W95 Ext'd (LBA)
/dev/sda2 4621 4863 1951866 82 Linux swap / Solaris
/dev/sda3 * 4864 9546 37616197+ 83 Linux
/dev/sda5 2 4620 37102086 7 HPFS/NTFS

Revision history for this message
Tom (tom6) said :
#7

Yes, fantastic :))
I am glad to see sda5 all safely there :)

So you can see your Windows data is all there on sda5 just by looking for the large "Media" in the "Places" menu?

Are you booted into a LiveCd session or are you using your hard-drive's Ubuntu at the moment?

Regards from
Tom :)

Revision history for this message
Ardain (adrian-chen88) said :
#8

@ Tom: I dont have my Ubuntu LiveCD currently, so I am using the hard drive. But I am not running programs except Firefox.

Revision history for this message
Tom (tom6) said :
#9

Ok, now i have seen the results of the "fdisk" command i am a lot less worried. This line is possibly good news
/dev/sda5 2 4620 37102086 7 HPFS/NTFS
particularly as it seems to be about half the full size of your drive :))

In the "Places" menu on the top taskbar you should be able to see a menu item something like

31.4 GiB Media

and inside that you should be able to see typically Windows folders, hopefully including "Documents & Settings" and "Windows"?

Since you are using the hard-drive lets try editing the menu.lst. Just type in

gksudo gedit /boot/grub/menu.lst

again and this time scroll right down to the very end of the whole thing and then just back a little way to this part

"
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-15-generic
"

Just before the line "## ## End Default Options ##" please copy & paste this stanza

title Windows
root (hd0,4)
makeactive
chainloader +1

and then save it. It would be good if you could copy the whole thing back into here again to check it's right ;)
Thanks and regards from
Tom :)

Revision history for this message
ubucrates (ubucrates) said :
#10

Hi,
Just as Tom said, copy and paste the following into your menu.lst file

title Windows
root (hd0,4)
makeactive
chainloader +1

if you place those lines just just above the following line:
### END DEBIAN AUTOMAGIC KERNELS LIST
you will see a Windows option at startup as the very last choice in the list.

Revision history for this message
Tom (tom6) said :
#11

Yes, i would place the Windows stanza just above all the Ubuntu ones and just before that magic separator. That way it will be the first one on the list and the default is already set to try booting from the first item in this list, which would now be Windows :)

Revision history for this message
Ardain (adrian-chen88) said :
#12

# 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=e720cf61-aafc-4238-8c2d-912ef5903f3f ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=e720cf61-aafc-4238-8c2d-912ef5903f3f

## 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-15-generic
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro single
initrd /boot/initrd.img-2.6.28-15-generic

title Ubuntu 9.04, kernel 2.6.27-7-generic
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 9.04, kernel 2.6.27-7-generic (recovery mode)
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=e720cf61-aafc-4238-8c2d-912ef5903f3f ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 9.04, memtest86+
uuid e720cf61-aafc-4238-8c2d-912ef5903f3f
kernel /boot/memtest86+.bin
quiet

title Windows
root (hd0,4)
makeactive
chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST

Is this right?

Revision history for this message
Ardain (adrian-chen88) said :
#13

I restarted my computer and the Windows option DID show up. The problem is that when i tried to open it, it had an error. It said, press any key to continue, and it went back to the grub list.

Revision history for this message
Tom (tom6) said :
#14

Yes the menu.lst looks right, perfect - even though it's not my preference it's still perfect :)

In Ubuntu please can you go up to the top taskbar and try to find the "Places" menu there? Somewhere in there should be the Windows drive, with any luck. Please let us know :)

Good luck and regards from
Tom :)

Revision history for this message
Ardain (adrian-chen88) said :
#15

I do see the Windows drive in the places menu. And all the files are still there. PLEASE help:(

Revision history for this message
zvacet (ivicakolic) said :
#16

@ Ardain

Do you have two Windows partitions (one for OS and second for data) and if yes then your menu list should look like this

### 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/sda1
title Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1

Revision history for this message
Tom (tom6) said :
#17

Zvacet, watch out the sda1 is only an Extended Partition. Check the numbers

/dev/sda1 2 4620 37102117+ f W95 Ext'd (LBA)
/dev/sda5 2 4620 37102086 7 HPFS/NTFS

sda5 is a Logical Partition inside sda1 so sda1 must be an Extended Partition. Good try tho :)

Ardain that line "root (hd0,0)" is unlikely to work but since the other one didn't either yu could try it. It really should be "root (hd0,4)" tho.

I don't know why it's not booting but think it's a Windows problem and it's too late where i am. All i can think of is whether you have a Windows Recovery Cd or something but even if you do take great care when using it. Usually they have a repair mode or something.

I can't help thinking that at the moment you have a good OS working on your machine and all your data is safe. I would seriously consider that a good win and a good point to start backing things up that really matter to you. Perhaps fixing a few things in Ubuntu like perhaps work all through this guide
https://help.ubuntu.com/community/Medibuntu
and then have a quick flick through
https://help.ubuntu.com/community/SwitchingToUbuntu/FromWindows

Because trying to fix this Windows problem right now could cause bigger problems
Good luck tho and regards from
Tom :)

Revision history for this message
Ardain (adrian-chen88) said :
#18

Oh. Wow. The Ubuntu community is really wonderful! I hadn't expected such great help from Ubuntu users. Ubuntu is such a good OS, its worth all this trouble to get it installed. Thanks Tom, and whoever else replied to this thread! You guys have really been a good help.

I guess all i can do to get windows working is to reinstall it...
Eh, ill try my best

Revision history for this message
Tom (tom6) said :
#19

Well there is always the "Repair" option from a Windows installer or recovery Cd and that might be able to do the trick. I would definitely copy all your prized data, photo albums, letters and so on onto an external drive or Dvd's or something before putting a Windows Cd in the machine.

Thanks for the flowers :) heheheheh

Note that if you can find out the product-key or licence number/code or whatever for the Windows install then that should work again when you re-install Windows. I think it even works if you also install Windows inside a Virtual Machine inside Ubuntu. Both versions of Windows would be simple reinstalls onto the same hardware :)

Using Synaptic
https://help.ubuntu.com/community/SynapticHowto
i found VirtualBox to be the easiest VM to access and it's amazingly easy to use, even on my machine with it's low(ish) ram :)

Good luck and regards from
Tom :)

Can you help with this problem?

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

To post a message you must log in.