Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 02-02-2007, 09:10 PM   #1
Registered: Aug 2005
Posts: 91

Rep: Reputation: 15
Makeing a Partition

I'm running Novell SUSE Enterprise Server 10.0. And I have a sata drive and when I do sfdisk -l /dev/sda1 (that is how it is listed in/dev)it returns "Warning: start=63 - this looks lake a partition rather than the entire disk. Use the -- force option if you really want this." [u]This is an entire disk[./U] I have looked at a lot of examples and they all show this sfdisk /dev/hdc << EOF
Which I don't understand. All I want is to make the whole drive one partition. I tried <start> <size> <id>; sfdisk /dev/sda1 0 298 L but it doesn't work. What do I need to ty sad.gif pe?

The command

sfdisk /dev/hdc << EOF

Do you type this in just as it is showed here? I couldn't find out what this means "<< EOF" When you enter this sfdisk /dev/hdc. It seems like you are in the program. How can you exit it with out changing any thing?
Old 02-02-2007, 09:44 PM   #2
Registered: Jan 2006
Location: India
Distribution: Fedora 7, Linuxfromscratch 6.2
Posts: 66

Rep: Reputation: 15
/dev/sda1 is a partition, not the entire disk which would be /dev/sda.

/dev/sda1 along with the size of the partition equal to the entire disk should be fine.

<< LABEL ...

is a 'here document'. Everything between the two labels will act as an argument to sfdisk. You should be able to exit with a 'q' or something.
Old 02-02-2007, 09:55 PM   #3
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
I don't know what the values given in that example will do to your hard disk, but if you know that the values are correct for your disk then type them exactly. Once you type the EOF at the end, the changes are saved to disk and the partition tables is altered. I'd expect that <Ctrl>-c will get you out without saving the changes though, it works for that syntax with other commands.

That syntax is called a here document. If you type man bash and search for it you'll get an overview. Simply put, the shell will pass everything between the 2 EOF statements as input to the supplied command - in this case sfdisk.

If you're only trying to create a single partition that takes up the whole disk, it might be easier to do it manually with fdisk. Using sfdisk as your example shows is most useful when embedding commands in scripts.
Old 02-02-2007, 10:09 PM   #4
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,950

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Agree - sfdisk has it's uses (*mighty* good ones), but this may not be one for a presumably new user.
That looks like something from the man page. This might work for you
sfdisk /dev/sda << EOF
Personally I think you should consider cfdisk - it's "graphical" (in a sense ), and you see what you are doing. Use the up/down arrow keys to highlight the free space, then left/right arrows to select the commands along the bottom. "new" to create a (primary) partition - just take all the defaults for size, start.
"write" to update the partition table, and "quit" to get out.
Old 02-03-2007, 12:19 AM   #5
Registered: Aug 2005
Posts: 91

Original Poster
Rep: Reputation: 15
Ok. So if I type:
sfdisk /dev/hda << EOF hit the enter key
on the next line type: ; hit the enter key
on the next line type: EOF hit the enter key

I will have One big partition: of 300GB, the size of this hard drive.

There is nothing on this disk to backup.


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
MAKEing WINE on kubuntu 6.06? darthfoolish Linux - Newbie 2 05-31-2006 04:10 AM
makeing my own linux einstien Linux - General 5 02-22-2005 10:23 AM
Makeing my code look cleanner for others Starch Programming 1 02-15-2005 09:57 PM
makeing a music server awc2005 Linux - Networking 3 03-04-2004 10:32 PM
I want some help on makeing my own Linux distro Posty Linux - Distributions 14 10-21-2003 11:12 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration