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
MKBOOTDISK(8)						      System Manager's Manual						     MKBOOTDISK(8)

NAME
mkbootdisk - creates a stand-alone boot floppy for the running system SYNOPSIS
mkbootdisk [--version] [--noprompt] [--verbose] [--device devicefile] [--size size] [--kernelargs <args>] [--iso] kernel DESCRIPTION
mkbootdisk creates a boot floppy appropriate for the running system. The boot disk is entirely self-contained, and includes an initial ramdisk image which loads any necessary SCSI modules for the system. The created boot disk looks for the root filesystem on the device sug- gested by /etc/fstab. The only required argument is the kernel version to put onto the boot floppy. OPTIONS
--device devicefile The boot image is created on devicefile. If --device is not specified, /dev/fd0 is used. If devicefile does not exist mkinitrd cre- ates a 1.44Mb floppy image using devicefile as the filename. --noprompt Normally, mkbootdisk instructs the user to insert a floppy and waits for confirmation before continuing. If --noprompt is specified, no prompt is displayed. --verbose Instructs mkbootdisk to talk about what it's doing as it's doing it. Normally, there is no output from mkbootdisk. --iso Instructs mkbootdisk to make a bootable ISO image as devicefile. --version Displays the version of mkbootdisk and exits. --kernelargs args Adds args to the arguments appended on the kernel command line. If this is not specified mkbootdisk uses grubby to parse the argu- ments for the default kernel from grub.conf, if possible. --size size Uses size (in kilobytes) as the size of the image to use for the boot disk. If this is not specified, mkbootdisk will assume a standard 1.44Mb floppy device. SEE ALSO
grubby(8) dracut(8) AUTHOR
Erik Troan <ewt@redhat.com> 4th Berkeley Distribution Tue Mar 31 1998 MKBOOTDISK(8)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy