LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   DamnSmallLinux (https://www.linuxquestions.org/questions/damnsmalllinux-42/)
-   -   fdisk Terminal command problems - help appreciated (https://www.linuxquestions.org/questions/damnsmalllinux-42/fdisk-terminal-command-problems-help-appreciated-564170/)

AlestorJN 06-24-2007 12:39 PM

fdisk Terminal command problems - help appreciated
 
Hi, I've been trying to partition my flash drive for Damn Small Linux installation using the fdisk (v2.12r) commands, but I've been running into some problems.

Fdisk is replying with invalid command statements, although I believe they are valid commands, according to the installation guide.

Here's what happens:

Quote:

joseph@Alestor:~$ fdisk -l

Disk /dev/sdb: 515 MB, 515899392 bytes
16 heads, 32 sectors/track, 1968 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1968 503792 e W95 FAT16 (LBA)
joseph@Alestor:~$ fdisk -d

I wanted to delete the partition then create two new ones, one for storage and the other for DSL. I got this reply:

Quote:

fdisk: invalid option -- d

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

With that, of course, neither "fdisk -n,p,1"(new partion) or "fdisk -a"(bootable) worked either.

Is this because of the version or Feisty Fawn or what? Any help is greatly appreciated. Thanks for your time. :)

rjtucke 06-24-2007 04:28 PM

Um, try just specifying the /dev/hdc or whatever on the command line, and then it should enter interactive mode- THEN try the delete or whatever.

pixellany 06-24-2007 07:22 PM

Look carefully at the man page for fdisk--you have to specify the device in any command that actually does something.
As rj says, do first "fdisk /dev/sdb", then use the interactive commands. Once you are in the command mode, type "m" for a list of all commands.

AlestorJN 06-24-2007 11:19 PM

Problem Solved
 
Actually I did that, sorry to not mention it. Even entered the partitions. I've recently solved the problem by using gparted to manage partitioning. Works great now :) Thanks for your help!


All times are GMT -5. The time now is 07:17 AM.