Prev: NYC LOCAL: Wednesday 7 April 2010 NYCBUG: Marco Figueroa on Nepenthes Against Script Kiddies
Next: How deep an I buried?
From: Robert Heller on 7 Apr 2010 18:49 At Wed, 7 Apr 2010 14:37:42 -0700 Keith Keller <kkeller-usenet(a)wombat.san-francisco.ca.us> wrote: > > On 2010-04-07, Robert Heller <heller(a)deepsoft.com> wrote: > > > > In order to reformat the drives, you need to repartion them first. > > Is that true? I don't know if USB drives are any different, but I know > you can lay down a filesystem on an entire unpartitioned drive. (It > might not be usable in Windows, but if the OP is using ext3 I take it > that's not an issue.) Typically, out-of-the-box, retail USB (and Firewire) drives (ones assembled and ready to 'just plug in' are (factory) partitioned to have one FAT/MS-DOS partition (unless it is a drive meant for a Mac (eg bought at an Apple Store -- aka an iDrive or whatever Apple calls the external drives it sells for Macs), in which case it will be partitioned for a Mac with a MacOS file system on it) that is the size of the whole disk. *Bare* (IDE, SCSI, SATA, etc.) drives come from the factory with no partition table. Yes, you can lay down a filesystem on an entire unpartitioned drive, but *I* would not recomend it for anything other than a floppy. > > --keith > > > -- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
From: Robert Nichols on 7 Apr 2010 21:41 On 04/07/2010 04:51 PM, Grant Edwards wrote: > > AFAICT, nobody uses the "type" field in the partition table (except > maybe Windows/DOS does?). I rarely bother to repartition a drive when > I change a USB thumb drive from vfat to to ext. There are actually 16 partition types that the kernel treats specially. The "extended" types (5, 0x85, 0x0f) are the most commonly encountered, but Linux RAID autodetect (0xfd) also gets special treatment as do several BSD partition types and a few others that can contain sub- partitions. But aside from those (and of course 0 for "empty"), yes nothing in Linux much cares about partition type codes. -- Bob Nichols AT comcast.net I am "RNichols42"
From: Kevin the Drummer on 8 Apr 2010 14:17 David W. Hodgins <dwhodgins(a)nomail.afraid.org> wrote: > On Wed, 07 Apr 2010 14:37:48 -0400, Kevin the Drummer <nobody(a)cosgroves.us> wrote: > > > Am I supposed to be able to use mkfs.ext[34] to format new > > external drives over USB? I've never had that work, regardless > > Yes, it should work. You haven't said which distribution or > version you are using. With a newer distribution using udev, > I'd expect it to automatically load the necessary modules. Mandriva 2007.0 running on an ABIT AV8 3rd-Eye mobo didn't work with a Seagate ATA (IDE) drive in a Macally USB/firewire enclosure when using the USB connection. Mandriva 2010.0 running on an Tyan Tomcat K8E mobo didn't work with a Western Digital SATA drive in a Macally eSATA/USB/firewire enclosure when using the USB connection. > Try loading the usb_storage module, then connect the external > drive. Check /var/log/syslog to find out what device name > it has. Then use gparted, or cfdisk to partition it > > After that, run the mkfs.ext3 or 4 command to format the > filesystem. > > If any of the above fail, post exactly what you did, and what > error messages show up. What I did was to put the bare drives fresh from the factory into my external enclosures, connect them via USB to my computer, and start mcc (Mandriva Control Center). From there I selected local disk management, clicked the unformated visual display of the disk, navigated a dialog including my choice of filesystem (variously choosing swap and ext4, depending on the partition) my choice of partition size, and mount point. Then I clicked to format the drive and chose "yes" to the question as to whether to scan for bad blocks. I always choose "yes" for that on new drives or drives suspected of failing. In an xterm I could see "badblocks" and "mkfs.ext4" running using 'top'. Some amount of time later the GUI for formatting indicated that the process failed. Later I opened the enclosure of one of the SATA drives, connected the drive SATA connector to my mobo SATA connector, powered the drive from the external enclosure. It seems my power supply only has the old-style power connectors, but my drive has the new SATA power connectors and nothing in my system, other than the external enclosure, can power the drive. After hooking up the drive this way I went through the exact drive partitioning, block checking and formatting process. It took about the same amount of time, and it succeeded. The 2nd of my two 1TB drives is formatting right now. It sure would be more convenient to be able to do this over USB or firewire. It seems that something might be wrong with my system given the responses I've seen to my post thusfar. Thanks... -- PLEASE post a SUMMARY of the answer(s) to your question(s)! Unless otherwise noted, the statements herein reflect my personal opinions and not those of any organization with which I may be affiliated.
From: David W. Hodgins on 8 Apr 2010 14:58 On Thu, 08 Apr 2010 14:17:23 -0400, Kevin the Drummer <nobody(a)cosgroves.us> wrote: > What I did was to put the bare drives fresh from the factory into > my external enclosures, connect them via USB to my computer, > and start mcc (Mandriva Control Center). From there I selected > local disk management, clicked the unformated visual display of > the disk, navigated a dialog including my choice of filesystem > (variously choosing swap and ext4, depending on the partition) > my choice of partition size, and mount point. Then I clicked to > format the drive and chose "yes" to the question as to whether > to scan for bad blocks. I always choose "yes" for that on new > drives or drives suspected of failing. In an xterm I could see > "badblocks" and "mkfs.ext4" running using 'top'. Some amount > of time later the GUI for formatting indicated that the process > failed. The gui is not showing the actual messages from mkfs. The disk management program is diskdrake. If you run "sudo diskdrake" from a terminal, and then format the filesystem, any errors from mkfs will show up in the terminal. Regards, Dave Hodgins -- Change nomail.afraid.org to ody.ca to reply by email. (nomail.afraid.org has been set up specifically for use in usenet. Feel free to use it yourself.)
From: Kevin the Drummer on 9 Apr 2010 12:28
David W. Hodgins <dwhodgins(a)nomail.afraid.org> wrote: > The gui is not showing the actual messages from mkfs. Yeah, I know. :-( But, I gave you what I had at the time. I think I said in yesterday's posting that hooking the drive up internally allowed formatting to work fine. > The disk management program is diskdrake. If you run "sudo > diskdrake" from a terminal, and then format the filesystem, any > errors from mkfs will show up in the terminal. Even tho formatting worked fine, I messed up and formatted in ext4, which would be fine except for that one of my machines is running an old enough distro that it can't read ext4. The good news is that this gave me an opportunity to once again try formatting over USB, this time without the badblocks check because that already passed the test. This time I used this command in an xterm, 'mkfs.ext3 /dev/sdf1' That worked great, as did sdf5. /dev/sdf6 just hung. Before it hung I got this on stdout/stderr: mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1921984 inodes, 3839527 blocks 191976 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=3934257152 118 block groups 32768 blocks per group, 32768 fragments per group 16288 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208 Writing inode tables: 16/118 34/118 53/118 71/118 89/118 107/118 done ext2fs_mkdir: Attempt to read block from filesystem resulted in short read while creating root dir As a result of mkfs.ext3 lots of things showed up in /var/log/messages Apr 8 23:21:22 : sd 9:0:0:0: SCSI error: return code = 0x8000002 Apr 8 23:21:22 : sdf: Current: sense key: Aborted Command Apr 8 23:21:22 : Additional sense: Apr 8 23:21:22 : Logical unit communication CRC error (Ultra-DMA/32) Apr 8 23:21:22 : end_request: I/O error, dev sdf, sector 96238085 Apr 8 23:21:22 : Buffer I/O error on device sdf8, logical block 2168 Lots of the above! And then lots of this: Apr 8 23:21:32 : lost page write due to I/O error on sdf8 Apr 8 23:21:32 : 9:0:0:0: rejecting I/O to dead device Apr 8 23:21:35 message repeated 12315 times Apr 8 23:21:35 : end_request: I/O error, dev fd0, sector 0 Apr 8 23:21:35 : 9:0:0:0: rejecting I/O to dead device Apr 8 23:21:37 message repeated 3800 times Apr 8 23:21:37 : printk: 717821 messages suppressed. Apr 8 23:21:37 : Buffer I/O error on device sdf8, logical block 123994996 Apr 8 23:21:37 : lost page write due to I/O error on sdf8 Apr 8 23:21:37 : 9:0:0:0: rejecting I/O to dead device Apr 8 23:21:42 message repeated 16327 times Apr 8 23:21:42 : printk: 727278 messages suppressed. Two of my 15GB partitions, the first two, formatted fine. The 3rd 15GB partition had big trouble, like above. The last partition, the remainder of the 1TB drive, also failed in the same way. All of this was on a different computer than what I used the first time when trying formatting over USB. This computer is running Mandriva 2007.0 on an ASUS P4U800X motherboard. The drive is a 1TB SATA Western Digital drive in a Macally enclosure hooked up to the computer via USB2. I hope that's better info this time around. Thanks.... -- PLEASE post a SUMMARY of the answer(s) to your question(s)! Unless otherwise noted, the statements herein reflect my personal opinions and not those of any organization with which I may be affiliated. |