473,396 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Partitioning with sfdisk

Colloid Snake
144 100+
Hello-

I am attempting to modify an install script, and I'm not having much luck - I was hoping someone could help with my sfdisk notation.

Currently, the install script uses

sfdisk -uM /dev/sda << EOF
,2048,,*
,2048,82
,,
EOF

And I'm attempting to add a few more partitions in there by using:

sfdisk -uM /dev/sda << EOF
,2048,,*
,2048,82
,,E
,1024,
,1024,
,,
EOF

I have tried adding various sizes, but I continue to get "sda: p4 exceeds device capacity" on the extended partition. This is on an 8G VMware image, so unless that is using something other than MB (which I thought the -uM was setting), it should be small enough to fit in the rest of the space.

Can anyone see what I'm doing wrong?

~Snake
Aug 22 '08 #1
1 10373
Motoma
3,237 Expert 2GB
Hello-

I am attempting to modify an install script, and I'm not having much luck - I was hoping someone could help with my sfdisk notation.

Currently, the install script uses

sfdisk -uM /dev/sda << EOF
,2048,,*
,2048,82
,,
EOF

And I'm attempting to add a few more partitions in there by using:

sfdisk -uM /dev/sda << EOF
,2048,,*
,2048,82
,,E
,1024,
,1024,
,,
EOF

I have tried adding various sizes, but I continue to get "sda: p4 exceeds device capacity" on the extended partition. This is on an 8G VMware image, so unless that is using something other than MB (which I thought the -uM was setting), it should be small enough to fit in the rest of the space.

Can anyone see what I'm doing wrong?

~Snake
Hello Colloid Snake,

I found this interesting bit of documentation in the man pages:
With the -x option, the number of input lines must be a multiple of 4: you have to list the two empty partitions that you never want using two blank lines. Without the -x option, you give one line for the partitions inside a extended partition, instead of four, and terminate with end-of-file (^D). (And sfdisk will assume that your input line represents the first of four, that the second one is extended, and the 3rd and 4th are empty.)
If I follow that correctly, what you probably will need is something like the following:

Expand|Select|Wrap|Line Numbers
  1. sfdisk -uM -x /dev/sda << EOF
  2. ,2048,L,*
  3. ,2048,S
  4. ,,E
  5. ,1024,L
  6. ,1024,L
  7. ,,L
  8. ;
  9. ;
  10. EOF
  11.  
If you can see what I was getting at, try fooling around with it. If you find something that works, post back; I'm interested in knowing what the proper syntax is.

Motoma
Aug 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Jeff Boes | last post by:
I'm sure this is a concept that's been explored here. I have a table (fairly simple, just two columns, one of which is a 32-digit checksum) with several million rows (currently, about 7 million)....
7
by: Jane | last post by:
In Oracle we can partition a table as follows. What is the equivalent in DB2? CREATE TABLE sales_list (salesman_id NUMBER(5), salesman_name VARCHAR2(30), sales_state VARCHAR2(20),...
0
by: Robert Klemme | last post by:
Hi, this is just to verify: I checked the documentation and it seems that SQL 2005 does not support hash partitioning on a number of columns. As far as I can see only range partitioning is...
10
by: shsandeep | last post by:
DB2 V8.2 (not Viper yet and no range partitioning!!) I have created a table T1 (col1, col2) with col1 as the primary key. When I try to create a partitioning key on col2, it gives me error that it...
8
by: mitek | last post by:
Hi, All I have strange situation with table design for DB2 9.1 on Windows I have 3 tables with same structure : 1 table - is MDC 2 table - is partitioned MDC table 3 table - is compressed...
0
by: harrylarenson | last post by:
Hi, Happy New Year. I am trying to insert a query to a partitioned view but the error is : Server: Msg 4436, Level 16, State 12, Line 1 UNION ALL view 'T' is not updatable because a...
0
by: Nate Eaton | last post by:
According to the original whitepaper on UDB range partitioning (http:// www-106.ibm.com/developerworks/db2/library/techarticle/0202zuzarte/ 0202zuzarte.pdf), you can use a range as a criteria,...
15
by: Piero 'Giops' Giorgi | last post by:
Hi! I have a question: I already have a DB that uses partitions to divide data in US Counties, partitioned by state. Can I use TWO levels of partitioning? I mean... 3077 filegroups and...
2
by: mandor | last post by:
Hello, I need some advise in table design, and more specifically about table partitioning. I read some papers and there was mentioned that if a table is expected to hold millions of rows, it's a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.