WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wanted: How-to qemu 64-bit  (Read 12977 times)

Offline bsquared

  • Newbie
  • *
  • Posts: 9
Wanted: How-to qemu 64-bit
« on: December 10, 2010, 01:35:01 PM »
I need to set up a 64-bit environment, but I can't find tinycore64. 

Thanks B2

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Wanted: How-to qemu 64-bit
« Reply #1 on: December 10, 2010, 01:38:03 PM »
Install microcore64 plus Xlibs, Xprogs, Xvesa and wbar.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Wanted: How-to qemu 64-bit
« Reply #2 on: December 10, 2010, 02:29:15 PM »
Xvesa doesn't run on 64bit.
The only barriers that can stop you are the ones you create yourself.

Offline bsquared

  • Newbie
  • *
  • Posts: 9
Re: Wanted: How-to qemu 64-bit
« Reply #3 on: December 10, 2010, 02:43:09 PM »
I'm not sure what this means.  I can download the listed files, but how are they installed?

Currently I qemu setup to boot:
qemu-system-x86_64 -M pc -hda /home/bwinfrey/qemu/cosd.disk -m 128 -cdrom /home/bwinfrey/Downloads/tinycore_3.3.iso -hdb /home/bwinfrey/qemu/swap.disk -net nic,vlan=1 -net user,vlan=1,hostname=emu  -kernel /home/bwinfrey/Downloads/edit/boot/bzImage -initrd /home/bwinfrey/Downloads/edit/boot/microcore.gz

where bzImage and microcore.gz are the 64-bit versions.

Boots up fine and identifies as X86_64.

I want to use the hda image (already setup as ext4) as boot drive, and hdb image as swap.
« Last Edit: December 10, 2010, 03:01:52 PM by bsquared »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Wanted: How-to qemu 64-bit
« Reply #4 on: December 10, 2010, 03:02:33 PM »
I haveno 64bit machine to test on, and don't know how 64bit microcore was compiled, but this is how RedHat/Fedora handle mixed
archecture installations:
32 bit applications read libraries from /lib.
64 bit applications read libraries from /lib64.

This allows a 64 bit system to run both 64 and 32 bit applications with no library conflicts.

I did not know that 32bit Xvesa will not run with the 64bit kernel.

To answer bsquared's question:
The Xxxx.gz files are placed in the tce directory and are automatically loaded afrer boot.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Wanted: How-to qemu 64-bit
« Reply #5 on: December 11, 2010, 04:09:07 AM »
Nothing to do with Xvesa's bitness, it's the bios calls it uses. Those are unavailable when on 64-bit.

Xorg's vesa doesn't call the bios, it uses its own emulator, which is why it works on 64.
The only barriers that can stop you are the ones you create yourself.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Wanted: How-to qemu 64-bit
« Reply #6 on: December 11, 2010, 11:15:46 AM »
Good, then bsquared should be able to copy Xlibs.gz and Xprogs.gz to his tce directory, load Xorg-7.5.tcz onboot, and have
a functioning X server with the 64 bit kernel.
Is this correct?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Wanted: How-to qemu 64-bit
« Reply #7 on: December 11, 2010, 12:31:32 PM »
Yes, that should work. It's the lack of Xvesa why there's no tinycore64 iso.
The only barriers that can stop you are the ones you create yourself.

Offline bsquared

  • Newbie
  • *
  • Posts: 9
Re: Wanted: How-to qemu 64-bit
« Reply #8 on: December 11, 2010, 07:09:10 PM »
Thanks for the help. What do you mean by the tce directory?  I put them on the root of the cd image.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Wanted: How-to qemu 64-bit
« Reply #9 on: December 11, 2010, 07:29:43 PM »
Please refer to the FAQs on tinycorelinux.com.

Offline bsquared

  • Newbie
  • *
  • Posts: 9
Re: Wanted: How-to qemu 64-bit
« Reply #10 on: December 13, 2010, 10:31:53 PM »
I am following the wiki "Adding a Desktop to MicroCore", but no success.  Here is my setup:
booting microcore-64.iso
hda is created using dd on existing partiton out to hda.img (part image not disk image)
hdb is created using dd to create a file and running mkswap on it.

Xlibs.gz & Xprogs.gz are on hda in /tce.

