LinuxQuestions.org
Help answer threads with 0 replies.
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 08-27-2003, 02:46 AM   #1
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Rep: Reputation: 15
Question uh-oh... lost XP?


ok, it's been a while since i wanted to even venture back into XP... i had resized the partitions during the install so XP would have 16 gb, and mandrake linux would have 22 gb. well today i needed to go to my school's website, which only runs on netscape 4.5 but not any newer than 6.0, or MSIE. i rebooted, selected windows... the computer was loading, then restarted itself. so i popped in the WinXP cd, and try to restore... it says to type exit. i type exit, it restarts... and windows is still not there. so i reboot from cd again, and it says i have 4 parts of my hd... i know i split it into 2 - one for windows, one for linux. what's going on here? did i FUBAR major and lose all my info on windows? how do i know which partition is which - linux did not tell me the drive letters... apparently i have c, d, e, and g. what's going on here?
 
Old 08-27-2003, 02:55 AM   #2
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Open a shell in Mandrake

su
root password

fdisk -l /dev/hdx

were x is the channel your drive is on.

It'll give you a list of the respective partitions

There is always the final option of re-installing the Windows bootloader. - if you wanted to do that then pop in your 1st Mandrake cd -

Press F1

then type

rescue

youll see a menu in which you can choose to re-install the Windows bootloader - or LILO if your having problems with Mandrake

Last edited by Skyline; 08-27-2003 at 02:59 AM.
 
Old 08-27-2003, 03:08 AM   #3
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Original Poster
Rep: Reputation: 15
ok i just did the fdisk -l /dev/hda

"/dev/hda1 * 1 2155 17310006 7 HPFS/NTFS
/dev/hda2 2156 4870 21808237+ 5 Extended
/dev/hda5 2156 2919 6136798+ 83 Linux
/dev/hda6 2920 2982 506016 82 Linux swap
/dev/hda7 2983 4870 15165328+ 83 Linux"

am i correct in thinking hda1 and hda2 belong to windows?

would it be easier, since i am sorta in between being a newbie/almost intermediate user of linux/unix, to reinstall the windows bootloader?
 
Old 08-27-2003, 03:13 AM   #4
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
well, hda1 is your windows partition, and the * signifies that it's the bootable partition. hda2 is somewhat misleading, it doesn't really exist - you'll notice that the next three fit inside it when you look at the sectors. it's an extended partition, and the others are logical (since you can only have 4 primary partitions, if you want more than that you have to subdivide)

anyway, that's somewhat off topic. you may have a problem in your etc/lilo.conf file. if you posted that here we might be able to find a way to solve the problem without reinstalling windows bootloader. otherwise, that's not really all that difficult, and once you have xp booting again you can reinstall LILO pretty easily too.
 
Old 08-27-2003, 05:27 AM   #5
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
I had a similar problem with Red Hat 8 when i was experimenting with running a web server before I put it on a dedicated machine. I am running Windows XP and it wouldnt boot. I mounted the windows partition from Red Hat and found that nearly all of my files had dissapeared. Luckily I had a backup and had to reinstall windows! I would check to see if your files are there first!
 
Old 08-27-2003, 09:11 AM   #6
Bullzeye
Member
 
Registered: Aug 2003
Location: Florida
Distribution: DEBIAN 3.x
Posts: 34

Rep: Reputation: 15
I am a newbie myself (back me up here vets) but, if you resized an existing xp partition you may have in essence wiped it. Now, Assuming you installed XP after you did the partitioning it, it is entirely possible you borked the xp mbr. If your xp install is good then boot with your xp cd (make a linux boot disk first!!!) go to the recovery console, instead of typing exit, type the following:

fixmbr [ENTER]

that will re-write the master boot record with what xp expects to see.... um, come to think of it, xp should have asked you which winodws OS you want to log into first. Sorta sounds like you borked the xp os when you resized the partitions.
 
Old 08-27-2003, 10:35 AM   #7
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Why will resizing partitions mess up the XP partition? I just dont get it...
 
Old 08-27-2003, 03:09 PM   #8
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Quote:
Why will resizing partitions mess up the XP partition?
It depends on the type of partition.
If you want to resize a FAT32 partition, there is no problem.
However, Linux does not know how to correctly resize a NTFS partition.

