Hello everyone. I recently installed the QEMU (0.8.2) CPU emulator / virtualisation system on Puppy Linux 2.00. I managed to get it to run by pointing it at an ext3 image that contains the Puppy 2.00 root filesystem. This is just to see if it works, my intension is to get Windows running on it. The problem is, the thing just opens an almost empty console window and does nothing else. It doesn't hang, it just seems to get stuck. Has anyone else encountered similar problems? Thanks.

Steven.

P.S. This problem occurs in full emulation mode (i.e. no kqemu accelerator module used).

Dani AI

Generated

Quick note following ’s follow-up and ’s pointer: QEMU will happily open a window but not proceed if the disk image you passed contains a filesystem only (an ext3 tree) and no boot record/bootloader for the guest BIOS to run. Two productive ways to get Puppy to actually boot under QEMU are: (A) turn that ext3 snapshot into a proper “disk” image with an MBR+partition and install a bootloader, or (B) skip the BIOS/MBR step and tell QEMU to load a kernel/initrd directly and point that kernel at the ext3 image.

If you want the quick kernel route (no MBR needed), this is the simplest pattern:

qemu -m 256 -hda puppy.img -kernel /path/to/bzImage \
  -initrd /path/to/initrd.gz -append "root=/dev/hda1 rw console=ttyS0" \
  -serial stdio

Adjust root= depending on whether your image contains a partition (/dev/hda1) or is a partitionless rootfs (/dev/hda). Using -serial stdio (or -nographic) will send kernel messages to your terminal so you can see why it stops.

If you want a proper bootable disk image so you can use QEMU’s normal BIOS boot, the common workflow is:

  • create a raw image (dd if=/dev/zero of=puppy.img bs=1M count=256),
  • associate it with a loop device (losetup -f --show puppy.img),
  • partition it with fdisk (make the first partition bootable),
  • map partitions (kpartx -av puppy.img or losetup -P),
  • mkfs.ext3 the partition, mount it and copy/extract the Puppy rootfs, then chroot in and run grub-install (or install syslinux) to write an MBR.

Troubleshooting tips: always run fdisk -l puppy.img and file puppy.img to inspect the image, back up the IMG before using losetup/fdisk, and use -serial stdio to capture kernel output. Once it boots, add the kqemu/KVM accelerator for speed (matching kernel module and QEMU build required).

Recommended Answers

All 2 Replies

Are you following the ? Did you try this first?

It's a much smaller image, so it might work better.

commented: Right on man! +1

Hi Joe. Yes I have read the manual, perhaps a bit too briefly. I've realised what I did wrong now; no boot code in the superblock of the ext3 image. I should have thought of that really. Thanks for the advice.

Steven.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.