Is BFS support with dd command?

is BFS support with dd command?

Welcome to the Haiku shell.

/data> df -a
Mount Type Total Free Flags Device


/ rootfs 0 0 ------W
/dev devfs 0 0 ------W
/boot bfs 3.8 GiB 1.9 GiB QAM-P-W /dev/disk/usb/0/0/0
/boot/system packagefs 4.0 KiB 4.0 KiB QAM-P–
/boot/home/config packagefs 4.0 KiB 4.0 KiB QAM-P–
/boot/system/var/shared_memory
ramfs 0 3.4 GiB QAM-PRW
/Haiku1 bfs 4.0 GiB 2.0 GiB QAM-P-W /dev/disk/scsi/0/0/0/0
/data bfs 21.4 GiB 21.3 GiB QAM-P-W /dev/disk/scsi/0/0/0/1
/data> dd if=/dev/disk/scsi/0/0/0/0 of=./haiku.raw bs=1M status=progress
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 162 s, 26.5 MB/s
dd: error reading ‘/dev/disk/scsi/0/0/0/0’: Invalid Argument
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 162.122 s, 26.5 MB/s

why “dd: error reading ‘/dev/disk/scsi/0/0/0/0’: Invalid Argument”?

You can’t create files in / in haiku. Try to put haiku.raw it in /boot/home or elsewhere instead of / (your “of” argument)

I wonder why? Can you point to some documentation explaining the concept behind this?

Also I wonder why dd copies data but complains about wrong argument. This is a contradiction to me. In other words: Shouldn’t dd fail totally with a wrong argument?

Edit: And the of argument starts with “./” not “/”

/ doesn’t exist, there is no backing memory or disk for ir. It only contains symlinks or mountpoints

It looks to me like there is a problem when dd reaches the end of /dev/disk/scsi/0/0/0/0.
Adding count=4096 to the command stops the error being reported

But the original command was:

/data> dd if=/dev/disk/scsi/0/0/0/0 of=./haiku.raw bs=1M status=progress

The target was ./haiku.raw and as the OP was in the /data, so it means /data/haiku.raw.

it works.
but the result is a file with 4GiB.
the partition is 4GiB but with 2GiB free space.
so, how to create the file without the 2GiB free space?
which argument should i add?

There’s no option for that. Because dd copies identically and without understanding the filesystem. Maybe copying (cp) from /Haiku1 helps? Or packing the resulting image file into a .tgz or bzip2 file.

What are you trying to do? And why?

1 Like

“/” is a special rootfs file system mounted by kernel at boot time. rootfs is stored in memory and do not support regular files. rootfs is usually used for mount points and symlinks. Volume containing currently booted operating system is mounted at /boot, so you can write at /boot. /boot is something similar to C:\ in Windows.

gzip -9
and useless

it doesn’t matter.

for:
marketing haiku to layman.

because layman have no idea about code, even add application or adjust setting.
i will use the Norton Ghost way.
and dd is the Norton Ghost in open source world.
i just need to tell people dd the haiku.raw to your computer.
so, i try these these thing again and again.

@Ilovehotdog What are you trying to do?

if it work well, i share the haiku.raw to my friends.
also, share my layman’s experience to them.
A haiku.raw has the default application or setting.
people just need to dd it into computer, then finish their office work with haiku.

this is what layman need from computer.
and,haiku will have more and more users.
then, developer and company will come soon.

But why not use the existing Haiku anyboot image? I think it is the same as your haiku.raw.

Edit: You want pre-installed applications perhaps?

not really same.
no thememanager, no becjk, no libreoffice, no Androidfiletransfer, no quick tip which just need some word.
i build it from current iso.

yes,you will say “read the official handbook”
sorry, no any layman try to read a book or add application or adjust setting.
they just need a tool to finish their work.
layman is the man which is very lazy.
and most of people is layman.

I think I understand now what you try to do.

I think you should use Haiku a lot and learn. Then write a “layman’s guide”.

this is what i build from current iso.
i upload the picture to some website.
i am glade to see more than 200 visitors in few day.
they just say “more beauty and more time to fit the UI ”.
it is about comfortable or habit.
yes, they are layman which are very lazy and have no mind but one shot.
we need more opportunities or way to show haiku with layman’s sight.

mmmm,by the way, still failed to dd the raw file to partition.it will freeze after mbr calling the haiku partition.a message “Loading Haiku”,then freeze.

you may say how about the application “installer”.
but, my friends are from 100000 miles.
and they have no time and no mind to learn or install or adjust.
why not transfer the raw file to them with internet?
and, my friends also have the same kinds of friends.
they only need to transfer the raw file with internet.

you may like this thing.

10 show one picture
20 transfer the raw file with internet
30 goto 10

1 Like

Good one. :rofl:
Ilovehotdog is after a subset of people that do not read and aren’t eager to learn. I hope they are too lazy to flood the forum with posts they are then too lazy to read the answers to… :slight_smile:

2 Likes

it is impossible about flood.
what is ghost way?
it mean that they install haiku with dd command from the raw file which have been adjusting or adding enough.
when there is any problem, they will dd the raw file into their computer again.
this is the way of layman.
it is the most technicality thing in layman’s eyes.
code, they refuse it.
lazy is nature.
they also use the ghost way in bank or hospital.
there is always a ghost file in any computer .
it used to be WindowsXP, now it’s windows7 or windows10.
(i don’t know what happened in the USA.
but i know what happened in China.
they can not get rid it away, because the cost is too expansive without the ghost way.)

and now, i can dd system into a raw file.
but meet a bug after i dd the raw file back to the partition.
a message “Loading Haiku” ,then freeze.
weird, debian can read be file system, but not recognize it as bfs.
:eyes:i found no such article about these thing.

But if Haiku is so complicated, why do you use it? I mean there are three simple to use operating systems: Window, Linux, MacOS.

And you ARE flooding the forum, or am I wrong?

Edit: And what do you mean with ghost file?

Yes, I was looking at my phone with a broken screen and missed the dot. So the problem is elsewhere. Sorry.