LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SD Card mount issue (https://www.linuxquestions.org/questions/linux-newbie-8/sd-card-mount-issue-801650/)

beyern 04-12-2010 09:04 PM

SD Card mount issue
 
Hi everyone,

I am trying to make a copy of the SD card that my TS-7800 SBC boots from. When I plug the SD into my opensuse pc I get this error.

Error mounting: mount exited with exit code 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

There are four partitions on this card and I can only access one of them.

dmesg | tail gives me this

[ 894.422497] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

when I do e2fsck -p /dev/sdb4 I get

e2fsck: Bad magic number in super-block while trying to open /dev/sdb4
/dev/sdb4:
The superblock could not be read or does not describe a correct ext2 file system. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>

I was hoping I could just plug in both cards and do this
dd if=/dev/sdb of=/dev/sdc
to copy everything and have a back up SD card.

Any suggestions?
Thanks

modprob 04-12-2010 10:58 PM

Hi, are you sure that your sd have an ext filesystem? Because e2fsck only works with ext2/ext3/ext4. What system are running on your TS-7800?

If your not sure of the filesystem, i suggest that you go back to your TS-7800 and check the content of /etc/mtab.

beyern 04-14-2010 07:49 PM

I cant seem to view anything in mtab this is what I am getting

root@ts7800:etc# vi mtab
ex/vi: Error: /var/tmp/vi.recover: Cannot allocate memory
ex/vi: Modifications not recoverable if the session fails
ex/vi: Error: mtab: Cannot allocate memory
ex/vi: Error: Unable to create temporary file: Cannot allocate memory
root@ts7800:etc#

I am also getting problems when the ts-7800 tries to boot from the sd card.

>> Booting Linux...
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
can't create lock file /etc/mtab~651: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~655: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~660: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~663: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~667: Cannot allocate memory (use -n flag to ov)
Cleaning up ifupdown...done.
Loading kernel modules...done.
Checking all file systems...
fsck 1.37 (21-Mar-2005)
... done.
can't create lock file /etc/mtab~759: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~763: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~769: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~773: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~777: Cannot allocate memory (use -n flag to ov)
can't create lock file /etc/mtab~781: Cannot allocate memory (use -n flag to ov)
Setting up networking.../etc/rcS.d/S39ifupdown: line 75: /etc/network/run/ifstay
failed.
S39ifupdown: Error: Failure initializing /etc/network/run/ifstate
Setting up IP spoofing protection: rp_filter.
Enabling packet forwarding...done.
Configuring network interfaces...ifup: failed to open statefile /etc/network/ruy
done.
Starting portmap daemon: portmap.
Recovering nvi editor sessions... done.
INIT: Entering runlevel: 3
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting MTA: open: Cannot allocate memory
/usr/sbin/update-exim4.conf: line 260: cannot create temp file for here documeny
sed: couldn't write 46 items to stdout: No space left on device
1970-01-01 00:04:57 Exim configuration error in line 649 of /var/lib/exim4/conf:
missing quote at end of string value for client_send
1970-01-01 00:04:57 Exim configuration error in line 649 of /var/lib/exim4/conf:
missing quote at end of string value for client_send
1970-01-01 00:04:57 Exim configuration error in line 649 of /var/lib/exim4/conf:
missing quote at end of string value for client_send
exim: could not open panic log - aborting: see message(s) above
Invalid new configfile /var/lib/exim4/config.autogenerated.tmp
not installing /var/lib/exim4/config.autogenerated.tmp to
/var/lib/exim4/config.autogenerated
Starting internet superserver: inetd.
Starting OpenBSD Secure Shell server: sshd.
Starting NFS common utilities: statdStarting periodic command scheduler: cron/uy
.
Starting web server (apache2)....

Debian GNU/Linux 3.1 ts7800 ttyS0

beyern 04-15-2010 02:48 PM

this is what I see in etc/mtab on my suse pc with the SD card plugged in

/dev/sda2 / ext4 rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
/dev/sda3 /home ext4 rw,acl,user_xattr 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
securityfs /sys/kernel/security securityfs rw 0 0
gvfs-fuse-daemon /home/ben/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=ben 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/sdb3 /media/ba76f865-871f-43b1-a065-a03616b0d158 ext2 rw,nosuid,nodev,uhelper=devkit 0 0
/dev/sdb1 /media/587B-1142 vfat rw,nosuid,nodev,uhelper=devkit,uid=1000,gid=100,shortname=lower,dmask=0077,utf8=1,flush 0 0

This is what the board expects to see

Disk /dev/sdb: 2045 MB, 2045247488 bytes

63 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 3906 * 512 = 1999872 bytes

Disk identifier: 0x00000000



Device Boot Start End Blocks Id System

/dev/sdb1 1 760 1482752 c W95 FAT32 (LBA)

/dev/sdb2 760 762 4096 da Non-FS data

/dev/sdb3 762 764 4096 da Non-FS data

/dev/sdb4 764 999 459648 83 Linux

jiggersplat 05-20-2010 02:22 PM

you need to install jfsutils and mount -t jfs /dev/sdb4

Quote:

Originally Posted by beyern (Post 3936819)
this is what I see in etc/mtab on my suse pc with the SD card plugged in

/dev/sda2 / ext4 rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
/dev/sda3 /home ext4 rw,acl,user_xattr 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
securityfs /sys/kernel/security securityfs rw 0 0
gvfs-fuse-daemon /home/ben/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=ben 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/sdb3 /media/ba76f865-871f-43b1-a065-a03616b0d158 ext2 rw,nosuid,nodev,uhelper=devkit 0 0
/dev/sdb1 /media/587B-1142 vfat rw,nosuid,nodev,uhelper=devkit,uid=1000,gid=100,shortname=lower,dmask=0077,utf8=1,flush 0 0

This is what the board expects to see

Disk /dev/sdb: 2045 MB, 2045247488 bytes

63 heads, 62 sectors/track, 1022 cylinders

Units = cylinders of 3906 * 512 = 1999872 bytes

Disk identifier: 0x00000000



Device Boot Start End Blocks Id System

/dev/sdb1 1 760 1482752 c W95 FAT32 (LBA)

/dev/sdb2 760 762 4096 da Non-FS data

/dev/sdb3 762 764 4096 da Non-FS data

/dev/sdb4 764 999 459648 83 Linux


michaelk 05-20-2010 03:01 PM

FWIW you do not need to mount the partition before you can copy it with the dd command. I also believe that you can download the images from Technologic Systems FTP site.

I have a TS-7200 but it uses ext2 filesystem for its development OS on compact flash.

Typically embedded systems do not use journaling filesystems. Also you should never edit the mtab file. The output of the mount command (without options) is the contents of the mtab file or you can use the cat command.


All times are GMT -5. The time now is 10:15 AM.