fdisk -l .../dev/sdb1 system -invalid argument 1m #### dd if=FreeBSD-11-RELEASE-amd64-memstick.img of=/dev/sdb1 bs=1M conv=sync

Polytropon freebsd at edvax.de
Fri Dec 30 23:33:09 UTC 2016


On Sat, 31 Dec 2016 00:13:44 +0100, swjatoslaw gerus wrote:
> fdisk -l 
> 
> /dev/sda1
> ...
> /dev/sda6
> 
> /dev/sdb1  w95 FAT32

That is wrong.



> Author performed that what freebsd stated  .in email to author.. 1048576

This is equivalent to bs=1M or bs=1m, depending on what
dd accepts for the size parameter. But that parameter
isn't the problem - it's the _incorrect_ naming of the
target device.

The commend should be:

	# dd if=FreeBSD-11-RELEASE-amd64-memstick.img of=/dev/sdb bs=1048576 conv=sync

Pay attention that it is "sdb", not "sdb1", which will
write the image to the 1st partition and therefore the
medium will _not_ boot - simply because no boot code
is being written (to the _correct_ location).

Again, check that you're not being blocked by a simple
"fat fingers" mistake. :-)



> possibly new sandisk must formated for ubuntu,

No, it doesn't need to be formatted. The image itself
already contains the formatted file system. Understand
the image as a "ready-made" file system, or to be more
precise, as a "medium image with boot code and file
system". That image actually can contain several
partitions (read: file systems) - and of course you
cannot "put 4 partitions into a partition", you need
to put them _directly_ on the USB stick).

That's why it is so important that you specify the
correct target device name.



> than possibly can see
> file after mounting with ls -lsar,to  date can see with more

No. You cannot mount the installation image (or the
result on the USB stick) that way. It will have a UFS
partition ("mount -t ufs" is required). You should
then see the FreeBSD-typical files. This is what you
can expect to see:

	# ls /mnt
	.cshrc        HARDWARE.TXT  boot/         media/        sys@
	.profile      README.HTM    dev/          mnt/          tmp/
	COPYRIGHT     README.TXT    docbook.css   proc/         usr/
	ERRATA.HTM    RELNOTES.HTM  etc/          rescue/       var/
	ERRATA.TXT    RELNOTES.TXT  lib/          root/
	HARDWARE.HTM  bin/          libexec/      sbin/

If you have done everything as needed, you can see
such kinds of entries, and the USB stick will boot
as you expect it.

The example above has been obtained like this:

	# mdconfig -a -t vnode -f FreeBSD-11.0-RELEASE-amd64-mini-memstick.img
	md0
	# mount -t ufs -o ro /dev/md0p3 /mnt
	# ls /mnt
		... see above ...
	# umount /mnt
	# mdconfig -d -u 0

It will work similarly with the real USB stick instead
of a file-backed memory disk virtual device. :-)





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list