Sponsored Content
Operating Systems Linux Ubuntu Memory card partition table corrupted after unsafe removal Post 302898743 by Perderabo on Wednesday 23rd of April 2014 01:46:22 PM
Old 04-23-2014
I find it hard to believe that an unsafe removal trashed the partition table. Unsafe removals are supposed to trash the file system metadata. I never believe anything that fdisk has to say. Switch to a better utility like parted. I just plugged a factory fresh thumb drive into my workstation....
Code:
#
# ls -ltr | tail -5
crw------- 1 root  root   442, 10242 Apr 23 13:28 usbdev6.3_ep02
crw------- 1 root  root    21,     2 Apr 23 13:28 sg2
brw-r----- 1 root  disk     8,    16 Apr 23 13:28 sdb
brw-r----- 1 root  disk     8,    17 Apr 23 13:28 sdb1
crw-rw-rw- 1 root  tty      5,     2 Apr 23 13:34 ptmx
# parted /dev/sdb print

Model: Lexar USB Flash Drive (scsi)
Disk /dev/sdb: 8017MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      12.3kB  8017MB  8017MB  primary  fat32        lba

Information: Don't forget to update /etc/fstab, if necessary.

# fsck -n /dev/sdb1
fsck 1.39 (29-May-2006)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Free cluster summary wrong (4294967295 vs. really 1953276)
  Auto-correcting.
Leaving file system unchanged.
/dev/sdb1: 1 files, 1/1953277 clusters
#

So /dev/sdb and /dev/sdb1 popped into existence when I plugged in my thumb drive. /dev/sdb is the physical device. It has a partition table that defines partition 1. So, predictably, I also get a device called /dev/sdb1 to correspond to my partition 1.

Note that I ran fsck on /dev/sdb1, not /dev/sdb. If I want to mount my thumb drive I do this....
Code:
# mount /dev/sdb1 /mnt
# df -k /mnt
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb1              7813108         4   7813104   1% /mnt
#


You ran fsck on /dev/sdc. That was probably a mistake and it may have trashed your partition table. It should have been /dev/sdc1.
 

10 More Discussions You Might Find Interesting

1. Solaris

recovery partition table from fdisk?

I have two disks on a sun blade 100. I just installed a solaris8 on the first disk. The installation was successful. But the problem is now I lost all data / partition on my second hard disk. The possible reason could be: 1. I used default web start install. During the installation I didn't... (2 Replies)
Discussion started by: motor98
2 Replies

2. UNIX for Advanced & Expert Users

resizing the partition table

Host 1 ------- Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 1911 18.56GB (1912/0/0) 38913024 1 swap wu 1912 - 5434 34.19GB (3523/0/0) 71700096 2 backup wm 0 - 14086 136.71GB ... (5 Replies)
Discussion started by: sriny
5 Replies

3. UNIX for Advanced & Expert Users

modify a predefined partition table on Solaris

I want to modify a predefined partition on Solaris. This predefined partion has 51 GB. I want to partition it as two partition. One is 5G, another one is about 46 GB. I want to use these commands: #format specify disk #partition # modify The system told me that ' Cannot modify disk... (1 Reply)
Discussion started by: duke0001
1 Replies

4. Solaris

Can I put my own tags in a partition table

I have X4500 running Solaris 10. I have formatted a disk and created partition table as given below. Specify disk (enter its number): 0 selecting c0t0d0 /dev/dsk/c0t0d0s0 is part of active ZFS pool zpool1. Please see zpool(1M). FORMAT MENU: disk - select a disk ... (3 Replies)
Discussion started by: bharu_sri
3 Replies

5. Solaris

usb memory card

I just got a removable memory card. I tried the following bu still my OS solaris x86 cannot detect it and also i got an error touch /reconfigure init 0 I inserted the removable memory card and the powered the system on I got the following on at boot up when i fully logged in I did ... (2 Replies)
Discussion started by: seyiisq
2 Replies

6. Slackware

Help me!!!! - Slackware 12 Issue - Invalid Partition table

Hi All, I am a linux newbie. After working with my loveable FEDORA 10 for months, i found it a bit slower. I wanted to try with slackware this time. I already had Windows XP and fedora in my 80 GB SATA disk. Now i allotted 15 GB ( SWAP + / + /home/usr ). During my installation i encountered no... (5 Replies)
Discussion started by: beinthemiddle
5 Replies

7. Solaris

Manually editing partition table

I'm manually editing the partition table purely for experimenting. I did prtvtoc /dev/dsk/c1t0d0s2 > /tmp/prtvtoc I'm trying to split up partition 5 to make partition 6. I'm running into a cylinder boundary error on partition 6. Any clues? # vi /tmp/prtvtoc "/tmp/prtvtoc" 23 lines, 769... (1 Reply)
Discussion started by: adelsin
1 Replies

8. SCO

Backup MBR an Partition Table

hi How can I backup MBR an Partition Table of SCO 5.0.6? (7 Replies)
Discussion started by: ccc
7 Replies

9. Red Hat

This doesn't look like a partition table Probably you selected the wrong device.

Hi, I need to mount the device from this device # fdisk -l . . . Disk /dev/sdas: 2000.4 GB, 2000365289472 bytes 255 heads, 63 sectors/track, 243197 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size... (0 Replies)
Discussion started by: justbow
0 Replies

10. Programming

How do I partition an Oracle 11g Table?

Hello, I have a database called "audit_database" and I want to create two tables. Table 1 = Table 1 Table 2 = Audit I want to partition the Audit table into partitions grouped by month. I'm not familiar with table partitioning but doing some reading online shows that it can be done but... (4 Replies)
Discussion started by: bbbngowc
4 Replies
tgt-setup-lun(8)					      System Manager's Manual						  tgt-setup-lun(8)

NAME
tgt-setup-lun - creates a target, adds a device to the target and defines initiators that can connect to the target SYNOPSIS
tgt-setup-lun -d device -n target_name [initiator_IP1 initiator_IP2 ...] [-h] DESCRIPTION
Starts tgtd if necessary and creates a target according to the supplied target_name. The format of the target name is as follows: iqn.2001-04.com.<hostname>-<target_name> The target name must be unique. The script then adds the requested device to the target. If specific IP addresses are defined, it adds them to the list of allowed initia- tors for that target. If no IP addresses is defined, it defines that the target accepts any initiator. EXAMPLES
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81: tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81 and 192.168.10.82: tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82 Create a target that uses /dev/sdb1 and allows connections from any initiator: tgt-setup-lun -d /dev/sdb1 -n my_target Display help: tgt-setup-lun -h AUTHOR
Written by Erez Zilber REPORTING BUGS
Report bugs to <erezz@voltaire.com>. COPYRIGHT
Copyright (C) Voltaire Ltd. 2008. tgt-setup-lun(8)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy