Sponsored Content
Full Discussion: QEMU not booting my image
Special Forums Hardware Filesystems, Disks and Memory QEMU not booting my image Post 302484866 by Corona688 on Monday 3rd of January 2011 01:13:37 PM
Old 01-03-2011
Quote:
Originally Posted by neur0n
ok I found these step on how to make a bootable image:

Code:
$ cd /usr/lib/grub/i386-pc
$ dd if=stage1 of=image.img bs=512 count=1
1+0 records in
1+0 records out
$ dd if=stage2 of=image.img bs=512 seek=1
153+1 records in
153+1 records out
$

But is this correct
Sort of. You didn't need to create image.img in the current directory, and probably shouldn't, and didn't need to run any of that as root. It also only creates a 105KB file, not a 1440KB file, so I'd modify it a little:

Code:
cd /usr/lib/grub/i386-pc
# make a completely blank disk image
dd if=/dev/zero of=~/image.img bs=512 count=2880
# copy the boot sector onto it.  "conv=notrunc" tells it not to shrink the file.
dd if=stage1 of=~/image.img conv=notrunc bs=512
# copy stage2 onto it
dd if=stage2 of=~/image.img conv=notrunc seek=1 bs=512

My system has them in /lib/grub/, not /usr/lib/grub incidentally, but systems do differ. "bs=512" is redundant since dd defaults to that but it doesn't hurt anything.

Quote:
and if it is will I be able to freely add files afterwards?
It contains no filesystem, there's nothing to add files to. It would only boot to a grub prompt.

But it should almost certainly be a valid boot disk image, with which you can test qemu.

---------- Post updated at 12:13 PM ---------- Previous update was at 12:05 PM ----------

[edit] the below instructions didn't work because the grub utility can't install on a floppy that way. argh.

Last edited by Corona688; 01-03-2011 at 02:33 PM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies

2. UNIX for Dummies Questions & Answers

Anyone ever used qemu and networked it ?

hi i got a virtual linux machine running on qemu my problem is connecting it to the internet im a bit confused weather i have to make a virtual network card in qemu and than tun tap it? can anyone thats done it before help me out? (1 Reply)
Discussion started by: russian460
1 Replies

3. Programming

Qemu + gdb

Hi, I got: host machine: RedHat (RHEL6) virtual machine: RedHat (RHEL6) I run (on host machine): qemu-system-x86_64 ...... -S -s after that i run (on host machine): gdb target remote localhost:1234 set architecture i386:x86-64 and then i can use (on host machine) 'ctrl + c' to... (2 Replies)
Discussion started by: Chrisdot
2 Replies

4. Solaris

Dual Booting - Solaris image CD doesn't read in BIOS

I am trying to install solaris 10-x86 as second OS on top of Windows XP. I have downloaded iso image from Oracle website and burned into bootable cd. when I loaded into CD-drive and made changes in BIOS to boot from CD. Its not reading from CD drive. After restarting the system with CD(solaris... (8 Replies)
Discussion started by: SunSolars_admin
8 Replies

5. Shell Programming and Scripting

matching image files to create one image

Hi, I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the... (6 Replies)
Discussion started by: kylle345
6 Replies

6. IP Networking

Create a Bridge for Qemu using only loopback

hello networking folks, i have 3 virtual machines that need to talk to each other How can i create a bridge to loopback ? -net tap,vlan=0,ifname=tap1 where tap1 is connected to lo:1 , tap2 is connected to lo:2 etc thx (0 Replies)
Discussion started by: TwiceDone
0 Replies

7. Virtualization and Cloud Computing

QEMU performance?

Heyas So, i like doing custom a LiveImage of my OS. Using Redhats kickstart/livecd-creator method. Anyway, so i would like to test the liveimages... AND also, i WOULD like to install FreeBSD, Solaris, or whatever, onto a Virtual Machine. I used to use Oracles Virtualbox, but eversince... (3 Replies)
Discussion started by: sea
3 Replies

8. BSD

How to install Ultrix 4.2 on Qemu?

Hi Problem changed. I've got a message showing on the screen which says Guest has not initialized the display (yet) Any how I can fix this? Thanks Jack (4 Replies)
Discussion started by: lucky7456969
4 Replies
QEMU-NBD(8)															       QEMU-NBD(8)

NAME
qemu-nbd - QEMU Disk Network Block Device Server SYNOPSIS
usage: qemu-nbd [OPTION]... filename DESCRIPTION
Export QEMU disk image using NBD protocol. OPTIONS
filename is a disk image filename -p, --port=port port to listen on (default B<1024>) -o, --offset=offset offset into the image -b, --bind=iface interface to bind to (default B<0.0.0.0>) -k, --socket=path Use a unix socket with path I<path> -r, --read-only export read-only -P, --partition=num only expose partition I<num> -s, --snapshot use snapshot file -n, --nocache --cache=cache set cache mode to be used with the file. See the documentation of the emulator's C<-drive cache=...> option for allowed values. --aio=aio choose asynchronous I/O mode between B<threads> (the default) and B<native> (Linux only). --discard=discard toggles whether I<discard> (also known as I<trim> or I<unmap>) requests are ignored or passed to the filesystem. The default is no (B<--discard=ignore>). -c, --connect=dev connect I<filename> to NBD device I<dev> -d, --disconnect disconnect the specified device -e, --shared=num device can be shared by I<num> clients (default B<1>) -f, --format=fmt force block driver for format I<fmt> instead of auto-detecting -t, --persistent don't exit on the last connection -v, --verbose display extra debugging information -h, --help display this help and exit -V, --version output version information and exit SEE ALSO
qemu-img(1) AUTHOR
Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 2014-06-10 QEMU-NBD(8)
All times are GMT -4. The time now is 08:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy