LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-07-2008, 10:27 AM   #1
Mynameisalex
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 6

Rep: Reputation: 0
Problems running a dual boot system


Single Hard Drive - 500 Gigs


I am currently running Win XP Pro and decided to dual boot with linux ubuntu 7.10. while installing it prompted me to choose how to install into my system. I chose to manually partition my drive but it never allowed me to partition the drive. now when i boot up my system, it only reads that the ubuntu partition which is only 2.6 Gb. It is not locating the rest of my 500Gigs. Now i am unable to locate my windows xp system and when i choose to use GRUB before starting up my system, it cannot see any other partitions. I am completely new to linux, i hope someone can answer my problem. I do not suspect that the previous information on my hard drive was erased.
 
Old 01-07-2008, 11:03 AM   #2
away
LQ Newbie
 
Registered: Oct 2007
Posts: 12

Rep: Reputation: 0
You need the create a new stanza in /etc/grub.conf if you have not deleted your xp partition, because I can not quite understand what do you mean by " it never allowed me to partition the drive" if you have selected manual partitioning.
Please post here the output of /sbin/fdisk -l
 
Old 01-07-2008, 11:12 AM   #3
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
re-editing my post, as my post was similar to away.

BTW, never partition the drive manually unless you have experience doing so. You can lose data if not done correctly.

If windows xp has setup to use the whole 500g, you need to resize the the windows partition during the linux installation. The most common utility is called gparted. Before resizing the hard drive, backup any files you do not want to lose and defrag the hard drive. These two steps prior to resizing is optional, but is recommended.

If you want a dedicated linux partion, then you need to re-partition the drive.

Last edited by dv502; 01-07-2008 at 11:57 AM.
 
Old 01-07-2008, 04:57 PM   #4
Mynameisalex
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
how do i locate the xp partition if it is hidden though? I want to get back to XP and delete my linux partition, and re-do to installation by properly partitioning my drive. right now i am stuck in linux though. i am not quite sure how gparted works.
 
Old 01-07-2008, 05:15 PM   #5
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
As mentioned from away, run the fdisk command. This will tells us if win xp has been deleted or not. Since you are using ubuntu, open a terminal window and type

Code:
sudo fdisk -l
Thats a letter l, not the number one.

Highlight the output from fdisk, then from the terminal click edit > copy. And paste the info in your next post.

Last edited by dv502; 01-07-2008 at 05:22 PM.
 
Old 01-07-2008, 07:36 PM   #6
Mynameisalex
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
when i open a terminal and type that command it comes up with...


[sudo] password for alex:

is that supposed to be my login password? because it says sorry, try again
 
Old 01-07-2008, 08:07 PM   #7
Mynameisalex
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
sorry about that. im just getting used to linux. i had to boot in single-user and reset my root password. this is what came up when i entered the command...

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x21c221c2

Device Boot Start End Blocks Id System
/dev/hda1 1 60045 482311431 83 Linux
/dev/hda2 60046 60453 3277260 5 Extended
/dev/hda3 * 60454 60801 2795310 83 Linux
/dev/hda5 60046 60429 3084448+ 82 Linux swap / Solaris
/dev/hda6 60430 60453 192748+ 82 Linux swap / Solaris




- now this is where you guys help me. i never chose to delete existing partitions, i dont see how my xp system and information would have gotten erased. especially because my linux system claims that i only have 2.7 gigs of HDD space. good thing i recently backed up most of my information though...*phew*
 
Old 01-08-2008, 12:06 AM   #8
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Device Boot Start End Blocks Id System
/dev/hda1 1 60045 482311431 83 Linux
/dev/hda2 60046 60453 3277260 5 Extended
/dev/hda3 * 60454 60801 2795310 83 Linux
/dev/hda5 60046 60429 3084448+ 82 Linux swap / Solaris
/dev/hda6 60430 60453 192748+ 82 Linux swap / Solaris

/dev/hda1
is the 500g partion. If this is your windows partition. it should have an ID of 7 for NTFS or c for w95B FAT32 LBA. Right now it is at 83 for linux.

/dev/hda3 is the 2.7g partition. ID is 83. Correct

The next thing we need to do is check if /dev/hda1 has been formatted.

First, check if /dev/hda1 is mounted. as root type df -h

if you see /dev/hda1 listed. Then change to the directory it is mounted on and skip to step 4. If not, follow steps 1 to 4.


1) sudo mkdir /mnt/hda1

2) sudo mount /dev/hda1 /mnt/hda1

3) cd /mnt/hda1

4) ls -l

if you see your windows filesystem, then you are in good shape.
if not, linux has formated this partition.

if your windows filesystem is there, the next thing to do is use fdisk to reassign the parttion id to 7, 7 is the NTFS. Before we do this I need to see the grub menu.lst file. Paste the contents of /boot/grub/menu.lst in your next post.

Once I view this file, I will note the changes to make and then we'll use fdisk to reassigned the partition id for /dev/hda1 and you will soon have your windows xp back along with ubuntu.

