WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dd or fstab do not work properly  (Read 3174 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
dd or fstab do not work properly
« on: October 09, 2012, 08:17:33 AM »
I am following this guide: http://nookdevs.com/Nook_Simple_Touch/Rooting/Manual
At some point i have to use the command "dd if=noogie.img of=/dev/sdb bs=1M":

Code: [Select]
root@box:/home/tc/nook# dd if=noogie.img of=/dev/sdb bs=1M
76+0 records in
76+0 records out
79691776 bytes (76.0MB) copied, 7.407609 seconds, 10.3MB/s
root@box:/home/tc/nook#

After this operation, however, the disc can no longer mount with MountTool or mount command:

fdisk -l
Code: [Select]
Disk /dev/sdb: 3963 MB, 3963617280 bytes
128 heads, 32 sectors/track, 1890 cylinders, total 7741440 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          32      155647       77808    c  W95 FAT32 (LBA)
root@box:/home/tc/nook#


Code: [Select]
root@box:~# mount /dev/sdb1
mount: can't find /dev/sdb1 in /etc/fstab or /etc/mtab
root@box:~# mount /mnt/sdb1
mount: can't find /mnt/sdb1 in /etc/fstab or /etc/mtab
root@box:~# mount /dev/sdb1 /mnt/sdb1
mount: you must specify the filesystem type
root@box:~# mount -t vfat /dev/sdb1 /mnt/sdb1
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

root@box:~#

what's the problem?


Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: dd or fstab do not work properly
« Reply #1 on: October 09, 2012, 08:37:00 AM »
Hi vinnie
Quote
dd if=noogie.img of=/dev/sdb bs=1M
The command did exactly what you told it to. It copied the file to sdb starting at the first sector, which is where
things like the partition table and boot record are stored. If you Google on  linux dd  I believe the parameter
you want to add to that command is  seek.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: dd or fstab do not work properly
« Reply #2 on: October 09, 2012, 09:22:04 AM »
Hi vinnie
If that file really belongs at the first sector, you could try running:
Code: [Select]
sudo rebuildfstabprior to mounting and see if that helps.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: dd or fstab do not work properly
« Reply #3 on: October 09, 2012, 10:10:09 AM »
You may need to reboot for the kernel to re-read the partition table.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: dd or fstab do not work properly
« Reply #4 on: October 09, 2012, 10:28:38 AM »
To avoid rebooting you could try:
"hdparm -z /dev/sdb"
or possibly
"echo 1 >/sys/block/sdb/device/rescan"
as root (not sudo)
USE WITH CAUTION
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: dd or fstab do not work properly
« Reply #5 on: October 09, 2012, 06:50:02 PM »
The copy of the image with dd works (I tried on the player) but I could not mount the flash on linux, I tried with both the rebuildfstab (but from what I remember is launched automatically by the graphical tool MounTool) and a reboot.
I could only see it after I inserted the sd in the eBook reader and then reinsert on the computer with tinycore.