You are not logged in.

#1 2011-05-22 10:10:53

emil.s
Member
Registered: 2011-05-22
Posts: 5

fdisk ignores arguments?

Hello!

I have ben using Arch for a while now, and everything works great, except of 1 little thing. I can't get fdisk working...
Look at this:

root@MobileCommand: /home/emil #> fdisk -l
Usage:
 fdisk [options] <disk>    change partition table
 fdisk [options] -l <disk> list partition table(s)
 fdisk -s <partition>      give partition size(s) in blocks

Options:
 -b <size>             sector size (512, 1024, 2048 or 4096)
 -c[=<mode>]           compatible mode: 'dos' or 'nondos' (default)
 -h                    print this help text
 -u[=<unit>]           display units: 'cylinders' or 'sectors' (default)
 -v                    print program version
 -C <number>           specify the number of cylinders
 -H <number>           specify the number of heads
 -S <number>           specify the number of sectors per track

root@MobileCommand: /home/emil #> fdisk /dev/sdc
Usage:
 fdisk [options] <disk>    change partition table
....
....
....

root@MobileCommand: /home/emil #> parted -l /dev/sdc
Model: ATA Hitachi HTS54501 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  128MB   127MB   primary  ext4            boot
 2      128MB   31.5GB  31.3GB  primary  ext4
 3      31.5GB  158GB   126GB   primary  xfs
 4      158GB   160GB   2147MB  primary  linux-swap(v1)


Model: Generic Flash Disk (scsi)
Disk /dev/sdc: 2082MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      512B    8001kB  8000kB  primary
 2      8389kB  2000MB  1991MB  primary

I have tried to reinstall util-linux, but the package seems fine. Or do I do something wrong?

Offline

#2 2011-05-22 15:36:17

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: fdisk ignores arguments?

check your local ~/.bashrc file or global /etc/bash.bashrc file for fdisk aliases.

Last edited by roygbiv (2011-05-22 16:45:47)

Offline

#3 2011-05-22 20:31:11

emil.s
Member
Registered: 2011-05-22
Posts: 5

Re: fdisk ignores arguments?

Aha! So easy, yet so hard. Would never have figured that out... tongue

I'm using the same bashrc as I'm using on my server with Ubuntu 10.04, which has "fdisk -uc" as standard due to an older version of fdisk, which "needs":

 -c                        switch off DOS-compatible mode
 -u <size>                 give sizes in sectors instead of cylinders

Thanks! big_smile

Last edited by emil.s (2011-05-22 20:33:05)

Offline

#4 2011-05-22 20:40:23

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: fdisk ignores arguments?

you're welcome. please mark as solved.

Offline

Board footer

Powered by FluxBB