03-11-2010
All your work in
fdisk was wiped out when you just reformatted /dev/sdb directly.
That device had no partitions at all, it was all just one big VFAT system, like an old-fashioned floppy. Which is why fdisk showed garbage, it was reading the filesystem itself instead of a partition table. /dev/sdb is the disk, /dev/sdb1 etc. would be partitions on that disk if it had any. You'd almost never see a hard drive without a partition table, but some flash drives still obnoxiously come formatted this way.
That said, you've got bigger problems. A virus would need supernatural properties to stop linux from
formatting the drive. I think your flash drive's malfunctioning. It's locking up and not taking legitimate writes.
Last edited by Corona688; 03-11-2010 at 12:21 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I need information or tooling for using my USB pen drive (DANE-ELEC) in a unix environment.
Until now I only get the "format window" in the unix machine but after giving OK for running the format, it never stops and I have to stop it manually.
Seems that what I need is format my... (0 Replies)
Discussion started by: Argento73
0 Replies
2. Debian
hello,
I want to install minimal linux on 128MB pen drive.
distro is debian.
what all should i need? (2 Replies)
Discussion started by: yogesh_powar
2 Replies
3. BSD
Hi there,
I am using freebsd 7.0 and I am facing a lot of issues with it. The cd installed fine. I opted for the gnome desktop and tht too installed (though the refresh rates were wrong and the resloution got messed up). After some configurations the desktop was working fine.
Then came the... (5 Replies)
Discussion started by: jedidiah
5 Replies
4. Filesystems, Disks and Memory
Hi Guys,
I have an external USB Hard Disk Drive on which I have 3 partitions and it works fine under Windows XP but when I am using Red Hat Linux 5 I don't see any icon for this USB HDD. Also I am not able to browse my USB Pen Drive. However, I can use it under Mandrake Linux without any... (4 Replies)
Discussion started by: indiansoil
4 Replies
5. Shell Programming and Scripting
Hi,
I need to run a script whenever a pen drive is connected to my ubuntu machine. The script is to be run from local disk and with privileges of current user. How do I achieve this?
Thanks. (1 Reply)
Discussion started by: friendlyweb
1 Replies
6. Linux
can any body tell simple steps to install linux from pen drive (4gb) fat32 ( with out dvd rom ) (3 Replies)
Discussion started by: seshumohan
3 Replies
7. SCO
Does anybody know the commands to access the data from a pen drive in a SCO Openserver 6.
What are the parameters to the mount command for accessing the USB port:confused: (9 Replies)
Discussion started by: jksah
9 Replies
8. Red Hat
Anyone can plz tell me how to make pendrive bootable.unetbootin dont have option for red hat (0 Replies)
Discussion started by: shamapraveen
0 Replies
9. SCO
I have a server unix Sco 5.0 and copy some backup files to flopy drive using command "Tar", but i like copy this files to pen drive, is possible ? my know about Sco is less.
Tks (1 Reply)
Discussion started by: ger2112
1 Replies
10. Solaris
Hiii,
Please let me know the steps for mounting my USB pendrive in solaris 10 platform.
Thanks & Regards,
Bhargav P (5 Replies)
Discussion started by: bhargav90
5 Replies
PARTX(8) System Administration PARTX(8)
NAME
partx - tell the Linux kernel about the presence and numbering of on-disk partitions
SYNOPSIS
partx [-a|-d|-s] [-t TYPE] [-n M:N] [-] disk
partx [-a|-d|-s] [-t TYPE] partition [disk]
DESCRIPTION
Given a device or disk-image, partx tries to parse the partition table and list its contents. It optionally adds or removes partitions.
The disk argument is optional when a partition argument is provided. To force scanning a partition as if it were a whole disk (for example
to list nested subpartitions), use the argument "-". For example:
partx --show - /dev/sda3
This will see sda3 as a whole-disk rather than a partition.
This is not an fdisk program -- adding and removing partitions does not change the disk, it just tells the kernel about the presence and
numbering of on-disk partitions.
OPTIONS
-a, --add
Add the specified partitions, or read the disk and add all partitions.
-b, --bytes
Print the SIZE column in bytes rather than in human-readable format.
-d, --delete
Delete the specified partitions or all partitions.
-g, --noheadings
Do not print a header line.
-l, --list
List the partitions. Note that all numbers are in 512-byte sectors. This output format is DEPRECATED in favour of --show. Don't
use it in newly written scripts.
-o, --output list
Define the output columns to use for --show and --raw output. If no output arrangement is specified, then a default set is used.
Use --help to get list of all supported columns.
-r, --raw
Use the raw output format.
-s, --show
List the partitions. All numbers (except SIZE) are in 512-byte sectors. The output columns can be rearranged with the --output
option.
-t, --type type
Specify the partition table type -- aix, bsd, dos, gpt, mac, minix, sgi, solaris_x86, sun, ultrix or unixware.
-n, --nr M:N
Specify the range of partitions. For backward compatibility also the format <M-N> is supported. The range may contain negative
numbers, for example "--nr :-1" means the last partition, and "--nr -2:-1" means the last two partitions. Supported range specifi-
cations are:
<M> Specifies just one partition (e.g. --nr 3).
<M:> Specifies lower limit only (e.g. --nr 2:).
<:N> Specifies upper limit only (e.g. --nr :4).
<M:N> or <M-N> Specifies lower and upper limits (e.g. --nr 2:4).
EXAMPLES
partx --show /dev/sdb3
partx --show --nr 3 /dev/sdb
partx --show /dev/sdb3 /dev/sdb
All three commands list partition 3 of /dev/sdb.
partx --show - /dev/sdb3
Lists all subpartitions on /dev/sdb3 (the device is used as whole-disk).
partx -o START -g --nr 3 /dev/sdb
Prints the start sector of partition 5 on /dev/sda without header.
partx -o SECTORS,SIZE /dev/sda5 /dev/sda
Lists the length in sectors and human-readable size of partition 5 on /dev/sda.
partx --add --nr 3:5 /dev/sdd
Adds all available partitions from 3 to 5 (inclusive) on /dev/sdd.
partx -d --nr :-1 /dev/sdd
Removes the last partition on /dev/sdd.
SEE ALSO
addpart(8), delpart(8), fdisk(8), parted(8), partprobe(8)
AUTHORS
Davidlohr Bueso <dave@gnu.org>
Karel Zak <kzak@redhat.com>
The original version was written by Andries E. Brouwer <aeb@cwi.nl>.
AVAILABILITY
The partx command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux February 2011 PARTX(8)