thanks Kevin for reply.
I want to create a slackware usb-installer disk, with usbimg2disk.sh
I create a disk with command:
$ qemu-img create slackware64-current-udisk.img 8G
then in slackware source directory:
$ sudo ./usbimg2disk.sh -i usbboot.img -o slackware64-current-udisk.img
report error like this:
*** Not a block device:
'/home/jaloo/qemu/slackware64-current/slackware64-current-udisk.img' !
in usbimg2disk.sh
# Sanity checks:
if [ ! -b $TOWIPE ]; then
echo "*** Not a block device: '$TOWIPE' !"
exit 1
fi
so my question is how to create a block device for Bash Conditional
Expression:
if -b
-b file
True if file exists and is a block special file.
On Mon, Nov 11, 2019 at 5:19 PM Kevin Wolf <[email protected]> wrote:
> Am 09.11.2019 um 10:05 hat Liu Jaloo geschrieben:
> > block device for bash Bash Conditional Expressions
> > if -b
> >
> > ---------- Forwarded message ---------
> > From: Liu Jaloo <[email protected]>
> > Date: Sat, Nov 9, 2019 at 4:46 PM
> > Subject: how to create a block devie?
> > To: <[email protected]>
> >
> >
> > i want to emulate a USB disk for install operation system, how to create
> a
> > block device using qemu-img to work with dd command.
>
> You don't need to write an image to a block device on the host for
> emulating a USB disk in QEMU. Just use the image file directly.
>
> Kevin
>
>