顯示具有 mount 標籤的文章。 顯示所有文章
顯示具有 mount 標籤的文章。 顯示所有文章

2014年10月21日 星期二

Mounting a hard disk image with partitions

$ file mydebian.img
mydebian.img: DOS/MBR boot sector

$ fdisk -l mydebian.img

Disk mydebian.img.141022: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders, total 83886080 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: 0x00094e94

                   Device Boot      Start         End      Blocks   Id  System
mydebian.img.p1            2048    81790975    40894464   83  Linux
mydebian.img.p2        81793022    83884031     1045505    5  Extended
mydebian.img.p5        81793024    83884031     1045504   82  Linux swap / Solaris
$ mount -o loop,offset=$((2048 * 512)) mydebian.img /mnt




References :
Mounting a hard disk image including partitions using Linux | andremiller.net
Loop-mounting partitions from a disk image

2013年3月14日 星期四

Linux mount CIFS Windows Share

# mount -t cifs //192.168.24.200/share-name /mnt -o username=shareuser,password=sharepassword,uid=1000



# vi /etc/fstab
192.168.5.3:/share/data     /mnt   nfs     defaults        0       0



Reference :
Linux mount CIFS Windows Share

2012年6月7日 星期四

Linux mount NTFS

# vi /etc/fstab

/dev/hda6 /media/sda6/ ntfs-3g rw,defaults,umask=00002,locale=zh_TW.utf8  0 0


2012年5月2日 星期三

mount: wrong fs type, bad option, bad superblock on /dev/sdb1,

# mount /dev/sdb1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


$ dmesg
EXT3-fs error (device sdb1): ext3_check_descriptors: Block bitmap for group 0 not in group (block 1128420181)!
group descriptors corrupted


檢查檔案系統
# fsck -c -y /dev/sdb1  // 檢查後分區有恢復, 檔案也有部份修復, 但大部份還是遺失或跑到 lost+found


修復 superblock


testdisk 分割區與檔案救援

用 Quick Search 沒找回, 沒試過 Deeper Search



Reference :
用fsck檢查、修復linux檔案系統 @ 一些有的沒的 :: 隨意窩 Xuite日誌
Gavin's Linux學習手札: 硬盤ext2/3文件系統superblock損壞修復試驗 (轉載) - yam天空部落
今天的 Tetralet 又在唧唧喳喳了 | 使用 TestDisk 來進行磁碟救援!
TestDisk Step By Step - CGSecurity
How to Recover Partition Table using Test Disk
TestDisk & PhotoRec——兩個資料恢復軟體
删除Linux分区后恢复Linux分区-无图版_百度文库 
ext3文件系统超级块损坏修复_心路历程_百度空间 
Rex's blah blah blah » Linux 上處理壞軌硬碟的兩三事 
永遠的真田幸村: Linux平台使用SSD必讀 (範例為Ubuntu) - Collablog Portal - yblog.org