LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 04: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, 05:23 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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, 05: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, 05:36 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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, 06:52 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
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 06:55 PM.
 
  


Reply



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

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

All times are GMT -5. The time now is 07:11 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
Open Source Consulting | Domain Registration