LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fdisk command is trying to format my cdrom drive! (https://www.linuxquestions.org/questions/linux-newbie-8/fdisk-command-is-trying-to-format-my-cdrom-drive-631078/)

justintime24 03-27-2008 01:43 PM

fdisk command is trying to format my cdrom drive!
 
ok here is my problem. i have used partition magic to make 3 partitions. one for winxp one for linux swap and one for linux itself. i am trying to install linux to the empty partition and when i boot the installation cd and run "fdisk /dev/hda" it tries to format the optical disk drive. i know this because the ouput shows the capacifty at around 680 mb and when i remove the cd and run the command it says cannot open /dev/hda. so i think i need to use the mount command to mount my hard drive to hda or hda1, but im not sure how to do it. can anyone help me out and let me know what i need to do? from what ive researched hda should be the first ide hard disk. i am using a laptop, an hp compaq 8510p with intel core2 duo processor.

pixellany 03-27-2008 02:03 PM

welcome to LQ;

That computer has a SATA hard drive---it will probably be sda1.

To run fdisk you do not need to mount the drive or partition. If you are changing something, you don't WANT it mounted.

theNbomr 03-27-2008 02:06 PM

Plus, you probably also want a separate partition for the /boot directory. At least this is a strong convention.
--- rod.

justintime24 03-27-2008 02:12 PM

ok i will try this - THANK YOU VERY MUCH!!!

justintime24 03-27-2008 02:27 PM

Quote:

Originally Posted by theNbomr (Post 3102256)
Plus, you probably also want a separate partition for the /boot directory. At least this is a strong convention.
--- rod.

ok well i ran the exact same command replacing hda with sda and it did not work
output was "unable to open /dev/sda1"
i also tried sda without the "1" and it did the same thing...
my dev folder contains sga files but not sda

and im not sure what the /boot directory is for but its on the cd in the root i think... ??

anyone have any other suggestions?

jkirchner 03-27-2008 02:30 PM

Which version of Linux are you trying to install?

tredegar 03-27-2008 02:33 PM

Quote:

anyone have any other suggestions?
Code:

fdisk -l
(as root) will tell you what your linux distro is seeing as what, and where.

justintime24 03-27-2008 02:35 PM

im really not sure - i will try to find out. its for a military application - give me a few minutes i can try to find out if it really matters

justintime24 03-27-2008 02:38 PM

Quote:

Originally Posted by tredegar (Post 3102284)
Code:

fdisk -l
(as root) will tell you what your linux distro is seeing as what, and where.

ok i tried it but it produced no output... fdisk -l ... that is a lower case L right?

my prompt is showing root@(none):/#

so i have this on my screen after running it

root@(none):/# fdisk -l
root@(none):/#

edit:

ok i tried fdisk -1 <--- the number one
and i got some output....

fdisk.bin: invalid option -- 1

usage : fdisk [-b SSZ] [-u] DISK change partition table
fdisk -l [-b SSZ] [-u] DISK list partition table(s)
fdisk -s PARTITION give partition size(s) in blocks

and theres a bit more after that...

jkirchner 03-27-2008 02:50 PM

You were right the first time. The command is fdisk -l where l = small letter L.

Curious, are you trying a version of Fedora? In version 9 when I tried to run it I got nothing at first as the PATH was not in my path. Anyway, you could try:
Code:

/sbin/fdisk -l

justintime24 03-27-2008 02:54 PM

Quote:

Originally Posted by jkirchner (Post 3102309)
You were right the first time. The command is fdisk -l where l = small letter L.

Curious, are you trying a version of Fedora? In version 9 when I tried to run it I got nothing at first as the PATH was not in my path. Anyway, you could try:
Code:

/sbin/fdisk -l

this returns no output same as running fdisk -l
if i throw in /dev/hda after that commant it tells me
disk /dev/hda: 685 MB, 685944832 bytes
255 heads 63 sectors/track 83 cylinders

this leads me to believe /dev/hda is my cdrom drive... i just need to know what device is my hard drive. this is driving me nuts!! thanks for the help everyone but my problem is still not solved....

jkirchner 03-27-2008 02:58 PM

Quote:

Originally Posted by justintime24 (Post 3102317)
this returns no output same as running fdisk -l
if i throw in /dev/hda after that commant it tells me
disk /dev/hda: 685 MB, 685944832 bytes
255 heads 63 sectors/track 83 cylinders

this leads me to believe /dev/hda is my cdrom drive... i just need to know what device is my hard drive. this is driving me nuts!! thanks for the help everyone but my problem is still not solved....

It should be /dev/sda since it is a SATA drive. Have you tried sda? I saw where you had sda1. Try just sda without a number.

EDIT: I did try a distro once that would not recognize my sata drives at all. That is one reason I was curious which distribution you were trying to work with.

alan_ri 03-27-2008 03:10 PM

What BIOS do you have?What chipset do you have?How many hard drives do you have?What distro are you trying to install?Do you have anything elese installed(even if you think that you erased it)?How many cd/dvd drives do you have?What does your BIOS setup look like?

michaelk 03-27-2008 03:21 PM

A quick google showed that distribution matters as well as the chipset information. Fedora 8 and Ubuntu 7.10_64 installed and appeared to work well.

tredegar 03-27-2008 04:50 PM

@justintime24

This thread is rapidly going nowhere because:

To quote jkirchner
Quote:

Which version of Linux are you trying to install?
We need to know the answer. You have not bothered to reply. Please do so if you wish further help.

To quote justintime24

Quote:

my prompt is showing root@(none):/#
The (none) means you have not named your PC. This is quite important for linux installations. No name = many things may be broken.

If fdisk -l (Yes, it's a lower case "Ell", we have already established that) does not work, then things are seriously broken, and you need to start again, from the very beginning.

I suspect you have not installed your linux distro properly.

Linux isn't "windows", you cannot just click [OK], [OK], "I agree to everything, even though I have not read it, and do not understand it anyway", [OK], [Yes] and expect it to work.

Welcome to a new, and ultimately, better world. But linux expects you to answer the questions posed, you can't just press <Return> and expect everything to work.

When you install any recent version of linux you should be asked some (fairly simple) questions.

If you do not know how to answer the questions asked of you at install time, don't just press <Return>, but ask (here) if you cannot be bothered to work out (or search for) what your reply should be. Better still, ask (here) after you have consulted the internet's various search engines.

Please don't have a "hissy fit" now, because I am trying to help you help yourself. We'll go one-step-at-a-time. We are here to help you if you can help yourself by providing us with some pertinant information as to your exact situation :)


All times are GMT -5. The time now is 10:41 PM.