fdisk /dev/hda wont open disk

Asked by Kevin Mulvaney

 My problem starts with my inability to open Windows on the menu. The screen comes up "starting up" then nothing. I've tried using fdisk /dev/hda in terminal and it tells me it cannot open hda. what can I do?

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
Theodotos Andreou (theodotos) said :
#1

Try "sudo fdisk /dev/hda" \. You can also verify that the hda exists and it is assigned to your hard drive by"

"sudo lshw"

This way you can find the logical name of your hard drive. Usually it is "/dev/sda" for sata disks

Revision history for this message
Kevin Mulvaney (looksee) said :
#2

I tried sudo /dev/hda no luck still came up with unable to open /dev/hda. I tried sudo lshw and this told me that my IDE drive was listed as a SATA drive by calling it /dev/sda, so I used "sudo fdisk /dev/sda and got the following message. "the number of cylinders for this disk is set to 38913. There is nothing wrong with that, but this is larger than 1024, and could in certain circumstances cause problems with 1)Software that runs at boot time (eg. old versions of LILO. 2) booting and partitioning software from other OS eg DOSFDISK, OS/2 FDISK"
I installed Ubuntu 8.04 by making an ISO disk and booting with this disk. Teh disk that I installed it to is a 350GB IDE drive that I partitioned during the Ubuntu install to a Microsoft partition of 147 GB and the linux partition of approx the same size

Revision history for this message
Theodotos Andreou (theodotos) said :
#3

It's Ok to ignore that warning.

So did it worked after the install or do you still have a problem?

Revision history for this message
Kevin Mulvaney (looksee) said :
#4

Sorry, I did not make myself clear. The second paragraph should have come first. After installing Ubuntu was when all my problems started and I am still unable to load Windows

Revision history for this message
Theodotos Andreou (theodotos) said :
#5

Append the following code to the end of "/boot/grub/menu.lst"

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

Also comment out the hiddenmenu option in "/boot/grub/menu.lst":

#hiddenmenu

Then try to login on Windows.

Revision history for this message
Kevin Mulvaney (looksee) said :
#6

The code was already appended to "/boot/grub/menu.lst" with the additional line "save default" which I'd already deleted. I also deleted #hidden menu, but windows still will not boot

Revision history for this message
Theodotos Andreou (theodotos) said :
#7

Do an "fdisk -l /dev/sda" and see the exact logical name of the ntfs partition. If it is sda1 the respective device in grub is (hd0,0). If it is sda2 it will be (hd0,1) in grub and so on.

Revision history for this message
Kevin Mulvaney (looksee) said :
#8

It still tells me "unable to open /dev/sda

Revision history for this message
Kevin Mulvaney (looksee) said :
#9

Used sudo and managed to get the following readings
 device boot start end blocks ID system
 /dev/sda1 * 1 18927 152081096 7 HPFS/NTFS
 /dev/sda2 18928 5 extended
 /dev/sda5 83 linux
 /dev/sda6 82 linux/swap solaris

Revision history for this message
Theodotos Andreou (theodotos) said :
#10

So the info gave you for grub is correct. sda1 maps to (hd0,0) (unless you have another disk somewhere)

Can you give me the output of:

"cat /proc/partitions"

Revision history for this message
Kevin Mulvaney (looksee) said :
#11

"no such file or directory"

Revision history for this message
Theodotos Andreou (theodotos) said :
#12

No you are scaring me! Are you sure you typed the correct command?

If you boot with the Hardy livecd and type "cat /proc/partitions" you should see a list of partitions and disks. If you have no disk connected you should see only loop0 but the /proc/partitions file is always there.

Revision history for this message
Kevin Mulvaney (looksee) said :
#13

I typed the command, both as standard and using sudo and the comment was "no such file or directory". I found using file browser the folder "proc" and inside that the File "Partitions" and this was empty. I would now like to uninstall Ubuntu, create a new ISOfile and try and reinstall, but I dont know how to uninstall the program. Could you help?

Revision history for this message
Theodotos Andreou (theodotos) said :
#14

If you have access to windows you can do that by selecting windows from the grub menu. If grub is not working you will need to re-install the windows boot sector. You can do that using the Windows Recovery Console and issue the command "fixmbr". Then delete the Linux partitions and try again.

Can you help with this problem?

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

To post a message you must log in.