qemu command:
Code: [Select]
qemu-system-x86_64 -M pc -hda hda.img -m 192 -cdrom microcore-64.iso -hdb swap.img -net nic,vlan=0 -net user,vlan=0,hostname=emu  -boot d
Code: [Select]
boot: microcore tce=hda microcore showapps...
Code: [Select]
tc@box:~$cd `cat /opt/.tce_dir`
-sh: cd: can't cd to /tce

it looks as if no tce loading happens during boot and hda is not mounted.

Any ideas what is wrong other than my ignorance ;)

Thanks again.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Wanted: How-to qemu 64-bit
« Reply #11 on: December 13, 2010, 11:31:56 PM »
(1) Can you be more specific about the 'dd' command used for the creation of 'hda.img'?

(2) Also what filesystem did you create on that disk image file?

(3) Could you show us the result of fdisk -l /dev/hda and blkid /dev/hda* from "inside" the VM?

Because I've just done a simplified version of your attempt (using 'qemu -hda hda.img -cdrom tinycore_3.4rc2.iso -boot d -m 48') and I had to boot once to be able to run something like sudo mkfs.ext3 /dev/hda and the second time around I can get the expected result of:
Code: [Select]
tc@box:~$ cd $( cat /opt/.tce_dir )
tc@box:/mnt/hda/tce$
And to just give you an idea of what I'm getting for (3), here is that output:
Code: [Select]
tc@box:~$ cat /proc/cmdline
initrd=/boot/tinycore.gz quiet BOOT_IMAGE=/boot/bzImage tce=hda

tc@box:~$ fdisk -l /dev/hda
Disk /dev/hda: 5 MB, 5242880 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/hda doesn't contain a valid partition table

tc@box:~$ blkid /dev/hda*
/dev/hda: UUID="74eff9c0-a95c-4aea-84ef-8ea97d5e7994" SEC_TYPE="ext2" TYPE="ext3"
« Last Edit: December 13, 2010, 11:33:30 PM by maro »

Offline bsquared

  • Newbie
  • *
  • Posts: 9
Re: Wanted: How-to qemu 64-bit
« Reply #12 on: December 14, 2010, 11:16:10 AM »
> (1) Can you be more specific about the 'dd' command used for the creation of 'hda.img'?

I have a virtual disk - cosd.disk.  I created an image of the first partition with dd.

to determine correct start position and size:
Code: [Select]
parted cosd.disk
...
(parted) unit                                                            
Unit?  [compact]? B                                                      
(parted) print                                                            
Model:  (file)
...
Number  Start        End          Size         Type      File system     Flags
 1      1048576B     7976517631B  7975469056B  primary   ext4            boot
...
(parted) quit
create the image with the start/size information from above.
Code: [Select]
dd if=cosd.disk of=hda.img bs=512 skip={1048576/512} count={7975469056/4}

> (2) Also what filesystem did you create on that disk image file?
This is an image of a partition, not a disk. File system is ext4

> (3) Could you show us the result of fdisk -l /dev/hda and blkid /dev/hda* from "inside" the VM?
Disk reporting from within VM (same boot params as before).
Code: [Select]
tc@box:~$fdisk -l /dev/hda

Disk /dev/hda: 8387 MB, 8387559424 bytes
255 heads, 63 sectors/track, 1019 cyinders
Unite = cyinders of 16065 * 512 = 8225280 bytes

Disk /dev/hda doesn't contain a valid partition table
tc@box:~$blkid /dev/hda
/dev/hda: UUID="fb99a5e4-9fec-406c-a693-87ba14d7e3a3" TYPE="ext4"
« Last Edit: December 14, 2010, 12:51:09 PM by bsquared »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Wanted: How-to qemu 64-bit
« Reply #13 on: December 14, 2010, 01:02:50 PM »
Are you able to mount disk or partition in question from within VM?
If so, are you able to list /tce and contents?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bsquared

  • Newbie
  • *
  • Posts: 9
Re: Wanted: How-to qemu 64-bit
« Reply #14 on: December 14, 2010, 01:17:33 PM »
Yes to both-kindof.  yes it mounts, but /tce doesn't exist.  it should be /mnt/hda/tce. so..

I mounted hda, recreated the tce directory just in case and ran tce-setup.  It returned with /mnt/hda/tce. 

I installed cifs-utils and copied the gz files from the host via samba.

I rebooted and got the same results.