LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-22-2006, 05:44 PM   #1
jcai
Member
 
Registered: Sep 2004
Distribution: Fedora 5
Posts: 48

Rep: Reputation: 15
sfdisk problems partitioning whole drive


im running on RHEL 4 ES

when i try to use SFDISK to partition my new harddrive in the following way i get the following error:

sfdisk /dev/sda << EOF
>;
>EOF

Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 218428 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 0 - 0 0 0 Empty
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
no room for partition descriptor

sfdisk: bad input




does anyone know whats going on?
 
Old 06-22-2006, 06:23 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
No idea, but I generally do all my partitioning from the GParted live CD. That way I'm sure no one is using any of the shared drives...
 
Old 06-22-2006, 06:33 PM   #3
jcai
Member
 
Registered: Sep 2004
Distribution: Fedora 5
Posts: 48

Original Poster
Rep: Reputation: 15
thing is, i need sfdisk so i can run it from a script
 
Old 06-22-2006, 06:36 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
From the man page, it appears that sfdisk doesn't understand GUID partition tables and also doesn't like large partitions. Never used sfdisk myself, sorry I can't be of more help!
 
Old 06-22-2006, 07:52 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
First, I made a backup of my /dev/sda partition table with the command: sfdisk -d /dev/sda > sda.out

That way, I can restore it to previous settings with the command:
sfdisk /dev/sda < sda.out

Then, I ran your command:
Code:
sfdisk /dev/sda << EOF
;
EOF
It works with this output...
Code:
   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+  12187   12188-  97900109+  83  Linux
/dev/sda2          0       -       0          0    0  Empty
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
So anyway, that command does work on my FC5 box, don't know why it's not working for you.

sfdisk -v
sfdisk (util-linux 2.13-pre7

Last edited by homey; 06-22-2006 at 07:55 PM.
 
  


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
drive partitioning barleykorn Linux - Hardware 3 11-16-2005 08:34 PM
Drive Partitioning BiPolar Linux - General 8 04-01-2005 01:44 AM
Re partitioning a drive DiabloDan Linux - Software 12 06-18-2003 09:42 PM
Partitioning new drive ander45 Linux - Software 1 02-09-2002 05:42 PM
Hard Drive partitioning problems Relfx Linux - Software 1 12-30-2001 02:53 PM


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