So, it may be better to install winXP on a FAT32 partition.
WinXP will not have the secure file system setup, but anyways, windows is not even secure to begin with
 
Old 08-27-2003, 05:01 PM   #9
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mcd
well, hda1 is your windows partition, and the * signifies that it's the bootable partition. hda2 is somewhat misleading, it doesn't really exist - you'll notice that the next three fit inside it when you look at the sectors. it's an extended partition, and the others are logical (since you can only have 4 primary partitions, if you want more than that you have to subdivide)

anyway, that's somewhat off topic. you may have a problem in your etc/lilo.conf file. if you posted that here we might be able to find a way to solve the problem without reinstalling windows bootloader. otherwise, that's not really all that difficult, and once you have xp booting again you can reinstall LILO pretty easily too.
ok here is a copy of my /etc/lilo.conf file...


boot="/dev/hda"
map=/boot/map
default="linux"
keytable=/boot/us.klt
prompt
nowarn
timeout="100"
message=/boot/message
menu-scheme=wb:bw:wb:bw
vga="ask"

image="/boot/vmlinuz"
label="linux"
root="/dev/hda5"
initrd="/boot/initrd.img"
append="devfs=mount acpi=off quiet"
vga=788
read-only

image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=off"
read-only

image=/boot/vmlinuz
label="failsafe"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=nomount acpi=off failsafe"
read-only

other=/dev/hda1
label="windows"
table=/dev/hda

other=/dev/fd0
label="floppy"
unsafe
 
Old 08-27-2003, 05:02 PM   #10
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Original Poster
Rep: Reputation: 15
also, as long as i run into lilo (how can i make it wait, say, 20 or 30 seconds?) and i am able to choose which OS i want to run, that will be great. the way it is set is for 7 seconds i think...
 
Old 08-27-2003, 05:06 PM   #11
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Bullzeye
I am a newbie myself (back me up here vets) but, if you resized an existing xp partition you may have in essence wiped it. Now, Assuming you installed XP after you did the partitioning it, it is entirely possible you borked the xp mbr. If your xp install is good then boot with your xp cd (make a linux boot disk first!!!) go to the recovery console, instead of typing exit, type the following:

fixmbr [ENTER]

that will re-write the master boot record with what xp expects to see.... um, come to think of it, xp should have asked you which winodws OS you want to log into first. Sorta sounds like you borked the xp os when you resized the partitions.

XP was preinstalled when i bought this computer a year and half ago. i already have a linux boot disk... if i enter fixmbr, will that rewrite the mbr to what it originally was (ex. the restore program in XP, which restores your HD to the way it was at a certain date), would that overwrite LM?
 
Old 08-27-2003, 05:29 PM   #12
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Change this line

timeout="100"

to

200 for 20 seconds
300 for 30 seconds etc ect ect

remeber to run

/sbin/lilo

as root user from a shell to make the changes take effect
 
Old 08-27-2003, 05:38 PM   #13
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Original Poster
Rep: Reputation: 15
ok, thanks skyline... i put in 250, for 25 seconds...

i'm gonna restart and try the rescue-fixmbr commands... wish me luck!
 
Old 08-27-2003, 05:40 PM   #14
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
good luck
 
Old 08-27-2003, 07:04 PM   #15
uranologist
Member
 
Registered: Aug 2003
Location: Philly, PA
Distribution: Slackware
Posts: 81

Original Poster
Rep: Reputation: 15
ok, i did it, but it said it was going to install windows bootloader... i kinda want to keep lilo... any way i could access the data on the windows mbr from linux so i can save it before reinstalling the windows bootloader?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Lost panel in Gnome -- now I'm completely lost! webwench Linux - Newbie 3 04-30-2005 02:38 AM
Lost mouse after reboot+lost modem BACTRATE Mandriva 3 04-07-2005 07:45 AM
power lost from cable modem, interface lost a10392 Linux - Networking 4 11-16-2004 10:01 AM
Lost klfreese Linux - Newbie 13 07-02-2004 11:27 PM
C++ templates + linked lists... lost.. very lost.. exodist Programming 2 05-13-2004 12:04 AM

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

All times are GMT -5. The time now is 12:39 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration