Some partitions after a mobile hard disk is attached to Debian cannot be identified.

Source: Internet
Author: User

Some partitions after a mobile hard disk is attached to Debian cannot be identified.

There is a new 1 TB mobile hard drive. After buying and formatting it into ntfs, we simply divided the partition several times. 4G hard disk PE, fast interaction of 800 GB, the remaining GB is divided into two equal storage disks.

Debian 7.0 Wheezy test experience

Debian 7.0 Wheezy released!

Debian7 (Wheezy) and basic configuration for hard disk installation

After the USB interface is inserted into the computer, four drive letters are automatically displayed on the desktop. There is no problem with opening the first two, and the write and read operations are normal. If you double-click the next two items, an error is returned:

Error mounting: mount exited with exit code 1: helper failed:
Unprivileged user can not mount NTFS block devices using the external FUSE
Library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information
Http://tuxera.com/community/ntfs-3g-faq/#unprivileged

The general idea is that this ntfs-3g does not have the permission to mount, whether it is root or not.

Now we can solve this problem:

First look at the Mount, first unplug the mobile hard disk and then plug in the execution, you will find that sdb3, sdb5 more

Root @ debian:/# cat/etc/mtab & nbsp;
Rootfs/rootfs rw 0 0
Sysfs/sys sysfs rw, nosuid, nodev, noexec, relatime 0 0
Proc/proc rw, nosuid, nodev, noexec, relatime 0 0
Udev/dev devtmpfs rw, relatime, size = 10240 k, nr_inodes = 1015602, mode = 755 0 0
Devpts/dev/pts devpts rw, nosuid, noexec, relatime, gid = 5, mode = 620, ptmxmode = 000 0 0
Tmpfs/run tmpfs rw, nosuid, noexec, relatime, size = 813700 k, mode = 755 0 0
/Dev/disk/by-uuid/4c0000d8c-0000c-4601-b76d-eff7118d6775/ext4 rw, relatime, errors = remount-ro, user_xattr, barrier = 1, data = ordered 0 0
Tmpfs/run/lock tmpfs rw, nosuid, nodev, noexec, relatime, size = 5120 k 0 0
Tmpfs/run/shm tmpfs rw, nosuid, nodev, noexec, relatime, size = 4446660 k 0 0
Fusectl/sys/fs/fuse/connections fusectl rw, relatime 0 0
Rpc_pipefs/var/lib/nfs/rpc_pipefs rw, relatime 0 0
Binfmt_misc/proc/sys/fs/binfmt_misc rw, nosuid, nodev, noexec, relatime 0 0
/Dev/sdb3/media/PE vfat rw, nosuid, nodev, relatime, uid = 1000, gid = 1000, fmask = 0022, dmask = 0077, codepage = cp437, iocharset = utf8, shortname = mixed, showexec, utf8, flush, errors = remount-ro 0 0
/Dev/sdb5/media/T1 fuseblk rw, nosuid, nodev, relatime, user_id = 0, group_id = 0, default_permissions, allow_other, blksize = 4096 0 0

We can see that sdb is my mobile hard drive, but only two drive letters are mounted.
 
View hard disk status

Fdisk-l

Disk/dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/4096 bytes
I/O size (minimum/optimal): 4096 bytes/4096 bytes
Disk identifier: 0xb73dddb4

Device Boot Start End Blocks Id System
/Dev/sda1*2048 209719295 104858624 7 HPFS/NTFS/exFAT
Partition 2 does not start on physical sector boundary.
/Dev/sda3 1258387456 1925328895 333470720 83 Linux
/Dev/sda4 1925330944 1953523711 14096384 82 Linux swap/Solaris

Disk/dev/sdb: 1000.2 GB, 1000204138496 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953523708 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x6b7612b3

Device Boot Start End Blocks Id System
/Dev/sdb1 209921355 839685419 314882032 + 7 HPFS/NTFS/exFAT
/Dev/sdb2 839685420 1953520064 556917322 + 7 HPFS/NTFS/exFAT
/Dev/sdb3 63 8401994 4200966 B W95 FAT32
/Dev/sdb4 8401995 209921354 100759680 f W95 Ext 'd (LBA)
/Dev/sdb5 8402058 209921354 100759648 + 7 HPFS/NTFS/exFAT

Partition table entries are not in disk order

Note that the Disk/dev/sdb 1000.2 GB is identified here.

However, an error occurred while mounting. An error is reported below,

Partition table entries are not in disk order

The hard disk partition table is not in the hard disk order, which means that the Partition Table of the mobile hard disk is messy,

This is simple. You can use fdisk to recreate the partition table. Then, use fdisk to mount the device, and then use f w to update the partition table.

Root @ debian:/# fdisk/dev/sdb

Command (m for help): x

Expert command (m for help): f
Done.

Expert command (m for help): m
Command action
B move beginning of data in a partition
C change number of cylinders
D print the raw data in the partition table
E list extended partitions
F fix partition order
G create an IRIX (SGI) partition table
H change number of heads
I change the disk identifier
M print this menu
P print the partition table
Q quit without saving changes
R return to main menu
S change number of sectors/track
V verify the partition table
W write table to disk and exit

Expert command (m for help): p

Disk/dev/sdb: 255 heads, 63 sectors, 121601 cylinders

Nr AF Hd Sec Cyl Start Size ID
1 00 1 1 0 254 63 522 63 8401932 0b
2 00 0 1 523 254 63 1023 8401995 201519360 0f
3 00 254 63 1023 254 1023 209921355 629764065 07
4 00 254 63 1023 254 1023 839685420 1113834645 07
5 00 1 1 523 254 63 1023 63 201519297 07

Expert command (m for help): w
The partition table has been altered!

Calling ioctl () to re-read partition table.
Syncing disks.

The partition table is successfully updated here, because I am a mobile hard disk and the operating system OS is not mounted on it, so I do not need to update the Mount/etc/fstab and/boot/grub/menu. list.

Run fdisk-l again and find that the disk has been mounted successfully. You can click it on the desktop directly.

Disk/dev/sdb: 1000.2 GB, 1000204138496 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953523708 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x6b7612b3

Device Boot Start End Blocks Id System
/Dev/sdb1 63 8401994 4200966 B W95 FAT32
/Dev/sdb2 8401995 209921354 100759680 f W95 Ext 'd (LBA)
/Dev/sdb3 209921355 839685419 314882032 + 7 HPFS/NTFS/exFAT
/Dev/sdb4 839685420 1953520064 556917322 + 7 HPFS/NTFS/exFAT
/Dev/sdb5 8402058 209921354 100759648 + 7 HPFS/NTFS/exFAT

Df: Check that the mount point is successfully mounted.

Root @ debian:/# df
Filesystem 1K-blocks Used Available Use % Mounted on
Rootfs 328236772 10801844 300761392 4%/
Udev 10240 0 10240 0%/dev
Tmpfs 813700 972 812728 1%/run
/Dev/disk/by-uuid/4c0000d8c-0000c-4601-b76d-eff7118d6775 328236772 10801844 300761392/
Tmpfs 5120 0 5120 0%/run/lock
Tmpfs 4446660 26196 4420464 1%/run/shm
/Dev/sdb1 4192756 578312 3614444 14%/media/usb0
/Dev/sdb5 100759648 14680144 86079504 15%/media/T1
/Dev/sdb3 314882032 35480048 279401984 12%/media/T2
/Dev/sdb4 556917320 193748248 363169072 35%/media/T3

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.