Does linux have some form of virtual block device that could be
used to create a /dev/XXb, /dev/XXb1.  In freebsd to get to this
whole device image I would do (using linux file system paths to
make it easier to understand):

dd if=/dev/sdb of=imageofdisk.img
mdconfig -f imageofdisk.img     # This would create /dev/mda, /dev/mda1
mount -t msdos /dev/mda1 /mnt

I could also do fdisk /dev/mda at that point and see the partition
table.

Could also do
dd if=/dev/mda of=/dev/sdc      # Create a new copy
dd if=imageofdisk.img of=/dev/sdc       # Same


> Ditto what Tomas said. For looking at it locally, dd'ing the partition
> (/dev/sdb1) is fine, but to make a full backup of the CF card so that you
> can reproduce it, you want an image of /dev/sdb as well. The loopback
> device (see losetup) is a fun trick, worth learning about.

Yes, very important point here...

> 
> On Thu, Aug 8, 2019 at 9:50 AM Tomas Kuchta <tomas.kuchta.li...@gmail.com>
> wrote:
> 
> > If you dd sdb1, you will still need the boot sector and partition table
> > from sdb to be able to use the new CF card.
> >
> > -T
> >
> > On Thu, Aug 8, 2019, 12:25 <mich...@robinson-west.com> wrote:
> >
> > > That's the secret sauce!  /dev/sdb1 instead of /dev/sdb.  Thank you ;-)
> > >
> > > August 8, 2019 11:19 AM, a...@clueserver.org wrote:
> > >
> > > > On your dd command try using /dev/sdb1 instead of /dev/sdb.
> > > >
> > > > dd if=/dev/sdb1 of=image.img
> > > >
> > > > mount -o loop image.img /mnt
> > > >
> > > >> [mrobinson@turion-roch-robinson-west-com ~]$ sudo fdisk -l /dev/sdb
> > > >>
> > > >> Disk /dev/sdb: 1018 MB, 1018773504 bytes, 1989792 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 label type: dos
> > > >> Disk identifier: 0x001c2022
> > > >>
> > > >> Device Boot Start End Blocks Id System
> > > >> /dev/sdb1 * 63 1989791 994864+ c W95 FAT32 (LBA)
> > > >> [mrobinson@turion-roch-robinson-west-com ~]$
> > > >>
> > > >> The partition starts at 63, how do I use losetup?
> > > >>
> > > >> August 8, 2019 10:42 AM, "Ken Stephens" <kennethgsteph...@gmail.com>
> > > >> wrote:
> > > >>
> > > >>> Micheal,
> > > >>>
> > > >>> You using losetup to mount the image to a /dev/loop0?
> > > >>>
> > > >>> Ken
> > > >>>
> > > >>> On Thu, Aug 8, 2019 at 8:37 AM <mich...@robinson-west.com> wrote:
> > > >>
> > > >> The server uses a CF card in place of a hard disk. The server oddly
> > > >> enough
> > > >> is Windows 98 SE based. I have a CentOS 7 box with a USB CF card
> > > >> reader.
> > > >> I am trying to image the CF card and write the image to a second CF
> > > >> card.
> > > >> Kind of a, make a backup to experiment with scenario and use the
> > > >> backup.
> > > >>
> > > >> This my CentOS 7 box doesn't work:
> > > >>
> > > >> $ sudo dd if=/dev/sdb of=win98seQSP2predrivers.img bs=1M count=1000
> > > >> status=progress
> > > >>
> > > >> The file created cannot be mounted. If you write it to another CF
> > card,
> > > >> you get garbage.
> > > >> _______________________________________________
> > > >> PLUG mailing list
> > > >> PLUG@pdxlinux.org
> > > >> http://lists.pdxlinux.org/mailman/listinfo/plug
> > > >>> _______________________________________________
> > > >>> PLUG mailing list
> > > >>> PLUG@pdxlinux.org
> > > >>> http://lists.pdxlinux.org/mailman/listinfo/plug
> > > >>
> > > >> _______________________________________________
> > > >> PLUG mailing list
> > > >> PLUG@pdxlinux.org
> > > >> http://lists.pdxlinux.org/mailman/listinfo/plug
> > > >
> > > > Q: Why do programmers confuse Halloween and Christmas?
> > > > A: Because OCT 31 == DEC 25.
> > > >
> > > > _______________________________________________
> > > > PLUG mailing list
> > > > PLUG@pdxlinux.org
> > > > http://lists.pdxlinux.org/mailman/listinfo/plug
> > > _______________________________________________
> > > PLUG mailing list
> > > PLUG@pdxlinux.org
> > > http://lists.pdxlinux.org/mailman/listinfo/plug
> > >
> > _______________________________________________
> > PLUG mailing list
> > PLUG@pdxlinux.org
> > http://lists.pdxlinux.org/mailman/listinfo/plug
> >
> _______________________________________________
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
> 

-- 
Rod Grimes                                                 rgri...@freebsd.org
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to