Last edited by dv502; 01-08-2008 at 10:55 AM.
 
Old 01-08-2008, 10:54 AM   #9
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Mynameisalex, I need to see the menu.lst file. I need to check if root points to /dev/hda1 or /dev/hda3. If you used lilo to boot the Os, then I need to see lilo.conf file found in the /etc folder.

Use any text editor program and open /boot/grub/menu.lst

Highlight everything, then go to edit > copy and paste the info in your next post.
 
Old 01-08-2008, 03:03 PM   #10
Mynameisalex
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
# 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=ea9557de-cd26-4e77-a7e6-8c5225a64f2f ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## 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 7.10, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ea9557de-cd26-4e77-a7e6-8c5225a64f2f ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ea9557de-cd26-4e77-a7e6-8c5225a64f2f ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST
 
Old 01-08-2008, 03:49 PM   #11
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Before you continue, did you verify that your windows filesystem still exists? If not, do so now by reading the post above.

Edit the /boot/grub/menu.lst file, and scroll down to the bottom and add the windows boot options. See below

Partial list of menu.lst

## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ea9557de-cd26-4e77-a7e6-8c5225a64f2f ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=ea9557de-cd26-4e77-a7e6-8c5225a64f2f ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet

title Windows XP
root (hd0,0)
makeactive
chainloader +1

### END DEBIAN AUTOMAGIC KERNELS LIST

Save the file and exit.

now we will change the partition id of /dev/hda1 to 7. 7 for NTFS.
Note: If windows XP was formatted using FAT32, then use c for the ID.

as root type

Code:
sudo fdisk /dev/hda
type the letter p and press enter. This will print the current MBR table.

Next type the letter t and press enter. When asked which partitioon, enter the number 1.

next, enter the number 7 and press enter.

type p to verify the ID was change to 7 for /dev/hda1 like so

Device Boot Start End Blocks Id System
/dev/hda1 1 60045 482311431 7 HPFS/NTFS
/dev/hda2 60046 60453 3277260 5 Extended
/dev/hda3 * 60454 60801 2795310 83 Linux
/dev/hda5 60046 60429 3084448+ 82 Linux swap / Solaris
/dev/hda6 60430 60453 192748+ 82 Linux swap / Solaris

if yes, then type w and press enter, then q and press enter

Now reboot the system.

Last edited by dv502; 01-08-2008 at 04:22 PM.
 
Old 01-09-2008, 05:03 PM   #12
Mynameisalex
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 6

Original Poster
Rep: Reputation: 0
alex@alex-desktop:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 2.7G 1.9G 608M 77% /
varrun 1014M 84K 1014M 1% /var/run
varlock 1014M 0 1014M 0% /var/lock
udev 1014M 80K 1014M 1% /dev
devshm 1014M 0 1014M 0% /dev/shm
lrm 1014M 34M 980M 4% /lib/modules/2.6.22-14-generic/volatile
alex@alex-desktop:~$ sudo mkdir /mnt/hda1
mkdir: cannot create directory `/mnt/hda1': File exists
alex@alex-desktop:~$ sudo mount /dev/hda1 /mnt/hda1
mount: you must specify the filesystem type
alex@alex-desktop:~$ cd /mnt/hda1
alex@alex-desktop:/mnt/hda1$ ls -l
total 0
alex@alex-desktop:/mnt/hda1$





did i do this correctly? does this mean that the windows partition has been formatted? should i still try to reconfigure the boot settings as above? or would that put me in worse shape than now?

Last edited by Mynameisalex; 01-09-2008 at 05:06 PM.
 
Old 01-09-2008, 06:35 PM   #13
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Quote:
sudo mount /dev/hda1 /mnt/hda1
mount: you must specify the filesystem type
alex@alex-desktop:~$ cd /mnt/hda1
alex@alex-desktop:/mnt/hda1$ ls -l
total 0
alex@alex-desktop:/mnt/hda1$
If the partition is still at 83. and the partition is formatted as NTFS or FAT32, this can confuse the kernel. First unmount the partition by typing

sudo umount /mnt/hda1

Change the partiton ID for /dev/hda1 as above.

next remount the partition

sudo mount /dev/hda1 /mnt/hda1

cd /mnt/hda1

ls -l

if it is still empty, then the windows file system is lost. Something went wrong when you install ubuntu, and /dev/hda1 got messed up.

If windows files are there, then edit the menu.lst file as above to add the windows boot options.

Last edited by dv502; 01-09-2008 at 07:56 PM.
 
  


Reply



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
Dual Boot system problems - please help!!! bassy-alex Linux - General 9 04-29-2006 12:07 PM
File system middle man on dual boot system? TehFlyingDutchman Linux - General 5 12-28-2005 02:17 AM
dual processor system=more running processes? plisken Linux - Hardware 0 12-09-2004 03:48 PM
Problems installing dual boot system ernesto_lelo Linux - Software 2 07-03-2004 02:12 AM
Newbie needs Mandrake/Win98 dual-HD, dual boot system design help... buddha Linux - Newbie 20 09-04-2003 08:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration