Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Reformat WD 500 GB hard drive for Linux machine Post 302407275 by pludi on Thursday 25th of March 2010 02:09:09 AM
Old 03-25-2010
Important note: Neither I nor any of the other moderators and administrators here will take responsibility for data lost due to not reading the whole post, and making sure the contents are understood.

Did you back up everything essential from the external disk? Are you sure? Absolutely?

Even if, what file system is on the disk? If it's FAT/FAT32/VFAT you can use it with Linux, up to a file size of 4GB (2^32 bytes). If you have FUSE or can get it to run, and install ntfs-3g, you'll have NTFS support, too.

Open a terminal session, connect the disk, and run dmesg. At the bottom of the output you should see some lines similar to this
Code:
usb 5-4: new high speed USB device using ehci_hcd and address 3
usb 5-4: new device found, idVendor=1516, idProduct=8628
usb 5-4: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 5-4: Product: USB 2.0 0806
usb 5-4: Manufacturer: A-JET
usb 5-4: SerialNumber: 20080125000000000000040A
usb 5-4: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
scsi 3:0:0:0: Direct-Access     A-JET    USB 2.0 0806     1.00 PQ: 0 ANSI: 2
sd 3:0:0:0: [sdb] 16236544 512-byte hardware sectors (8313 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] 16236544 512-byte hardware sectors (8313 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 3:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 3:0:0:0: [sdb] Attached SCSI removable disk
sd 3:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete

Important is the bold line. The first tells us the device node it's presented as (sdb in this case), and that there's 1 partition on it (sdb1).
If it's only 1 partition (most probable), you can format it straight away as root:
Code:
$ su -
$ mkfs -t ext3 /dev/sdb1 # Replace sdb1 with the partition dmesg told you

After it's finished, disconnect and reconnect the drive, and the automounter of GNOME should pick it up just fine.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Format Hard Drive in Linux

What Command do I need to use to Format my hard Drive in Linux. Please help me out. -Regards -Iftikhar:) (2 Replies)
Discussion started by: syedifti
2 Replies

2. UNIX for Dummies Questions & Answers

Trying to copy old hard drive to new hard drive.

:confused: ........I have a new hard drive and I need to copy ALL info from the old to the new. I would like to use the dd command. I know the command is as follows...... dd if=/dev/rdsk/c1t1d0s0 of=/dev/rdsk/???????? Where I have the question marks is the problem. How do I find out what the... (4 Replies)
Discussion started by: shorty
4 Replies

3. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

4. OS X (Apple)

reformat drive with terminal.

ok, so i wrecked my ipod trying to mess with themes and what not and now it will not turn on. it will not even mount when plugged in. I am wondering if i can some how format it with terminal. when i type "mount /dev/disk1s3" it says "unknown special file or file system". . i dont know much code... (3 Replies)
Discussion started by: ajstre24
3 Replies

5. Solaris

how to reformat a hard disk

hi i need help on how to reformat a hard disk. what should i do since i don't have any bootable disk. i'm using solaris 1 & 2 and also need to make a backup copy of the current hard disk. appreciate all the help i can get... (14 Replies)
Discussion started by: mr_balodoy
14 Replies

6. UNIX for Advanced & Expert Users

How to install Linux on an external 320 gigabyte hard drive

Hi all, I would to know if I can install Linux on an external 320 gigabyte hard drive..I have Windows XP on my internal hard drive which is 80 GB , but this installation on 320 external HDD is for testing purpose If it is possible to install Linux on the external drive, will it cause any... (5 Replies)
Discussion started by: bsandeep_80
5 Replies

7. Shell Programming and Scripting

Need help on Linux script to monitor hard drive space

I'm new to Linux and have very limited experience with shell scripts in general. I am taking a class and I have to research online and come up with a shell script that monitors disk space. I also have to be able to explain it line by line. I've researched various sites and came across this shell... (3 Replies)
Discussion started by: wgreg23
3 Replies

8. Shell Programming and Scripting

Unix server to Hard-drive connected on the machine

Hi, I have an external hard drive connected to my iMac. I am logged into a Linux_x86_64 server. Now, if I want to download files directly to the hard drive, is there a way to do it. Currently, I am chasing cyberduck to download content to the hard drive. (3 Replies)
Discussion started by: jacobs.smith
3 Replies

9. UNIX for Dummies Questions & Answers

Copy everything from remote Linux to external hard drive in windows

Hi, I`m trying to copy an entire directory(with numerous files, folders and subfolders etc, a content size of 500gigs) from a linux machine running Red Hat Enterprise Linux 6 to an external hard drive on my windows. I downloaded and installed psftp on my windows and I can login using psftp... (9 Replies)
Discussion started by: newbie83
9 Replies

10. UNIX for Beginners Questions & Answers

Question about setting up a hard drive for a videoserver under Linux

Hi there, I'm currently preparing for an exam and came across a question that I don't really know how to answer. "You want to set up a hard drive for a videoserver under linux. - The videofiles will have a size of at least 10MB and a maximum of 8BG. - The hard drive has a disk space of... (1 Reply)
Discussion started by: Eggsy
1 Replies
PARTX(8)						       System Administration							  PARTX(8)

NAME
partx - tell the kernel about the presence and numbering of on-disk partitions SYNOPSIS
partx [-a|-d|-P|-r|-s|-u] [-t type] [-n M:N] [-] disk partx [-a|-d|-P|-r|-s|-u] [-t type] partition [disk] DESCRIPTION
Given a device or disk-image, partx tries to parse the partition table and list its contents. It can also tell the kernel to add or remove partitions from its bookkeeping. 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 "-" (hyphen-minus). For example: partx --show - /dev/sda3 This will see sda3 as a whole-disk rather than as a partition. partx 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 with --show or --raw. -l, --list List the partitions. Note that all numbers are in 512-byte sectors. This output format is DEPRECATED in favour of --show. Do not use it in newly written scripts. -n, --nr M:N Specify the range of partitions. For backward compatibility also the format M-N is supported. The range may contain negative num- bers, for example --nr -1:-1 means the last partition, and --nr -2:-1 means the last two partitions. Supported range specifications are: M Specifies just one partition (e.g. --nr 3). M: Specifies the lower limit only (e.g. --nr 2:). :N Specifies the upper limit only (e.g. --nr :4). M:N Specifies the lower and upper limits (e.g. --nr 2:4). -o, --output list Define the output columns to use for --show, --pairs and --raw output. If no output arrangement is specified, then a default set is used. Use --help to get list of all supported columns. This option cannot be combined with the --add, --delete, --update or --list options. -P, --pairs List the partitions using the KEY="value" format. -r, --raw List the partitions using the raw output format. -s, --show List the partitions. The output columns can be selected and rearranged with the --output option. All numbers (except SIZE) are in 512-byte sectors. -t, --type type Specify the partition table type. --list-types List supported partition types and exit. -u, --update Update the specified partitions. -S, --sector-size size Overwrite default sector size. -v, --verbose Verbose mode. -V, --version Display version information and exit. -h, --help Display help text and exit. 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 5 /dev/sdb Prints the start sector of partition 5 on /dev/sdb 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>. ENVIRONMENT
LIBBLKID_DEBUG=all enables libblkid debug output. AVAILABILITY
The partx command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux December 2014 PARTX(8)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy