求助!!! 在Ubuntu下挂载树莓派镜像GG了

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
摩洛哥
帖子: 2
注册时间: 2016-09-20 15:24
系统: ubuntu 12.04 LTS

求助!!! 在Ubuntu下挂载树莓派镜像GG了

#1

帖子 摩洛哥 » 2016-09-20 17:31

求助!!!
在Ubuntu下挂载树莓派镜像
$sudo mkdir /mnt/rasp-pi-rootfs
$sudo mount -o loop,offset=62914560 2015-05-05-raspbian-wheezy.img /mnt/rasp-pi-rootfs
出现以下错误:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 求助!!! 在Ubuntu下挂载树莓派镜像GG了

#2

帖子 vickycq » 2016-09-20 18:11

代码: 全选

$ sudo fdisk -l 2015-05-05-raspbian-wheezy.img
[sudo] password for vicky: 
Disk 2015-05-05-raspbian-wheezy.img: 3.1 GiB, 3276800000 bytes, 6400000 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
Disklabel type: dos
Disk identifier: 0xa6202af7

Device                          Boot  Start     End Sectors Size Id Type
2015-05-05-raspbian-wheezy.img1        8192  122879  114688  56M  c W95 FAT32 (LBA)
2015-05-05-raspbian-wheezy.img2      122880 6399999 6277120   3G 83 Linux

$ python
Python 2.7.12+ (default, Sep  1 2016, 20:27:38) 
[GCC 6.2.0 20160822] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 122880*512
62914560
>>> 

$ sudo mount -o offset=62914560 -t ext4 2015-05-05-raspbian-wheezy.img /mnt

$ ls /mnt
bin   dev  home  lost+found  mnt  proc  run   selinux  sys  usr
boot  etc  lib   media       opt  root  sbin  srv      tmp  var

$ cat /mnt/etc/issue
Raspbian GNU/Linux 7 \n \l
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
摩洛哥
帖子: 2
注册时间: 2016-09-20 15:24
系统: ubuntu 12.04 LTS

Re: 求助!!! 在Ubuntu下挂载树莓派镜像GG了

#3

帖子 摩洛哥 » 2016-09-20 18:37

刚刚按照您的方法操作了一遍,还是不行 :Cry :Cry :Cry 我用的是ubuntu 12.04 LTS
显示如下:
mount:文件系统类型错误、选项错误、/dev/loop0 有坏超级块,
缺少代码页或助手程序,或其他错误
有些情况下在 syslog 中可以找到一些有用信息- 请尝试
dmesg | tail 这样的命令看看。
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 求助!!! 在Ubuntu下挂载树莓派镜像GG了

#4

帖子 vickycq » 2016-09-20 19:10

摩洛哥 写了:mount:文件系统类型错误、选项错误、/dev/loop0 有坏超级块
看看咱俩的 2015-05-05-raspbian-wheezy.img 一样吗?我的是从这下载的:
http://ftp.jaist.ac.jp/pub/raspberrypi/ ... wheezy.zip

代码: 全选

$ md5sum 2015-05-05-raspbian-wheezy.img
6eef7926c8ef67e613e0daed35d3c1b4  2015-05-05-raspbian-wheezy.img
$ sha256sum 2015-05-05-raspbian-wheezy.img
f97a255a647a7f647cd157f81a699a93ffdd947de14698fad7e3a5a46643dd2c  2015-05-05-raspbian-wheezy.img
关键是 -o offset 要正确(122880*512=62914560),-t ext4 文件系统类型要正确
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
回复