qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: how to create a block devie?


From: Kevin Wolf
Subject: Re: Fwd: how to create a block devie?
Date: Tue, 12 Nov 2019 09:33:22 +0100
User-agent: Mutt/1.12.1 (2019-06-15)

Am 12.11.2019 um 01:33 hat Liu Jaloo geschrieben:
> 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.

You don't need to use usbimg2disk.sh. The purpose of this tool is if you
want to use a (physical) USB disk with an existing file system that you
don't want to overwrite. It adds the installer to your existing file
system.

As we're talking about virtual disks here, we have as many fresh USB
disks as we like, and usbboot.img is already one. Just attach
usbboot.img directly to the VM.

Kevin

> On Mon, Nov 11, 2019 at 5:19 PM Kevin Wolf <address@hidden> 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 <address@hidden>
> > > Date: Sat, Nov 9, 2019 at 4:46 PM
> > > Subject: how to create a block devie?
> > > To: <address@hidden>
> > >
> > >
> > > 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
> >
> >




reply via email to

[Prev in Thread] Current Thread [Next in Thread]