LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-01-2009, 07:49 AM   #1
invisible_coward
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
fdisk unable to read /dev/sda2.


Hi
I have 3 visible partitions on my hard disk - one for windows vista, one for my data and one for linux. One other is swap partition. fdisk prints the following partition table:
---------------------------------------------------------------------
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb0000000

Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 de Dell Utility
/dev/sda2 10 1967 15727635 5 Extended
/dev/sda3 * 1968 6537 36700160 7 HPFS/NTFS
/dev/sda4 6537 19458 103787520 7 HPFS/NTFS
/dev/sda5 10 33 192748+ 82 Linux swap / Solaris
/dev/sda6 34 1967 15533056 7 HPFS/NTFS
----------------------------------------------------------------------

As u can see, the only extended partition is /dev/sda2.
but cmd - sudo fdisk /dev/sda2 returns the message: unable to read /dev/sda2.
I wanted to create a new minix version 1 partition out of it for testing some old kernel.
How to get over this error?
 
Old 07-01-2009, 08:17 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
You are using fdisk incorrectly - it is only used with devices (/dev/sda) not partitions (/dev/sda2).
 
Old 07-01-2009, 08:17 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,614

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Invisible_Coward:

First of all you don't fdisk an extended partition. You do it against a device.
Try

:$ sudo /sbin/fdisk -u /dev/sda

press m for help, there you can do anything against your hard drive BUT are you sure how much space is available and which sector?

But why use fdisk? Use your gParted or other GUI tool to be sure of what you are doing.

Also try sudo /sbin/cfdisk /dev/hda (or /dev/sda) be sure issue this outside X. This one has better dialogue choices. Read help first:
$ man cfdisk

Goodluck.
 
Old 07-01-2009, 08:24 AM   #4
nuwen52
Member
 
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208

Rep: Reputation: 46
fdisk works on drives, not partitions. If you wanted to create a new partition on the drive, you would do fdisk /dev/sda. Then you would be able to create a new partition out of whatever is left. But, from what I'm seeing, the sda2 extended partition (if the intention is to create a new partition inside of it) is full.

Last edited by nuwen52; 07-01-2009 at 08:34 AM. Reason: two other submits before I was able to post mine...
 
  


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
fdisk gives: Unable to read /dev/sdc deathsfriend99 Linux - Newbie 8 03-01-2009 07:00 PM
"block device /dev/sda2 is write-protected, mounting read-only" - fstab problem blanks77 Linux - Hardware 1 04-28-2006 07:09 PM
fdisk unable to read /dev/sda frankie_DJ Slackware 1 09-08-2005 09:44 PM
fdisk gives unable to read /dev/hda... mbr is gone... what can it be? slackie1000 Linux - Hardware 5 01-27-2004 05:29 AM
unable to fdisk /dev/hdc aqoliveira Red Hat 4 10-01-2003 05:12 AM


All times are GMT -5. The time now is 10:36 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