LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dd ntfs to fat32 (https://www.linuxquestions.org/questions/linux-newbie-8/dd-ntfs-to-fat32-464598/)

sr_25 07-16-2006 01:55 PM

dd ntfs to fat32
 
I have read the very informative thread here about the dd command and thought I should tinker around with it. Here is what I did. I booted up my IBM laptop with Puppy 2 cd.
Code:

dd if=/dev/hda1 skip=1 of=/dev/sda1 seek=1 bs=4k conv=noerror
Worked just fine I could browse the new copy of my drive everything worked flawlessly. After a reboot though I can't access the newly copied partition at all. I tried mounting with MUT and it doesn't allow me to browse it.
dmesg | tail yields this:
Code:

    File system has been set read-only
FAT: Filesystem panic (dev sda1)
    invalid access to FAT (entry 0x00b80010)
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
FAT: Filesystem panic (dev sda1)
    invalid access to FAT (entry 0x00b80010)
    File system has been set read-only
FAT: Filesystem panic (dev sda1)
    invalid access to FAT (entry 0x00b80010)
    File system has been set read-only

So I tried to mount as read only but no dice.
Code:

mount -t vfat -o ro /dev/sda1 /mnt/test
after creating the test folder of course. What have I done wrong?

david_ross 07-16-2006 02:01 PM

If it was ntfs on hda1 it will still be ntfs on sda1. Try mounting it with the ntfs driver.

sr_25 07-16-2006 02:08 PM

tried:
mount -t ntfs -o user,ro /dev/sda1 /mnt/test

output of dmesg | tail
Code:

FAT: Filesystem panic (dev sda1)
    invalid access to FAT (entry 0x00b80010)
FAT: Filesystem panic (dev sda1)
    invalid access to FAT (entry 0x00b80010)
NTFS-fs warning (device sda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
NTFS-fs error (device sda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
NTFS-fs error (device sda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device sda1): ntfs_fill_super(): Not an NTFS volume.
NTFS-fs error (device sda1): parse_options(): Unrecognized mount option user.
NTFS-fs error (device sda1): parse_options(): Unrecognized mount option user.

/edit
Looks like to me I could fix the mbr and actually boot this in windows, but I just want to be able to look at through linux for now.

pixellany 07-16-2006 02:09 PM

What is the reason for skipping the first 4K Bytes of the partition? I suspect that you have left out some crucial file system info.

Matir 07-16-2006 02:11 PM

Yeah, the skip/seek would have a tendency to screw things up when you don't copy the whole partition.

sr_25 07-16-2006 07:16 PM

http://www.linuxquestions.org/questi...light=learn+dd

Quote:

dd if=/dev/sda skip=1 of=/dev/sdb seek=1 bs=4k conv=noerror
Skip skips input blocks at the beginning of the media(sda). Seek skips over so many blocks on the output media before writing(sdb). By doing this, you leave the first 4k bytes on each drive untouched. You don't want to tell a drive it is bigger than it really is by writing a partition table from a larger drive to a smaller drive. The first 63 sectors of a drive are empty, except sector 1, the MBR.
The only difference that I think this makes is the fact that the partitions are different sizes and my original XP partition is primary and the copied to partition is logical. If I were cloning this drive to use as a boot partition I would have copied over the mbr also, but my intent was to just be able to read the data! This was just an exercise for me ;), but I would like to understand it.

Matir 07-16-2006 07:52 PM

Yes, the skip/seek might apply when copying a whole disk to another, but not from one partition to another. When using partitions, your are only copying filesystems and so you should copy from the very beginning on.

sr_25 07-16-2006 07:56 PM

Gotcha, so I messed up again! At least I know now, rather than later, when I might really need it! I missed that subtle difference when reading the dd post!

Matir 07-16-2006 08:03 PM

That's alright, it's why we're here. :)

Hope it works for you now.


All times are GMT -5. The time now is 08:04 AM.